| 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 "mash/wm/bridge/wm_globals_mus.h" | 5 #include "mash/wm/bridge/wm_globals_mus.h" |
| 6 | 6 |
| 7 #include "ash/wm/common/window_resizer.h" | 7 #include "ash/wm/common/window_resizer.h" |
| 8 #include "ash/wm/common/wm_activation_observer.h" | 8 #include "ash/wm/common/wm_activation_observer.h" |
| 9 #include "ash/wm/common/wm_shell_window_ids.h" | 9 #include "ash/wm/common/wm_shell_window_ids.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 int64_t id) { | 64 int64_t id) { |
| 65 for (WmRootWindowControllerMus* root_window_controller : | 65 for (WmRootWindowControllerMus* root_window_controller : |
| 66 root_window_controllers_) { | 66 root_window_controllers_) { |
| 67 if (root_window_controller->GetDisplay().id() == id) | 67 if (root_window_controller->GetDisplay().id() == id) |
| 68 return root_window_controller; | 68 return root_window_controller; |
| 69 } | 69 } |
| 70 NOTREACHED(); | 70 NOTREACHED(); |
| 71 return nullptr; | 71 return nullptr; |
| 72 } | 72 } |
| 73 | 73 |
| 74 ash::wm::WmWindow* WmGlobalsMus::NewContainerWindow() { |
| 75 return WmWindowMus::Get(client_->NewWindow()); |
| 76 } |
| 77 |
| 74 ash::wm::WmWindow* WmGlobalsMus::GetFocusedWindow() { | 78 ash::wm::WmWindow* WmGlobalsMus::GetFocusedWindow() { |
| 75 return WmWindowMus::Get(client_->GetFocusedWindow()); | 79 return WmWindowMus::Get(client_->GetFocusedWindow()); |
| 76 } | 80 } |
| 77 | 81 |
| 78 ash::wm::WmWindow* WmGlobalsMus::GetActiveWindow() { | 82 ash::wm::WmWindow* WmGlobalsMus::GetActiveWindow() { |
| 79 return GetToplevelAncestor(client_->GetFocusedWindow()); | 83 return GetToplevelAncestor(client_->GetFocusedWindow()); |
| 80 } | 84 } |
| 81 | 85 |
| 82 ash::wm::WmWindow* WmGlobalsMus::GetPrimaryRootWindow() { | 86 ash::wm::WmWindow* WmGlobalsMus::GetPrimaryRootWindow() { |
| 83 return root_window_controllers_[0]->GetWindow(); | 87 return root_window_controllers_[0]->GetWindow(); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 } | 219 } |
| 216 | 220 |
| 217 void WmGlobalsMus::OnWillDestroyClient( | 221 void WmGlobalsMus::OnWillDestroyClient( |
| 218 mus::WindowTreeClient* client) { | 222 mus::WindowTreeClient* client) { |
| 219 DCHECK_EQ(client, client_); | 223 DCHECK_EQ(client, client_); |
| 220 RemoveClientObserver(); | 224 RemoveClientObserver(); |
| 221 } | 225 } |
| 222 | 226 |
| 223 } // namespace wm | 227 } // namespace wm |
| 224 } // namespace mash | 228 } // namespace mash |
| OLD | NEW |