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

Unified Diff: ui/android/view_android.h

Issue 2219823002: Move content offset to ViewAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated comments Created 3 years, 11 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 | « content/browser/renderer_host/render_widget_host_view_android.cc ('k') | ui/android/view_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/view_android.h
diff --git a/ui/android/view_android.h b/ui/android/view_android.h
index d05520d514b7ee525f1b85ec78f8fb7ceb1cd04b..ab7ccc123f25220f3430f8c32b22e7aac5632588 100644
--- a/ui/android/view_android.h
+++ b/ui/android/view_android.h
@@ -60,6 +60,16 @@ class UI_ANDROID_EXPORT ViewAndroid {
ViewAndroid();
virtual ~ViewAndroid();
+ // The content offset is in CSS pixels, and is used to translate
+ // snapshots to the correct part of the view.
+ void set_content_offset(const gfx::Vector2dF& content_offset) {
+ content_offset_ = content_offset;
+ }
+
+ gfx::Vector2dF content_offset() const {
+ return content_offset_;
+ }
+
// Returns the window at the root of this hierarchy, or |null|
// if disconnected.
virtual WindowAndroid* GetWindowAndroid() const;
@@ -126,6 +136,7 @@ class UI_ANDROID_EXPORT ViewAndroid {
int physical_width_pix_;
int physical_height_pix_;
+ gfx::Vector2dF content_offset_; // in CSS pixel
DISALLOW_COPY_AND_ASSIGN(ViewAndroid);
};
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.cc ('k') | ui/android/view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698