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

Side by Side Diff: ash/mus/window_manager_application.cc

Issue 2215133002: Change signature of OnConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: . 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 unified diff | Download patch
« no previous file with comments | « ash/mus/window_manager_application.h ('k') | ash/sysui/sysui_application.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ash/mus/window_manager_application.h" 5 #include "ash/mus/window_manager_application.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/material_design/material_design_controller.h" 9 #include "ash/common/material_design/material_design_controller.h"
10 #include "ash/mus/accelerators/accelerator_registrar_impl.h" 10 #include "ash/mus/accelerators/accelerator_registrar_impl.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 tracing_.Initialize(connector(), identity.name()); 105 tracing_.Initialize(connector(), identity.name());
106 106
107 ui::WindowTreeClient* window_tree_client = new ui::WindowTreeClient( 107 ui::WindowTreeClient* window_tree_client = new ui::WindowTreeClient(
108 window_manager_.get(), window_manager_.get(), nullptr); 108 window_manager_.get(), window_manager_.get(), nullptr);
109 window_tree_client->ConnectAsWindowManager(connector()); 109 window_tree_client->ConnectAsWindowManager(connector());
110 110
111 InitWindowManager(window_tree_client); 111 InitWindowManager(window_tree_client);
112 } 112 }
113 113
114 bool WindowManagerApplication::OnConnect(shell::Connection* connection) { 114 bool WindowManagerApplication::OnConnect(const shell::Identity& remote_identity,
115 connection->AddInterface<mojom::ShelfLayout>(this); 115 shell::InterfaceRegistry* registry) {
116 connection->AddInterface<mojom::UserWindowController>(this); 116 registry->AddInterface<mojom::ShelfLayout>(this);
117 connection->AddInterface<ui::mojom::AcceleratorRegistrar>(this); 117 registry->AddInterface<mojom::UserWindowController>(this);
118 if (connection->GetRemoteIdentity().name() == "mojo:mash_session") { 118 registry->AddInterface<ui::mojom::AcceleratorRegistrar>(this);
119 connector()->ConnectToInterface(connection->GetRemoteIdentity(), &session_); 119 if (remote_identity.name() == "mojo:mash_session") {
120 connector()->ConnectToInterface(remote_identity, &session_);
120 session_->AddScreenlockStateListener( 121 session_->AddScreenlockStateListener(
121 screenlock_state_listener_binding_.CreateInterfacePtrAndBind()); 122 screenlock_state_listener_binding_.CreateInterfacePtrAndBind());
122 } 123 }
123 return true; 124 return true;
124 } 125 }
125 126
126 void WindowManagerApplication::Create( 127 void WindowManagerApplication::Create(
127 const shell::Identity& remote_identity, 128 const shell::Identity& remote_identity,
128 mojo::InterfaceRequest<mojom::ShelfLayout> request) { 129 mojo::InterfaceRequest<mojom::ShelfLayout> request) {
129 // TODO(msw): Handle multiple shelves (one per display). 130 // TODO(msw): Handle multiple shelves (one per display).
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 RootWindowController* controller) { 199 RootWindowController* controller) {
199 // TODO(msw): this isn't right, ownership should belong in WindowManager 200 // TODO(msw): this isn't right, ownership should belong in WindowManager
200 // and/or RootWindowController. But this is temporary until we get rid of 201 // and/or RootWindowController. But this is temporary until we get rid of
201 // sysui. 202 // sysui.
202 shelf_layout_.reset(); 203 shelf_layout_.reset();
203 user_window_controller_.reset(); 204 user_window_controller_.reset();
204 } 205 }
205 206
206 } // namespace mus 207 } // namespace mus
207 } // namespace ash 208 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/window_manager_application.h ('k') | ash/sysui/sysui_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698