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

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

Issue 2356913002: Pass device scale factor from display to ws. (Closed)
Patch Set: 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
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..46988d2009bca215da9377741fba50dc439d7374 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,20 @@ 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;
+ virtual void OnDisplayAdded(int64_t id,
+ const gfx::Rect& bounds,
+ const gfx::Size& pixel_size,
rjkroege 2016/09/21 13:23:46 and pixel_size is not in dip? i.e. in DDP? Please
kylechar 2016/09/21 16:31:12 Done.
+ float scale_factor) = 0;
rjkroege 2016/09/21 13:23:46 If we have the size in DP and the size in DIP, the
kylechar 2016/09/21 16:31:12 Usually, DIP = DDP * (ui_scale_factor / device_sca
// Called when a display is 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;
+ virtual void OnDisplayModified(int64_t id,
+ const gfx::Rect& bounds,
+ const gfx::Size& pixel_size,
+ float scale_factor) = 0;
protected:
virtual ~PlatformScreenDelegate() {}
« no previous file with comments | « no previous file | services/ui/display/platform_screen_ozone.h » ('j') | services/ui/display/platform_screen_ozone.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698