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

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

Issue 2118083002: ShellClient -> Service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mus2
Patch Set: . Created 4 years, 5 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/mus/accelerator_registrar_impl.h" 9 #include "ash/mus/accelerator_registrar_impl.h"
10 #include "ash/mus/root_window_controller.h" 10 #include "ash/mus/root_window_controller.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 AcceleratorRegistrarImpl* registrar) { 46 AcceleratorRegistrarImpl* registrar) {
47 accelerator_registrars_.erase(registrar); 47 accelerator_registrars_.erase(registrar);
48 } 48 }
49 49
50 void WindowManagerApplication::InitWindowManager( 50 void WindowManagerApplication::InitWindowManager(
51 ::ui::WindowTreeClient* window_tree_client) { 51 ::ui::WindowTreeClient* window_tree_client) {
52 window_manager_->Init(window_tree_client); 52 window_manager_->Init(window_tree_client);
53 window_manager_->AddObserver(this); 53 window_manager_->AddObserver(this);
54 } 54 }
55 55
56 void WindowManagerApplication::Initialize(shell::Connector* connector, 56 void WindowManagerApplication::OnStart(shell::Connector* connector,
57 const shell::Identity& identity, 57 const shell::Identity& identity,
58 uint32_t id) { 58 uint32_t id) {
59 connector_ = connector; 59 connector_ = connector;
60 ::ui::GpuService::Initialize(connector); 60 ::ui::GpuService::Initialize(connector);
61 window_manager_.reset(new WindowManager(connector_)); 61 window_manager_.reset(new WindowManager(connector_));
62 62
63 aura_init_.reset(new views::AuraInit(connector_, "ash_mus_resources.pak")); 63 aura_init_.reset(new views::AuraInit(connector_, "ash_mus_resources.pak"));
64 64
65 tracing_.Initialize(connector, identity.name()); 65 tracing_.Initialize(connector, identity.name());
66 66
67 ::ui::WindowTreeClient* window_tree_client = new ::ui::WindowTreeClient( 67 ::ui::WindowTreeClient* window_tree_client = new ::ui::WindowTreeClient(
68 window_manager_.get(), window_manager_.get(), nullptr); 68 window_manager_.get(), window_manager_.get(), nullptr);
69 window_tree_client->ConnectAsWindowManager(connector); 69 window_tree_client->ConnectAsWindowManager(connector);
70 70
71 InitWindowManager(window_tree_client); 71 InitWindowManager(window_tree_client);
72 } 72 }
73 73
74 bool WindowManagerApplication::AcceptConnection(shell::Connection* connection) { 74 bool WindowManagerApplication::OnConnect(shell::Connection* connection) {
75 connection->AddInterface<mojom::ShelfLayout>(this); 75 connection->AddInterface<mojom::ShelfLayout>(this);
76 connection->AddInterface<mojom::UserWindowController>(this); 76 connection->AddInterface<mojom::UserWindowController>(this);
77 connection->AddInterface<::ui::mojom::AcceleratorRegistrar>(this); 77 connection->AddInterface<::ui::mojom::AcceleratorRegistrar>(this);
78 if (connection->GetRemoteIdentity().name() == "mojo:mash_session") { 78 if (connection->GetRemoteIdentity().name() == "mojo:mash_session") {
79 connection->GetInterface(&session_); 79 connection->GetInterface(&session_);
80 session_->AddScreenlockStateListener( 80 session_->AddScreenlockStateListener(
81 screenlock_state_listener_binding_.CreateInterfacePtrAndBind()); 81 screenlock_state_listener_binding_.CreateInterfacePtrAndBind());
82 } 82 }
83 return true; 83 return true;
84 } 84 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 RootWindowController* controller) { 160 RootWindowController* controller) {
161 // TODO(msw): this isn't right, ownership should belong in WindowManager 161 // TODO(msw): this isn't right, ownership should belong in WindowManager
162 // and/or RootWindowController. But this is temporary until we get rid of 162 // and/or RootWindowController. But this is temporary until we get rid of
163 // sysui. 163 // sysui.
164 shelf_layout_.reset(); 164 shelf_layout_.reset();
165 user_window_controller_.reset(); 165 user_window_controller_.reset();
166 } 166 }
167 167
168 } // namespace mus 168 } // namespace mus
169 } // namespace ash 169 } // 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