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

Unified Diff: ui/display/display.h

Issue 2617623002: Switch RenderWidgetHostViewAndroid to use Screen (Closed)
Patch Set: remove comment change 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 | « ui/android/display_android_manager.cc ('k') | ui/display/display.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/display.h
diff --git a/ui/display/display.h b/ui/display/display.h
index 44e2b5e5a7f66402f6923cc876766a457b49dfb4..3c430e79227ea49ff2e676ef80094717c5568f83 100644
--- a/ui/display/display.h
+++ b/ui/display/display.h
@@ -138,6 +138,9 @@ class DISPLAY_EXPORT Display final {
// Returns the display's size in pixel coordinates.
gfx::Size GetSizeInPixel() const;
+#if defined(OS_ANDROID)
+ void set_size_in_pixels(const gfx::Size& size) { size_in_pixels_ = size; }
+#endif // defined(OS_ANDROID)
// Returns a string representation of the display;
std::string ToString() const;
@@ -193,6 +196,9 @@ class DISPLAY_EXPORT Display final {
private:
int64_t id_;
gfx::Rect bounds_;
+ // If non-empty, then should be same size as |bounds_|. Used to avoid rounding
+ // errors.
+ gfx::Size size_in_pixels_;
gfx::Rect work_area_;
float device_scale_factor_;
Rotation rotation_ = ROTATE_0;
« no previous file with comments | « ui/android/display_android_manager.cc ('k') | ui/display/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698