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

Unified Diff: services/ui/ws/user_display_manager.h

Issue 2461513002: Primary display change notifications. (Closed)
Patch Set: More fixes. 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/ws/test_utils.h ('k') | services/ui/ws/user_display_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/user_display_manager.h
diff --git a/services/ui/ws/user_display_manager.h b/services/ui/ws/user_display_manager.h
index 82834f39bc6253a93d1659cb68d617fb007d8b4f..e5326b764476c237754247f803656797ab4d1b2a 100644
--- a/services/ui/ws/user_display_manager.h
+++ b/services/ui/ws/user_display_manager.h
@@ -11,7 +11,7 @@
#include "base/macros.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "mojo/public/cpp/bindings/interface_ptr_set.h"
-#include "services/ui/public/interfaces/display.mojom.h"
+#include "services/ui/public/interfaces/display_manager.mojom.h"
#include "services/ui/ws/user_id.h"
namespace gfx {
@@ -43,16 +43,19 @@ class UserDisplayManager : public mojom::DisplayManager {
void AddDisplayManagerBinding(
mojo::InterfaceRequest<mojom::DisplayManager> request);
+ // Called when something about the display (e.g. pixel-ratio, size) changes.
+ void OnDisplayUpdate(Display* display);
+
// Called by Display prior to |display| being removed and destroyed.
void OnWillDestroyDisplay(Display* display);
+ // Called when the primary display changes.
+ void OnPrimaryDisplayChanged(int64_t primary_display_id);
+
// Called from WindowManagerState when its EventDispatcher receives a mouse
// event.
void OnMouseCursorLocationChanged(const gfx::Point& point);
- // Called when something about the display (e.g. pixel-ratio, size) changes.
- void OnDisplayUpdate(Display* display);
-
// Returns a read-only handle to the shared memory which contains the global
// mouse cursor position. Each call returns a new handle.
mojo::ScopedSharedBufferHandle GetCursorLocationMemory();
@@ -64,6 +67,9 @@ class UserDisplayManager : public mojom::DisplayManager {
// notifies the observer immediately.
void OnObserverAdded(mojom::DisplayManagerObserver* observer);
+ // Fills in a WsDisplayPtr for |display|.
+ mojom::WsDisplayPtr GetWsDisplayPtr(const Display& display);
+
mojo::Array<mojom::WsDisplayPtr> GetAllDisplays();
// Calls OnDisplays() on |observer|.
« no previous file with comments | « services/ui/ws/test_utils.h ('k') | services/ui/ws/user_display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698