| 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/keyboard/keyboard_ui.h" | 10 #include "ash/common/keyboard/keyboard_ui.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 WmWindow* WmShellMus::NewContainerWindow() { | 206 WmWindow* WmShellMus::NewWindow(ui::wm::WindowType window_type, |
| 207 return WmWindowMus::Get(window_tree_client()->NewWindow()); | 207 ui::LayerType layer_type) { |
| 208 WmWindowMus* window = WmWindowMus::Get(window_tree_client()->NewWindow()); |
| 209 window->set_wm_window_type(window_type); |
| 210 // TODO(sky): support layer_type. |
| 211 NOTIMPLEMENTED(); |
| 212 return window; |
| 208 } | 213 } |
| 209 | 214 |
| 210 WmWindow* WmShellMus::GetFocusedWindow() { | 215 WmWindow* WmShellMus::GetFocusedWindow() { |
| 211 return WmWindowMus::Get(window_tree_client()->GetFocusedWindow()); | 216 return WmWindowMus::Get(window_tree_client()->GetFocusedWindow()); |
| 212 } | 217 } |
| 213 | 218 |
| 214 WmWindow* WmShellMus::GetActiveWindow() { | 219 WmWindow* WmShellMus::GetActiveWindow() { |
| 215 return GetToplevelAncestor(window_tree_client()->GetFocusedWindow()); | 220 return GetToplevelAncestor(window_tree_client()->GetFocusedWindow()); |
| 216 } | 221 } |
| 217 | 222 |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 OnWindowActivated(gained_active, lost_active)); | 442 OnWindowActivated(gained_active, lost_active)); |
| 438 } | 443 } |
| 439 | 444 |
| 440 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { | 445 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { |
| 441 DCHECK_EQ(window_tree_client(), client); | 446 DCHECK_EQ(window_tree_client(), client); |
| 442 client->RemoveObserver(this); | 447 client->RemoveObserver(this); |
| 443 } | 448 } |
| 444 | 449 |
| 445 } // namespace mus | 450 } // namespace mus |
| 446 } // namespace ash | 451 } // namespace ash |
| OLD | NEW |