| 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_shelf_aura.h" | 7 #include "ash/aura/wm_shelf_aura.h" |
| 8 #include "ash/aura/wm_shell_aura.h" | 8 #include "ash/aura/wm_shell_aura.h" |
| 9 #include "ash/aura/wm_window_aura.h" | 9 #include "ash/aura/wm_window_aura.h" |
| 10 #include "ash/common/shelf/shelf_widget.h" | 10 #include "ash/common/shelf/shelf_widget.h" |
| 11 #include "ash/display/window_tree_host_manager.h" | 11 #include "ash/display/window_tree_host_manager.h" |
| 12 #include "ash/root_window_controller.h" | 12 #include "ash/root_window_controller.h" |
| 13 #include "ash/shell.h" | 13 #include "ash/shell.h" |
| 14 #include "ui/aura/env.h" |
| 14 #include "ui/aura/window.h" | 15 #include "ui/aura/window.h" |
| 15 #include "ui/aura/window_event_dispatcher.h" | 16 #include "ui/aura/window_event_dispatcher.h" |
| 16 #include "ui/aura/window_property.h" | 17 #include "ui/aura/window_property.h" |
| 17 #include "ui/aura/window_tree_host.h" | 18 #include "ui/aura/window_tree_host.h" |
| 18 #include "ui/events/event_targeter.h" | 19 #include "ui/events/event_targeter.h" |
| 19 #include "ui/events/event_utils.h" | 20 #include "ui/events/event_utils.h" |
| 20 | 21 |
| 21 DECLARE_WINDOW_PROPERTY_TYPE(ash::WmRootWindowControllerAura*); | 22 DECLARE_WINDOW_PROPERTY_TYPE(ash::WmRootWindowControllerAura*); |
| 22 | 23 |
| 23 namespace ash { | 24 namespace ash { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 48 GetRootWindowController(window); | 49 GetRootWindowController(window); |
| 49 if (!root_window_controller) | 50 if (!root_window_controller) |
| 50 return nullptr; | 51 return nullptr; |
| 51 | 52 |
| 52 WmRootWindowControllerAura* wm_root_window_controller = | 53 WmRootWindowControllerAura* wm_root_window_controller = |
| 53 root_window_controller->GetRootWindow()->GetProperty( | 54 root_window_controller->GetRootWindow()->GetProperty( |
| 54 kWmRootWindowControllerKey); | 55 kWmRootWindowControllerKey); |
| 55 if (wm_root_window_controller) | 56 if (wm_root_window_controller) |
| 56 return wm_root_window_controller; | 57 return wm_root_window_controller; |
| 57 | 58 |
| 59 DCHECK_EQ(aura::Env::Mode::LOCAL, aura::Env::GetInstance()->mode()); |
| 58 // WmRootWindowControllerAura is owned by the RootWindowController's window. | 60 // WmRootWindowControllerAura is owned by the RootWindowController's window. |
| 59 return new WmRootWindowControllerAura(root_window_controller); | 61 return new WmRootWindowControllerAura(root_window_controller); |
| 60 } | 62 } |
| 61 | 63 |
| 62 bool WmRootWindowControllerAura::HasShelf() { | 64 bool WmRootWindowControllerAura::HasShelf() { |
| 63 return root_window_controller_->wm_shelf_aura()->shelf_widget() != nullptr; | 65 return root_window_controller_->wm_shelf_aura()->shelf_widget() != nullptr; |
| 64 } | 66 } |
| 65 | 67 |
| 66 WmShell* WmRootWindowControllerAura::GetShell() { | 68 WmShell* WmRootWindowControllerAura::GetShell() { |
| 67 return WmShell::Get(); | 69 return WmShell::Get(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 root_window_controller_->OnWallpaperAnimationFinished(widget); | 115 root_window_controller_->OnWallpaperAnimationFinished(widget); |
| 114 WmRootWindowController::OnWallpaperAnimationFinished(widget); | 116 WmRootWindowController::OnWallpaperAnimationFinished(widget); |
| 115 } | 117 } |
| 116 | 118 |
| 117 bool WmRootWindowControllerAura::ShouldDestroyWindowInCloseChildWindows( | 119 bool WmRootWindowControllerAura::ShouldDestroyWindowInCloseChildWindows( |
| 118 WmWindow* window) { | 120 WmWindow* window) { |
| 119 return WmWindowAura::GetAuraWindow(window)->owned_by_parent(); | 121 return WmWindowAura::GetAuraWindow(window)->owned_by_parent(); |
| 120 } | 122 } |
| 121 | 123 |
| 122 } // namespace ash | 124 } // namespace ash |
| OLD | NEW |