Index: ui/gfx/android/device_info.cc |
diff --git a/content/common/android/device_info.cc b/ui/gfx/android/device_info.cc |
similarity index 80% |
rename from content/common/android/device_info.cc |
rename to ui/gfx/android/device_info.cc |
index 2522cae160aa0b60925ba4c9e5cace2519502182..eca1ec21fc27b19c84f96dc058e96c5dbc951a9a 100644 |
--- a/content/common/android/device_info.cc |
+++ b/ui/gfx/android/device_info.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "content/common/android/device_info.h" |
+#include "ui/gfx/android/device_info.h" |
#include "base/android/jni_android.h" |
#include "base/android/jni_string.h" |
@@ -13,7 +13,7 @@ using base::android::AttachCurrentThread; |
using base::android::ConvertJavaStringToUTF8; |
using base::android::ScopedJavaLocalRef; |
-namespace content { |
+namespace gfx { |
DeviceInfo::DeviceInfo() { |
JNIEnv* env = AttachCurrentThread(); |
@@ -24,17 +24,17 @@ DeviceInfo::DeviceInfo() { |
DeviceInfo::~DeviceInfo() { |
} |
-int DeviceInfo::GetHeight() { |
+int DeviceInfo::GetDisplayHeight() { |
JNIEnv* env = AttachCurrentThread(); |
jint result = |
- Java_DeviceInfo_getHeight(env, j_device_info_.obj()); |
+ Java_DeviceInfo_getDisplayHeight(env, j_device_info_.obj()); |
return static_cast<int>(result); |
} |
-int DeviceInfo::GetWidth() { |
+int DeviceInfo::GetDisplayWidth() { |
JNIEnv* env = AttachCurrentThread(); |
jint result = |
- Java_DeviceInfo_getWidth(env, j_device_info_.obj()); |
+ Java_DeviceInfo_getDisplayWidth(env, j_device_info_.obj()); |
return static_cast<int>(result); |
} |
@@ -52,10 +52,10 @@ int DeviceInfo::GetBitsPerComponent() { |
return static_cast<int>(result); |
} |
-double DeviceInfo::GetDPIScale() { |
+double DeviceInfo::GetDIPScale() { |
JNIEnv* env = AttachCurrentThread(); |
jdouble result = |
- Java_DeviceInfo_getDPIScale(env, j_device_info_.obj()); |
+ Java_DeviceInfo_getDIPScale(env, j_device_info_.obj()); |
return static_cast<double>(result); |
} |
@@ -73,8 +73,9 @@ std::string DeviceInfo::GetNetworkCountryIso() { |
return ConvertJavaStringToUTF8(result); |
} |
-bool RegisterDeviceInfo(JNIEnv* env) { |
+// static |
+bool DeviceInfo::RegisterDeviceInfo(JNIEnv* env) { |
return RegisterNativesImpl(env); |
} |
-} // namespace content |
+} // namespace gfx |