| 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_root_window_controller_mus.h" | 5 #include "ash/mus/bridge/wm_root_window_controller_mus.h" |
| 6 | 6 |
| 7 #include "ash/common/shelf/wm_shelf.h" | 7 #include "ash/common/shelf/wm_shelf.h" |
| 8 #include "ash/mus/bridge/wm_shell_mus.h" | 8 #include "ash/mus/bridge/wm_shell_mus.h" |
| 9 #include "ash/mus/bridge/wm_window_mus.h" | 9 #include "ash/mus/bridge/wm_window_mus.h" |
| 10 #include "ash/mus/root_window_controller.h" | 10 #include "ash/mus/root_window_controller.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 } | 66 } |
| 67 | 67 |
| 68 void WmRootWindowControllerMus::MoveWindowsTo(WmWindow* dest) { | 68 void WmRootWindowControllerMus::MoveWindowsTo(WmWindow* dest) { |
| 69 WmRootWindowController::MoveWindowsTo(dest); | 69 WmRootWindowController::MoveWindowsTo(dest); |
| 70 } | 70 } |
| 71 | 71 |
| 72 bool WmRootWindowControllerMus::HasShelf() { | 72 bool WmRootWindowControllerMus::HasShelf() { |
| 73 return GetShelf() != nullptr; | 73 return GetShelf() != nullptr; |
| 74 } | 74 } |
| 75 | 75 |
| 76 WmShell* WmRootWindowControllerMus::GetShell() { | |
| 77 return shell_; | |
| 78 } | |
| 79 | |
| 80 WmShelf* WmRootWindowControllerMus::GetShelf() { | 76 WmShelf* WmRootWindowControllerMus::GetShelf() { |
| 81 return root_window_controller_->wm_shelf(); | 77 return root_window_controller_->wm_shelf(); |
| 82 } | 78 } |
| 83 | 79 |
| 84 WmWindow* WmRootWindowControllerMus::GetWindow() { | 80 WmWindow* WmRootWindowControllerMus::GetWindow() { |
| 85 return WmWindowMus::Get(root_window_controller_->root()); | 81 return WmWindowMus::Get(root_window_controller_->root()); |
| 86 } | 82 } |
| 87 | 83 |
| 88 bool WmRootWindowControllerMus::ShouldDestroyWindowInCloseChildWindows( | 84 bool WmRootWindowControllerMus::ShouldDestroyWindowInCloseChildWindows( |
| 89 WmWindow* window) { | 85 WmWindow* window) { |
| 90 aura::WindowTreeClient* window_tree_client = | 86 aura::WindowTreeClient* window_tree_client = |
| 91 root_window_controller_->window_manager()->window_tree_client(); | 87 root_window_controller_->window_manager()->window_tree_client(); |
| 92 aura::Window* aura_window = WmWindowMus::GetAuraWindow(window); | 88 aura::Window* aura_window = WmWindowMus::GetAuraWindow(window); |
| 93 aura::WindowMus* window_mus = aura::WindowMus::Get(aura_window); | 89 aura::WindowMus* window_mus = aura::WindowMus::Get(aura_window); |
| 94 return window_tree_client->WasCreatedByThisClient(window_mus) || | 90 return window_tree_client->WasCreatedByThisClient(window_mus) || |
| 95 window_tree_client->IsRoot(window_mus); | 91 window_tree_client->IsRoot(window_mus); |
| 96 } | 92 } |
| 97 | 93 |
| 98 } // namespace mus | 94 } // namespace mus |
| 99 } // namespace ash | 95 } // namespace ash |
| OLD | NEW |