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

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

Issue 2274353003: Add PlatformScreenDelegate and start implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes for comments. Created 4 years, 4 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/platform_screen.h ('k') | services/ui/display/platform_screen_impl.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
new file mode 100644
index 0000000000000000000000000000000000000000..659551796ebd5a30dfb7e8b544702117dbeaf04e
--- /dev/null
+++ b/services/ui/display/platform_screen_delegate.h
@@ -0,0 +1,42 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_
+#define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_
+
+#include <stdint.h>
+
+namespace gfx {
+class Rect;
+}
+
+namespace display {
+
+class PlatformScreen;
+
+// The PlatformScreenDelegate will be informed of changes to the physical
+// 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(PlatformScreen* platform_screen,
+ int64_t id,
+ const gfx::Rect& bounds) = 0;
+
+ // 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;
+
+ protected:
+ virtual ~PlatformScreenDelegate() {}
+};
+
+} // namespace display
+
+#endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_
« no previous file with comments | « services/ui/display/platform_screen.h ('k') | services/ui/display/platform_screen_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698