Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / ui / base / device_form_factor_android.cc
blobe7ed06b82f04f89febcadd774fdf4162f2749e76
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/base/device_form_factor_android.h"
7 #include "base/android/jni_android.h"
8 #include "jni/DeviceFormFactor_jni.h"
10 namespace ui {
12 DeviceFormFactor GetDeviceFormFactor() {
13 bool is_tablet = Java_DeviceFormFactor_isTablet(
14 base::android::AttachCurrentThread(),
15 base::android::GetApplicationContext());
16 return is_tablet ? DEVICE_FORM_FACTOR_TABLET : DEVICE_FORM_FACTOR_PHONE;
19 bool RegisterDeviceFormFactorAndroid(JNIEnv* env) {
20 return RegisterNativesImpl(env);
23 } // namespace ui