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

Unified Diff: ui/android/window_android.h

Issue 2416403002: Reland of Android: support multiple displays on C++ side (Closed)
Patch Set: Update a map of Displays from Java Created 4 years, 2 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
Index: ui/android/window_android.h
diff --git a/ui/android/window_android.h b/ui/android/window_android.h
index b55ba16cfa2c4cd36cddf0ad33951e98363326fa..6e767663577b1204579b6e8295f1b64e14316696 100644
--- a/ui/android/window_android.h
+++ b/ui/android/window_android.h
@@ -16,6 +16,7 @@
#include "base/time/time.h"
#include "ui/android/ui_android_export.h"
#include "ui/android/view_android.h"
+#include "ui/display/display.h"
#include "ui/gfx/geometry/vector2d_f.h"
namespace ui {
@@ -27,7 +28,7 @@ class WindowAndroidObserver;
// WindowAndroid is also the root of a ViewAndroid tree.
class UI_ANDROID_EXPORT WindowAndroid : public ViewAndroid {
public:
- WindowAndroid(JNIEnv* env, jobject obj);
+ WindowAndroid(JNIEnv* env, jobject obj, int display_id);
void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
@@ -35,6 +36,9 @@ class UI_ANDROID_EXPORT WindowAndroid : public ViewAndroid {
static bool RegisterWindowAndroid(JNIEnv* env);
+ // The ID of the display that this window belongs to.
+ int display_id() const { return display_id_; }
boliu 2016/10/26 17:24:20 don't need to be public? can just friend screen_an
Tima Vaisburd 2016/10/27 07:55:58 Done.
+
// The content offset in CSS pixels. It is used together with device scale
// factor to translate snapshots to the correct part of the window.
void set_content_offset(const gfx::Vector2dF& content_offset) {
@@ -45,6 +49,8 @@ class UI_ANDROID_EXPORT WindowAndroid : public ViewAndroid {
return content_offset_;
}
+ display::Display GetDisplay() const;
boliu 2016/10/26 17:24:20 probably don't need this either
Tima Vaisburd 2016/10/27 07:55:58 Removed.
+
// Compositor callback relay.
void OnCompositingDidCommit();
@@ -86,6 +92,7 @@ class UI_ANDROID_EXPORT WindowAndroid : public ViewAndroid {
WindowAndroid* GetWindowAndroid() const override;
base::android::ScopedJavaGlobalRef<jobject> java_window_;
+ int display_id_;
gfx::Vector2dF content_offset_;
WindowAndroidCompositor* compositor_;

Powered by Google App Engine
This is Rietveld 408576698