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

Unified Diff: services/ui/ws/display_manager.cc

Issue 2696963003: Split cursor location from UserDisplayManager. (Closed)
Patch Set: Fix nits. Created 3 years, 10 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/display_manager.h ('k') | services/ui/ws/user_display_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/display_manager.cc
diff --git a/services/ui/ws/display_manager.cc b/services/ui/ws/display_manager.cc
index 199e1ae0dac2fee4da712df9b5c4f4b42f76297b..8489c4b620d09764b501536dd8ca1f7cb8a8778d 100644
--- a/services/ui/ws/display_manager.cc
+++ b/services/ui/ws/display_manager.cc
@@ -8,6 +8,7 @@
#include "base/memory/ptr_util.h"
#include "base/trace_event/trace_event.h"
+#include "services/ui/ws/cursor_location_manager.h"
#include "services/ui/ws/display.h"
#include "services/ui/ws/display_binding.h"
#include "services/ui/ws/event_dispatcher.h"
@@ -49,6 +50,15 @@ UserDisplayManager* DisplayManager::GetUserDisplayManager(
return user_display_managers_[user_id].get();
}
+CursorLocationManager* DisplayManager::GetCursorLocationManager(
+ const UserId& user_id) {
+ if (!cursor_location_managers_.count(user_id)) {
+ cursor_location_managers_[user_id] =
+ base::MakeUnique<CursorLocationManager>();
+ }
+ return cursor_location_managers_[user_id].get();
+}
+
void DisplayManager::AddDisplay(Display* display) {
DCHECK_EQ(0u, pending_displays_.count(display));
pending_displays_.insert(display);
« no previous file with comments | « services/ui/ws/display_manager.h ('k') | services/ui/ws/user_display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698