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

Unified Diff: components/mus/ws/display.cc

Issue 1770533002: Change userid from a uint32_t to a string guid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@33connector
Patch Set: . Created 4 years, 9 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 | « components/mus/ws/display.h ('k') | components/mus/ws/display_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/display.cc
diff --git a/components/mus/ws/display.cc b/components/mus/ws/display.cc
index 52d140f58b3ffc88f724990a2cb418e4422aa745..3ee54d1379325ca2927bab9c9c56c4b23859de33 100644
--- a/components/mus/ws/display.cc
+++ b/components/mus/ws/display.cc
@@ -19,6 +19,7 @@
#include "mojo/common/common_type_converters.h"
#include "mojo/converters/geometry/geometry_type_converters.h"
#include "mojo/converters/input_events/input_events_type_converters.h"
+#include "mojo/shell/public/interfaces/connector.mojom.h"
namespace mus {
namespace ws {
@@ -186,7 +187,8 @@ WindowManagerState* Display::GetFirstWindowManagerState() {
: window_manager_state_map_.begin()->second.get();
}
-WindowManagerState* Display::GetWindowManagerStateForUser(UserId user_id) {
+WindowManagerState* Display::GetWindowManagerStateForUser(
+ const UserId& user_id) {
auto iter = window_manager_state_map_.find(user_id);
return iter == window_manager_state_map_.end() ? nullptr : iter->second.get();
}
@@ -302,7 +304,8 @@ void Display::InitWindowManagersIfNecessary() {
WindowManagerState* wms = wms_ptr.get();
// For this case we never create additional WindowManagerStates, so any
// id works.
- window_manager_state_map_[0u] = std::move(wms_ptr);
+ window_manager_state_map_[mojo::shell::mojom::kRootUserID] =
+ std::move(wms_ptr);
wms->tree_ = binding_->CreateWindowTree(wms->root());
} else {
CreateWindowManagerStatesFromRegistry();
@@ -614,13 +617,13 @@ void Display::OnWindowDestroyed(ServerWindow* window) {
window->RemoveObserver(this);
}
-void Display::OnActiveUserIdChanged(UserId id) {
+void Display::OnActiveUserIdChanged(const UserId& id) {
// TODO(sky): this likely needs to cancel any pending events and all that.
}
-void Display::OnUserIdAdded(UserId id) {}
+void Display::OnUserIdAdded(const UserId& id) {}
-void Display::OnUserIdRemoved(UserId id) {
+void Display::OnUserIdRemoved(const UserId& id) {
if (binding_)
return;
« no previous file with comments | « components/mus/ws/display.h ('k') | components/mus/ws/display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698