| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 int64_t id) { | 196 int64_t id) { |
| 197 for (WmRootWindowControllerMus* root_window_controller : | 197 for (WmRootWindowControllerMus* root_window_controller : |
| 198 root_window_controllers_) { | 198 root_window_controllers_) { |
| 199 if (root_window_controller->GetDisplay().id() == id) | 199 if (root_window_controller->GetDisplay().id() == id) |
| 200 return root_window_controller; | 200 return root_window_controller; |
| 201 } | 201 } |
| 202 NOTREACHED(); | 202 NOTREACHED(); |
| 203 return nullptr; | 203 return nullptr; |
| 204 } | 204 } |
| 205 | 205 |
| 206 bool WmShellMus::IsRunningInMash() const { |
| 207 return true; |
| 208 } |
| 209 |
| 206 WmWindow* WmShellMus::NewWindow(ui::wm::WindowType window_type, | 210 WmWindow* WmShellMus::NewWindow(ui::wm::WindowType window_type, |
| 207 ui::LayerType layer_type) { | 211 ui::LayerType layer_type) { |
| 208 WmWindowMus* window = WmWindowMus::Get(window_tree_client()->NewWindow()); | 212 WmWindowMus* window = WmWindowMus::Get(window_tree_client()->NewWindow()); |
| 209 window->set_wm_window_type(window_type); | 213 window->set_wm_window_type(window_type); |
| 210 // TODO(sky): support layer_type. | 214 // TODO(sky): support layer_type. |
| 211 NOTIMPLEMENTED(); | 215 NOTIMPLEMENTED(); |
| 212 return window; | 216 return window; |
| 213 } | 217 } |
| 214 | 218 |
| 215 WmWindow* WmShellMus::GetFocusedWindow() { | 219 WmWindow* WmShellMus::GetFocusedWindow() { |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 OnWindowActivated(gained_active, lost_active)); | 461 OnWindowActivated(gained_active, lost_active)); |
| 458 } | 462 } |
| 459 | 463 |
| 460 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { | 464 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { |
| 461 DCHECK_EQ(window_tree_client(), client); | 465 DCHECK_EQ(window_tree_client(), client); |
| 462 client->RemoveObserver(this); | 466 client->RemoveObserver(this); |
| 463 } | 467 } |
| 464 | 468 |
| 465 } // namespace mus | 469 } // namespace mus |
| 466 } // namespace ash | 470 } // namespace ash |
| OLD | NEW |