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

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

Issue 2271373002: mash: Port mojo:ash_sysui's ContextMenuMus to mojo:ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 3 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/root_window_controller.cc » ('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"
11 #include "ash/mus/native_widget_factory_mus.h"
11 #include "ash/mus/window_manager.h" 12 #include "ash/mus/window_manager.h"
12 #include "base/bind.h" 13 #include "base/bind.h"
13 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
14 #include "services/shell/public/cpp/connection.h" 15 #include "services/shell/public/cpp/connection.h"
15 #include "services/shell/public/cpp/connector.h" 16 #include "services/shell/public/cpp/connector.h"
16 #include "services/tracing/public/cpp/provider.h" 17 #include "services/tracing/public/cpp/provider.h"
17 #include "services/ui/common/event_matcher_util.h" 18 #include "services/ui/common/event_matcher_util.h"
18 #include "services/ui/public/cpp/gpu_service.h" 19 #include "services/ui/public/cpp/gpu_service.h"
19 #include "services/ui/public/cpp/window.h" 20 #include "services/ui/public/cpp/window.h"
20 #include "services/ui/public/cpp/window_tree_client.h" 21 #include "services/ui/public/cpp/window_tree_client.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 window_manager_.reset(new WindowManager(connector())); 104 window_manager_.reset(new WindowManager(connector()));
104 105
105 MaterialDesignController::Initialize(); 106 MaterialDesignController::Initialize();
106 107
107 tracing_.Initialize(connector(), identity.name()); 108 tracing_.Initialize(connector(), identity.name());
108 109
109 ui::WindowTreeClient* window_tree_client = new ui::WindowTreeClient( 110 ui::WindowTreeClient* window_tree_client = new ui::WindowTreeClient(
110 window_manager_.get(), window_manager_.get(), nullptr); 111 window_manager_.get(), window_manager_.get(), nullptr);
111 window_tree_client->ConnectAsWindowManager(connector()); 112 window_tree_client->ConnectAsWindowManager(connector());
112 113
114 native_widget_factory_mus_.reset(
115 new NativeWidgetFactoryMus(window_manager_.get()));
116
113 InitWindowManager(window_tree_client); 117 InitWindowManager(window_tree_client);
114 } 118 }
115 119
116 bool WindowManagerApplication::OnConnect(const shell::Identity& remote_identity, 120 bool WindowManagerApplication::OnConnect(const shell::Identity& remote_identity,
117 shell::InterfaceRegistry* registry) { 121 shell::InterfaceRegistry* registry) {
118 registry->AddInterface<ui::mojom::AcceleratorRegistrar>(this); 122 registry->AddInterface<ui::mojom::AcceleratorRegistrar>(this);
119 if (remote_identity.name() == "mojo:mash_session") { 123 if (remote_identity.name() == "mojo:mash_session") {
120 connector()->ConnectToInterface(remote_identity, &session_); 124 connector()->ConnectToInterface(remote_identity, &session_);
121 session_->AddScreenlockStateListener( 125 session_->AddScreenlockStateListener(
122 screenlock_state_listener_binding_.CreateInterfacePtrAndBind()); 126 screenlock_state_listener_binding_.CreateInterfacePtrAndBind());
(...skipping 19 matching lines...) Expand all
142 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed, 146 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed,
143 base::Unretained(this)))); 147 base::Unretained(this))));
144 } 148 }
145 149
146 void WindowManagerApplication::ScreenlockStateChanged(bool locked) { 150 void WindowManagerApplication::ScreenlockStateChanged(bool locked) {
147 window_manager_->SetScreenLocked(locked); 151 window_manager_->SetScreenLocked(locked);
148 } 152 }
149 153
150 } // namespace mus 154 } // namespace mus
151 } // namespace ash 155 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/window_manager_application.h ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698