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

Side by Side Diff: ui/gfx/android/device_display_info.cc

Issue 28053002: Add font_scale_factor_quirk pref. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master.pinned
Patch Set: Address review comments. Created 7 years, 1 month 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/gfx/android/device_display_info.h ('k') | webkit/common/webpreferences.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gfx/android/device_display_info.h" 5 #include "ui/gfx/android/device_display_info.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "jni/DeviceDisplayInfo_jni.h" 10 #include "jni/DeviceDisplayInfo_jni.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 return static_cast<int>(result); 51 return static_cast<int>(result);
52 } 52 }
53 53
54 double DeviceDisplayInfo::GetDIPScale() { 54 double DeviceDisplayInfo::GetDIPScale() {
55 JNIEnv* env = AttachCurrentThread(); 55 JNIEnv* env = AttachCurrentThread();
56 jdouble result = 56 jdouble result =
57 Java_DeviceDisplayInfo_getDIPScale(env, j_device_info_.obj()); 57 Java_DeviceDisplayInfo_getDIPScale(env, j_device_info_.obj());
58 return static_cast<double>(result); 58 return static_cast<double>(result);
59 } 59 }
60 60
61 int DeviceDisplayInfo::GetSmallestDIPWidth() {
62 JNIEnv* env = AttachCurrentThread();
63 jint result =
64 Java_DeviceDisplayInfo_getSmallestDIPWidth(env, j_device_info_.obj());
65 return static_cast<int>(result);
66 }
67
61 // static 68 // static
62 bool DeviceDisplayInfo::RegisterDeviceDisplayInfo(JNIEnv* env) { 69 bool DeviceDisplayInfo::RegisterDeviceDisplayInfo(JNIEnv* env) {
63 return RegisterNativesImpl(env); 70 return RegisterNativesImpl(env);
64 } 71 }
65 72
66 } // namespace gfx 73 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/android/device_display_info.h ('k') | webkit/common/webpreferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698