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

Side by Side Diff: components/mus/ws/window_manager_factory_service.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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/mus/ws/window_manager_factory_service.h" 5 #include "components/mus/ws/window_manager_factory_service.h"
6 6
7 #include "components/mus/ws/connection_manager.h" 7 #include "components/mus/ws/connection_manager.h"
8 #include "components/mus/ws/window_tree.h" 8 #include "components/mus/ws/window_tree.h"
9 9
10 namespace mus { 10 namespace mus {
11 namespace ws { 11 namespace ws {
12 12
13 WindowManagerFactoryService::WindowManagerFactoryService( 13 WindowManagerFactoryService::WindowManagerFactoryService(
14 WindowManagerFactoryRegistry* registry, 14 WindowManagerFactoryRegistry* registry,
15 UserId user_id, 15 const UserId& user_id,
16 mojo::InterfaceRequest<mojom::WindowManagerFactoryService> request) 16 mojo::InterfaceRequest<mojom::WindowManagerFactoryService> request)
17 : registry_(registry), 17 : registry_(registry),
18 user_id_(user_id), 18 user_id_(user_id),
19 binding_(this, std::move(request)), 19 binding_(this, std::move(request)),
20 window_manager_factory_(nullptr) {} 20 window_manager_factory_(nullptr) {}
21 21
22 WindowManagerFactoryService::~WindowManagerFactoryService() {} 22 WindowManagerFactoryService::~WindowManagerFactoryService() {}
23 23
24 void WindowManagerFactoryService::SetWindowManagerFactory( 24 void WindowManagerFactoryService::SetWindowManagerFactory(
25 mojom::WindowManagerFactoryPtr factory) { 25 mojom::WindowManagerFactoryPtr factory) {
26 window_manager_factory_ptr_ = std::move(factory); 26 window_manager_factory_ptr_ = std::move(factory);
27 binding_.set_connection_error_handler(base::Bind( 27 binding_.set_connection_error_handler(base::Bind(
28 &WindowManagerFactoryService::OnConnectionLost, base::Unretained(this))); 28 &WindowManagerFactoryService::OnConnectionLost, base::Unretained(this)));
29 SetWindowManagerFactoryImpl(window_manager_factory_ptr_.get()); 29 SetWindowManagerFactoryImpl(window_manager_factory_ptr_.get());
30 } 30 }
31 31
32 WindowManagerFactoryService::WindowManagerFactoryService( 32 WindowManagerFactoryService::WindowManagerFactoryService(
33 WindowManagerFactoryRegistry* registry, 33 WindowManagerFactoryRegistry* registry,
34 UserId user_id) 34 const UserId& user_id)
35 : registry_(registry), 35 : registry_(registry),
36 user_id_(user_id), 36 user_id_(user_id),
37 binding_(this), 37 binding_(this),
38 window_manager_factory_(nullptr) {} 38 window_manager_factory_(nullptr) {}
39 39
40 void WindowManagerFactoryService::SetWindowManagerFactoryImpl( 40 void WindowManagerFactoryService::SetWindowManagerFactoryImpl(
41 mojom::WindowManagerFactory* factory) { 41 mojom::WindowManagerFactory* factory) {
42 DCHECK(!window_manager_factory_); 42 DCHECK(!window_manager_factory_);
43 window_manager_factory_ = factory; 43 window_manager_factory_ = factory;
44 registry_->OnWindowManagerFactorySet(this); 44 registry_->OnWindowManagerFactorySet(this);
45 } 45 }
46 46
47 void WindowManagerFactoryService::OnConnectionLost() { 47 void WindowManagerFactoryService::OnConnectionLost() {
48 registry_->OnWindowManagerFactoryConnectionLost(this); 48 registry_->OnWindowManagerFactoryConnectionLost(this);
49 } 49 }
50 50
51 } // namespace ws 51 } // namespace ws
52 } // namespace mus 52 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/window_manager_factory_service.h ('k') | components/mus/ws/window_manager_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698