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

Unified Diff: ui/display/display.h

Issue 2617623002: Switch RenderWidgetHostViewAndroid to use Screen (Closed)
Patch Set: fix? 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
Index: ui/display/display.h
diff --git a/ui/display/display.h b/ui/display/display.h
index 9980057e066c3dd2a1a31000480ec33d5b6c5bd9..fe140b20d0dedd3f2090f4b66401d663b01a2fa4 100644
--- a/ui/display/display.h
+++ b/ui/display/display.h
@@ -138,6 +138,7 @@ class DISPLAY_EXPORT Display final {
// Returns the display's size in pixel coordinates.
gfx::Size GetSizeInPixel() const;
+ void set_size_in_pixels(const gfx::Size& size) { size_in_pixels_ = size; }
// Returns a string representation of the display;
std::string ToString() const;
@@ -193,6 +194,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;

Powered by Google App Engine
This is Rietveld 408576698