| 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" | |
| 8 #include "ash/aura/wm_shell_aura.h" | 7 #include "ash/aura/wm_shell_aura.h" |
| 9 #include "ash/aura/wm_window_aura.h" | 8 #include "ash/aura/wm_window_aura.h" |
| 10 #include "ash/common/shelf/shelf_widget.h" | 9 #include "ash/common/shelf/shelf_widget.h" |
| 10 #include "ash/common/shelf/wm_shelf.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/env.h" |
| 15 #include "ui/aura/window.h" | 15 #include "ui/aura/window.h" |
| 16 #include "ui/aura/window_event_dispatcher.h" | 16 #include "ui/aura/window_event_dispatcher.h" |
| 17 #include "ui/aura/window_property.h" | 17 #include "ui/aura/window_property.h" |
| 18 #include "ui/aura/window_tree_host.h" | 18 #include "ui/aura/window_tree_host.h" |
| 19 #include "ui/events/event_targeter.h" | 19 #include "ui/events/event_targeter.h" |
| 20 #include "ui/events/event_utils.h" | 20 #include "ui/events/event_utils.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 kWmRootWindowControllerKey); | 55 kWmRootWindowControllerKey); |
| 56 if (wm_root_window_controller) | 56 if (wm_root_window_controller) |
| 57 return wm_root_window_controller; | 57 return wm_root_window_controller; |
| 58 | 58 |
| 59 DCHECK_EQ(aura::Env::Mode::LOCAL, aura::Env::GetInstance()->mode()); | 59 DCHECK_EQ(aura::Env::Mode::LOCAL, aura::Env::GetInstance()->mode()); |
| 60 // WmRootWindowControllerAura is owned by the RootWindowController's window. | 60 // WmRootWindowControllerAura is owned by the RootWindowController's window. |
| 61 return new WmRootWindowControllerAura(root_window_controller); | 61 return new WmRootWindowControllerAura(root_window_controller); |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool WmRootWindowControllerAura::HasShelf() { | 64 bool WmRootWindowControllerAura::HasShelf() { |
| 65 return root_window_controller_->wm_shelf_aura()->shelf_widget() != nullptr; | 65 return root_window_controller_->wm_shelf()->shelf_widget() != nullptr; |
| 66 } | 66 } |
| 67 | 67 |
| 68 WmShell* WmRootWindowControllerAura::GetShell() { | 68 WmShell* WmRootWindowControllerAura::GetShell() { |
| 69 return WmShell::Get(); | 69 return WmShell::Get(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 WmShelf* WmRootWindowControllerAura::GetShelf() { | 72 WmShelf* WmRootWindowControllerAura::GetShelf() { |
| 73 return root_window_controller_->wm_shelf_aura(); | 73 return root_window_controller_->wm_shelf(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 WmWindow* WmRootWindowControllerAura::GetWindow() { | 76 WmWindow* WmRootWindowControllerAura::GetWindow() { |
| 77 return WmWindowAura::Get(root_window_controller_->GetRootWindow()); | 77 return WmWindowAura::Get(root_window_controller_->GetRootWindow()); |
| 78 } | 78 } |
| 79 | 79 |
| 80 void WmRootWindowControllerAura::ConfigureWidgetInitParamsForContainer( | 80 void WmRootWindowControllerAura::ConfigureWidgetInitParamsForContainer( |
| 81 views::Widget* widget, | 81 views::Widget* widget, |
| 82 int shell_container_id, | 82 int shell_container_id, |
| 83 views::Widget::InitParams* init_params) { | 83 views::Widget::InitParams* init_params) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 root_window_controller_->OnWallpaperAnimationFinished(widget); | 115 root_window_controller_->OnWallpaperAnimationFinished(widget); |
| 116 WmRootWindowController::OnWallpaperAnimationFinished(widget); | 116 WmRootWindowController::OnWallpaperAnimationFinished(widget); |
| 117 } | 117 } |
| 118 | 118 |
| 119 bool WmRootWindowControllerAura::ShouldDestroyWindowInCloseChildWindows( | 119 bool WmRootWindowControllerAura::ShouldDestroyWindowInCloseChildWindows( |
| 120 WmWindow* window) { | 120 WmWindow* window) { |
| 121 return WmWindowAura::GetAuraWindow(window)->owned_by_parent(); | 121 return WmWindowAura::GetAuraWindow(window)->owned_by_parent(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 } // namespace ash | 124 } // namespace ash |
| OLD | NEW |