Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1438)

Side by Side Diff: ui/base/device_form_factor_android.cc

Issue 2847523002: Android: Remove GetApplicationContext part 4 (Closed)
Patch Set: Rebase and fix build Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/base/clipboard/clipboard_android.cc ('k') | ui/base/touch/touch_device_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/device_form_factor.h" 5 #include "ui/base/device_form_factor.h"
6 6
7 #include "base/android/context_utils.h"
8 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
9 #include "jni/DeviceFormFactor_jni.h" 8 #include "jni/DeviceFormFactor_jni.h"
10 9
11 namespace ui { 10 namespace ui {
12 11
13 DeviceFormFactor GetDeviceFormFactor() { 12 DeviceFormFactor GetDeviceFormFactor() {
14 bool is_tablet = Java_DeviceFormFactor_isTablet( 13 bool is_tablet =
15 base::android::AttachCurrentThread(), 14 Java_DeviceFormFactor_isTablet(base::android::AttachCurrentThread());
16 base::android::GetApplicationContext());
17 return is_tablet ? DEVICE_FORM_FACTOR_TABLET : DEVICE_FORM_FACTOR_PHONE; 15 return is_tablet ? DEVICE_FORM_FACTOR_TABLET : DEVICE_FORM_FACTOR_PHONE;
18 } 16 }
19 17
20 } // namespace ui 18 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_android.cc ('k') | ui/base/touch/touch_device_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698