Chromium Code Reviews| 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..24899359990f06a8194ee28463b344e57e2e2013 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; |
|
sky
2016/09/22 21:42:06
Do you need to specify if the new display is the p
kylechar
2016/09/23 13:22:32
PlatformDisplay queries PlatformScreen to check if
|
| + |
| + // 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 |
|
sky
2016/09/22 21:42:06
Generally we use params for function calls rather
kylechar
2016/09/23 13:22:32
Done.
|
| + // information. |
| + virtual void OnDisplayModified(int64_t id, |
| + const gfx::Rect& bounds, |
| + const gfx::Size& pixel_size, |
| + float device_scale_factor) = 0; |
| protected: |
| virtual ~PlatformScreenDelegate() {} |