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

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: 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
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..1b301ce26a2d662ece3478fc712518ed3475f80c
--- /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.
+ virtual void OnDisplayAdded(PlatformScreen* platform_screen,
+ int64_t id,
+ const gfx::Rect& bounds) = 0;
sky 2016/08/25 23:40:31 Please clarify what the units are here. DIP or pix
kylechar 2016/08/26 13:21:19 Done.
+
+ // Called when a display is removed.
+ virtual void OnDisplayRemoved(int64_t id) = 0;
+
+ // Called when a display is modified.
+ virtual void OnDisplayModified(int64_t id, const gfx::Rect& bounds) = 0;
+
+ protected:
+ virtual ~PlatformScreenDelegate() {}
+};
+
+} // namespace display
+
+#endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698