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

Unified Diff: services/ui/display/platform_screen_delegate.h

Issue 2356913002: Pass device scale factor from display to ws. (Closed)
Patch Set: Fix more tests. Created 4 years, 3 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 | « services/ui/display/OWNERS ('k') | services/ui/display/platform_screen_ozone.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/display/platform_screen_delegate.h
diff --git a/services/ui/display/platform_screen_delegate.h b/services/ui/display/platform_screen_delegate.h
index 9c0e144a37778991d893b045047c09a01d381cd5..74284e73ce4574bbbe9a37894abdac83383fb381 100644
--- a/services/ui/display/platform_screen_delegate.h
+++ b/services/ui/display/platform_screen_delegate.h
@@ -9,6 +9,7 @@
namespace gfx {
class Rect;
+class Size;
}
namespace display {
@@ -19,17 +20,25 @@ class PlatformScreen;
// and/or virtual displays by PlatformScreen.
class PlatformScreenDelegate {
public:
- // TODO(kylechar): We need to provide more than just the window bounds when
- // displays are added or modified.
-
- // Called when a display is added. |bounds| is in DIP.
- virtual void OnDisplayAdded(int64_t id, const gfx::Rect& bounds) = 0;
-
- // Called when a display is removed.
+ // Called when a display is added. |id| is the display id for the new display,
+ // |bounds| is the display origin and size in DIP, |pixel_size| is the size
+ // of the display in DDP and |device_scale_factor| is the output device pixel
+ // scale factor.
+ virtual void OnDisplayAdded(int64_t id,
+ const gfx::Rect& bounds,
+ const gfx::Size& pixel_size,
+ float device_scale_factor) = 0;
+
+ // Called when a display is removed. |id| is the display id for the display
+ // that was removed.
virtual void OnDisplayRemoved(int64_t id) = 0;
- // Called when a display is modified. |bounds| is in DIP.
- virtual void OnDisplayModified(int64_t id, const gfx::Rect& bounds) = 0;
+ // Called when a display is modified. See OnDisplayAdded() for parameter
+ // information.
+ virtual void OnDisplayModified(int64_t id,
+ const gfx::Rect& bounds,
+ const gfx::Size& pixel_size,
+ float device_scale_factor) = 0;
protected:
virtual ~PlatformScreenDelegate() {}
« no previous file with comments | « services/ui/display/OWNERS ('k') | services/ui/display/platform_screen_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698