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

Unified Diff: services/ui/ws/display_manager.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/ws/cursor_unittest.cc ('k') | services/ui/ws/display_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/display_manager.h
diff --git a/services/ui/ws/display_manager.h b/services/ui/ws/display_manager.h
index 3409f377ee4d77636357c27b250494920159d336..245154d304dd55643394feb4bd74092680cfb916 100644
--- a/services/ui/ws/display_manager.h
+++ b/services/ui/ws/display_manager.h
@@ -10,6 +10,7 @@
#include <set>
#include "base/macros.h"
+#include "services/ui/display/platform_screen_delegate.h"
#include "services/ui/ws/ids.h"
#include "services/ui/ws/user_id.h"
#include "services/ui/ws/user_id_tracker_observer.h"
@@ -18,19 +19,19 @@ namespace ui {
namespace ws {
class Display;
-class DisplayManagerDelegate;
class ServerWindow;
class UserDisplayManager;
class UserIdTracker;
class WindowManagerDisplayRoot;
+class WindowServer;
// DisplayManager manages the set of Displays. DisplayManager distinguishes
// between displays that do yet have an accelerated widget (pending), vs
// those that do.
-class DisplayManager : public UserIdTrackerObserver {
+class DisplayManager : public UserIdTrackerObserver,
+ public display::PlatformScreenDelegate {
public:
- DisplayManager(DisplayManagerDelegate* delegate,
- UserIdTracker* user_id_tracker);
+ DisplayManager(WindowServer* window_server, UserIdTracker* user_id_tracker);
~DisplayManager() override;
// Returns the UserDisplayManager for |user_id|. DisplayManager owns the
@@ -76,7 +77,14 @@ class DisplayManager : public UserIdTrackerObserver {
void OnActiveUserIdChanged(const UserId& previously_active_id,
const UserId& active_id) override;
- DisplayManagerDelegate* delegate_;
+ // display::PlatformScreenDelegate:
+ void OnDisplayAdded(display::PlatformScreen* platform_screen_,
+ int64_t id,
+ const gfx::Rect& bounds) override;
+ void OnDisplayRemoved(int64_t id) override;
+ void OnDisplayModified(int64_t id, const gfx::Rect& bounds) override;
+
+ WindowServer* window_server_;
UserIdTracker* user_id_tracker_;
// Displays are initially added to |pending_displays_|. When the display is
« no previous file with comments | « services/ui/ws/cursor_unittest.cc ('k') | services/ui/ws/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698