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

Unified Diff: ui/android/window_android.cc

Issue 1409833004: Add DeviceDisplayInfo getter in WindowAndroid. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix failing bot, revert RWHVA changes, add NOTIMPLEMENTED to some functions in screen_android Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/android/window_android.h ('k') | ui/gfx/screen_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/window_android.cc
diff --git a/ui/android/window_android.cc b/ui/android/window_android.cc
index 970ddd0415d12fa59ce06c5648f26e87c981b339..e48d4a1ce05e4d939f2d905bb4db25f269c5322c 100644
--- a/ui/android/window_android.cc
+++ b/ui/android/window_android.cc
@@ -13,15 +13,19 @@
#include "jni/WindowAndroid_jni.h"
#include "ui/android/window_android_compositor.h"
#include "ui/android/window_android_observer.h"
+#include "ui/gfx/android/device_display_info.h"
namespace ui {
using base::android::AttachCurrentThread;
using base::android::ScopedJavaLocalRef;
-WindowAndroid::WindowAndroid(JNIEnv* env, jobject obj) : compositor_(NULL) {
- java_window_.Reset(env, obj);
-}
+WindowAndroid::WindowAndroid(JNIEnv* env, jobject obj)
+ : java_window_(env, obj),
+ compositor_(NULL),
+ // TODO(gsennton): have our device display info depend on our (java)
+ // display context
+ device_display_info_(new gfx::DeviceDisplayInfo()) {}
void WindowAndroid::Destroy(JNIEnv* env, const JavaParamRef<jobject>& obj) {
delete this;
@@ -142,6 +146,10 @@ bool WindowAndroid::CanRequestPermission(const std::string& permission) {
base::android::ConvertUTF8ToJavaString(env, permission).obj());
}
+const gfx::DeviceDisplayInfo& WindowAndroid::GetDeviceDisplayInfo() const {
+ return *device_display_info_;
+}
+
// ----------------------------------------------------------------------------
// Native JNI methods
// ----------------------------------------------------------------------------
« no previous file with comments | « ui/android/window_android.h ('k') | ui/gfx/screen_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698