| 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/aura/wm_root_window_controller_aura.h" | 5 #include "ash/aura/wm_root_window_controller_aura.h" |
| 6 | 6 |
| 7 #include "ash/aura/wm_shell_aura.h" | |
| 8 #include "ash/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
| 9 #include "ash/common/shelf/shelf_widget.h" | 8 #include "ash/common/shelf/shelf_widget.h" |
| 10 #include "ash/common/shelf/wm_shelf.h" | 9 #include "ash/common/shelf/wm_shelf.h" |
| 11 #include "ash/display/window_tree_host_manager.h" | 10 #include "ash/display/window_tree_host_manager.h" |
| 12 #include "ash/root_window_controller.h" | 11 #include "ash/root_window_controller.h" |
| 13 #include "ash/shell.h" | 12 #include "ash/shell.h" |
| 14 #include "ui/aura/env.h" | 13 #include "ui/aura/env.h" |
| 15 #include "ui/aura/window.h" | 14 #include "ui/aura/window.h" |
| 16 #include "ui/aura/window_property.h" | 15 #include "ui/aura/window_property.h" |
| 17 | 16 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 53 |
| 55 DCHECK_EQ(aura::Env::Mode::LOCAL, aura::Env::GetInstance()->mode()); | 54 DCHECK_EQ(aura::Env::Mode::LOCAL, aura::Env::GetInstance()->mode()); |
| 56 // WmRootWindowControllerAura is owned by the RootWindowController's window. | 55 // WmRootWindowControllerAura is owned by the RootWindowController's window. |
| 57 return new WmRootWindowControllerAura(root_window_controller); | 56 return new WmRootWindowControllerAura(root_window_controller); |
| 58 } | 57 } |
| 59 | 58 |
| 60 bool WmRootWindowControllerAura::HasShelf() { | 59 bool WmRootWindowControllerAura::HasShelf() { |
| 61 return root_window_controller_->wm_shelf()->shelf_widget() != nullptr; | 60 return root_window_controller_->wm_shelf()->shelf_widget() != nullptr; |
| 62 } | 61 } |
| 63 | 62 |
| 64 WmShell* WmRootWindowControllerAura::GetShell() { | |
| 65 return WmShell::Get(); | |
| 66 } | |
| 67 | |
| 68 WmShelf* WmRootWindowControllerAura::GetShelf() { | 63 WmShelf* WmRootWindowControllerAura::GetShelf() { |
| 69 return root_window_controller_->wm_shelf(); | 64 return root_window_controller_->wm_shelf(); |
| 70 } | 65 } |
| 71 | 66 |
| 72 WmWindow* WmRootWindowControllerAura::GetWindow() { | 67 WmWindow* WmRootWindowControllerAura::GetWindow() { |
| 73 return WmWindowAura::Get(root_window_controller_->GetRootWindow()); | 68 return WmWindowAura::Get(root_window_controller_->GetRootWindow()); |
| 74 } | 69 } |
| 75 | 70 |
| 76 void WmRootWindowControllerAura::OnInitialWallpaperAnimationStarted() { | 71 void WmRootWindowControllerAura::OnInitialWallpaperAnimationStarted() { |
| 77 root_window_controller_->OnInitialWallpaperAnimationStarted(); | 72 root_window_controller_->OnInitialWallpaperAnimationStarted(); |
| 78 WmRootWindowController::OnInitialWallpaperAnimationStarted(); | 73 WmRootWindowController::OnInitialWallpaperAnimationStarted(); |
| 79 } | 74 } |
| 80 | 75 |
| 81 void WmRootWindowControllerAura::OnWallpaperAnimationFinished( | 76 void WmRootWindowControllerAura::OnWallpaperAnimationFinished( |
| 82 views::Widget* widget) { | 77 views::Widget* widget) { |
| 83 root_window_controller_->OnWallpaperAnimationFinished(widget); | 78 root_window_controller_->OnWallpaperAnimationFinished(widget); |
| 84 WmRootWindowController::OnWallpaperAnimationFinished(widget); | 79 WmRootWindowController::OnWallpaperAnimationFinished(widget); |
| 85 } | 80 } |
| 86 | 81 |
| 87 bool WmRootWindowControllerAura::ShouldDestroyWindowInCloseChildWindows( | 82 bool WmRootWindowControllerAura::ShouldDestroyWindowInCloseChildWindows( |
| 88 WmWindow* window) { | 83 WmWindow* window) { |
| 89 return WmWindowAura::GetAuraWindow(window)->owned_by_parent(); | 84 return WmWindowAura::GetAuraWindow(window)->owned_by_parent(); |
| 90 } | 85 } |
| 91 | 86 |
| 92 } // namespace ash | 87 } // namespace ash |
| OLD | NEW |