OLD | NEW |
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 "ash/mus/bridge/wm_shell_mus.h" | 5 #include "ash/mus/bridge/wm_shell_mus.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/common/accelerators/accelerator_controller.h" | 9 #include "ash/common/accelerators/accelerator_controller.h" |
10 #include "ash/common/key_event_watcher.h" | 10 #include "ash/common/key_event_watcher.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 if (settings->display_id == id) | 164 if (settings->display_id == id) |
165 return root_window_controller; | 165 return root_window_controller; |
166 } | 166 } |
167 return nullptr; | 167 return nullptr; |
168 } | 168 } |
169 | 169 |
170 aura::WindowTreeClient* WmShellMus::window_tree_client() { | 170 aura::WindowTreeClient* WmShellMus::window_tree_client() { |
171 return window_manager_->window_tree_client(); | 171 return window_manager_->window_tree_client(); |
172 } | 172 } |
173 | 173 |
174 void WmShellMus::Initialize( | |
175 const scoped_refptr<base::SequencedWorkerPool>& pool) { | |
176 WmShell::Initialize(pool); | |
177 } | |
178 | |
179 void WmShellMus::Shutdown() { | 174 void WmShellMus::Shutdown() { |
180 WmShell::Shutdown(); | 175 WmShell::Shutdown(); |
181 | 176 |
182 window_manager_->DeleteAllRootWindowControllers(); | 177 window_manager_->DeleteAllRootWindowControllers(); |
183 } | 178 } |
184 | 179 |
185 bool WmShellMus::IsRunningInMash() const { | 180 bool WmShellMus::IsRunningInMash() const { |
186 return true; | 181 return true; |
187 } | 182 } |
188 | 183 |
189 WmWindow* WmShellMus::NewWindow(ui::wm::WindowType window_type, | |
190 ui::LayerType layer_type) { | |
191 aura::Window* window = new aura::Window(nullptr); | |
192 window->SetType(window_type); | |
193 window->Init(layer_type); | |
194 return WmWindow::Get(window); | |
195 } | |
196 | |
197 WmWindow* WmShellMus::GetFocusedWindow() { | 184 WmWindow* WmShellMus::GetFocusedWindow() { |
198 // TODO: remove as both WmShells use same implementation. | 185 // TODO: remove as both WmShells use same implementation. |
199 return WmWindow::Get( | 186 return WmWindow::Get( |
200 aura::client::GetFocusClient(Shell::GetPrimaryRootWindow()) | 187 aura::client::GetFocusClient(Shell::GetPrimaryRootWindow()) |
201 ->GetFocusedWindow()); | 188 ->GetFocusedWindow()); |
202 } | 189 } |
203 | 190 |
204 WmWindow* WmShellMus::GetActiveWindow() { | 191 WmWindow* WmShellMus::GetActiveWindow() { |
205 // TODO: remove as both WmShells use same implementation. | 192 // TODO: remove as both WmShells use same implementation. |
206 return WmWindow::Get(wm::GetActiveWindow()); | 193 return WmWindow::Get(wm::GetActiveWindow()); |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 } | 394 } |
408 | 395 |
409 void WmShellMus::CreatePrimaryHost() {} | 396 void WmShellMus::CreatePrimaryHost() {} |
410 | 397 |
411 void WmShellMus::InitHosts(const ShellInitParams& init_params) { | 398 void WmShellMus::InitHosts(const ShellInitParams& init_params) { |
412 window_manager_->CreatePrimaryRootWindowController( | 399 window_manager_->CreatePrimaryRootWindowController( |
413 base::WrapUnique(init_params.primary_window_tree_host)); | 400 base::WrapUnique(init_params.primary_window_tree_host)); |
414 } | 401 } |
415 } // namespace mus | 402 } // namespace mus |
416 } // namespace ash | 403 } // namespace ash |
OLD | NEW |