| Index: ui/gfx/android/device_display_info.h
|
| diff --git a/ui/gfx/android/device_display_info.h b/ui/gfx/android/device_display_info.h
|
| index 74e0ada487507f05d3a5f8f8a9e6374eebf39654..740a846bf3f9fe1a3c13012f34f0d1a012403b2a 100644
|
| --- a/ui/gfx/android/device_display_info.h
|
| +++ b/ui/gfx/android/device_display_info.h
|
| @@ -8,6 +8,7 @@
|
| #include <jni.h>
|
| #include <string>
|
|
|
| +#include "base/android/jni_android.h"
|
| #include "base/basictypes.h"
|
| #include "ui/gfx/gfx_export.h"
|
|
|
| @@ -18,8 +19,12 @@ namespace gfx {
|
| class GFX_EXPORT DeviceDisplayInfo {
|
| public:
|
| DeviceDisplayInfo();
|
| + explicit DeviceDisplayInfo(
|
| + base::android::ScopedJavaLocalRef<jobject> context);
|
| ~DeviceDisplayInfo();
|
|
|
| + void FetchDisplayInfoFromJava(JNIEnv* env);
|
| +
|
| // Returns display height in physical pixels.
|
| int GetDisplayHeight();
|
|
|
| @@ -56,6 +61,32 @@ class GFX_EXPORT DeviceDisplayInfo {
|
| // See DeviceDispayInfo.java for more information.
|
| int GetRotationDegrees();
|
|
|
| + // Registers methods with JNI and returns true if succeeded.
|
| + static bool RegisterDeviceDisplayInfo(JNIEnv* env);
|
| +
|
| + private:
|
| + void UpdateDisplayInfo(jint display_height,
|
| + jint display_width,
|
| + jint physical_display_height,
|
| + jint physical_display_width,
|
| + jint bits_per_pixel,
|
| + jint bits_per_component,
|
| + jdouble dip_scale,
|
| + jint smallest_dip_width,
|
| + jint rotation_degrees);
|
| +
|
| + base::android::ScopedJavaGlobalRef<jobject> j_device_info_;
|
| +
|
| + int display_height_;
|
| + int display_width_;
|
| + int physical_display_height_;
|
| + int physical_display_width_;
|
| + int bits_per_pixel_;
|
| + int bits_per_component_;
|
| + double dip_scale_;
|
| + int smallest_dip_width_;
|
| + int rotation_degrees_;
|
| +
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(DeviceDisplayInfo);
|
| };
|
|
|