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

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

Issue 2434923002: Handle modified displays in mustash. (Closed)
Patch Set: Fix PlatformScreenStub for tests. Created 4 years, 2 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/BUILD.gn ('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 74284e73ce4574bbbe9a37894abdac83383fb381..b326c6a14b7ec7c9f0d1d01c6e4a1c6152b27822 100644
--- a/services/ui/display/platform_screen_delegate.h
+++ b/services/ui/display/platform_screen_delegate.h
@@ -15,30 +15,24 @@ class Size;
namespace display {
class PlatformScreen;
+struct ViewportMetrics;
// The PlatformScreenDelegate will be informed of changes to the physical
// and/or virtual displays by PlatformScreen.
class PlatformScreenDelegate {
public:
- // 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
+ // Called when a display is added. |id| is the display id of the new display
+ // and |metrics| contains display viewport information.
+ virtual void OnDisplayAdded(int64_t id, const ViewportMetrics& metrics) = 0;
+
+ // Called when a display is removed. |id| is the display id of the display
// that was removed.
virtual void OnDisplayRemoved(int64_t id) = 0;
- // Called when a display is modified. See OnDisplayAdded() for parameter
- // information.
+ // Called when a display is modified. |id| is the display id of the modified
+ // display and |metrics| contains updated display viewport information.
virtual void OnDisplayModified(int64_t id,
- const gfx::Rect& bounds,
- const gfx::Size& pixel_size,
- float device_scale_factor) = 0;
+ const ViewportMetrics& metrics) = 0;
protected:
virtual ~PlatformScreenDelegate() {}
« no previous file with comments | « services/ui/display/BUILD.gn ('k') | services/ui/display/platform_screen_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698