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/wm/aura/wm_root_window_controller_aura.h" | 5 #include "ash/wm/aura/wm_root_window_controller_aura.h" |
6 | 6 |
7 #include "ash/display/window_tree_host_manager.h" | 7 #include "ash/display/window_tree_host_manager.h" |
8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/shelf/shelf.h" |
| 10 #include "ash/shelf/shelf_widget.h" |
9 #include "ash/shell.h" | 11 #include "ash/shell.h" |
10 #include "ash/wm/aura/wm_globals_aura.h" | 12 #include "ash/wm/aura/wm_globals_aura.h" |
| 13 #include "ash/wm/aura/wm_shelf_aura.h" |
11 #include "ash/wm/aura/wm_window_aura.h" | 14 #include "ash/wm/aura/wm_window_aura.h" |
12 #include "ash/wm/common/wm_root_window_controller_observer.h" | 15 #include "ash/wm/common/wm_root_window_controller_observer.h" |
13 #include "ash/wm/workspace_controller.h" | 16 #include "ash/wm/workspace_controller.h" |
14 #include "ui/aura/window.h" | 17 #include "ui/aura/window.h" |
15 #include "ui/aura/window_property.h" | 18 #include "ui/aura/window_property.h" |
16 | 19 |
17 DECLARE_WINDOW_PROPERTY_TYPE(ash::wm::WmRootWindowControllerAura*); | 20 DECLARE_WINDOW_PROPERTY_TYPE(ash::wm::WmRootWindowControllerAura*); |
18 | 21 |
19 namespace ash { | 22 namespace ash { |
20 namespace wm { | 23 namespace wm { |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 } | 72 } |
70 | 73 |
71 WmGlobals* WmRootWindowControllerAura::GetGlobals() { | 74 WmGlobals* WmRootWindowControllerAura::GetGlobals() { |
72 return WmGlobalsAura::Get(); | 75 return WmGlobalsAura::Get(); |
73 } | 76 } |
74 | 77 |
75 WorkspaceWindowState WmRootWindowControllerAura::GetWorkspaceWindowState() { | 78 WorkspaceWindowState WmRootWindowControllerAura::GetWorkspaceWindowState() { |
76 return root_window_controller_->workspace_controller()->GetWindowState(); | 79 return root_window_controller_->workspace_controller()->GetWindowState(); |
77 } | 80 } |
78 | 81 |
| 82 WmShelf* WmRootWindowControllerAura::GetShelf() { |
| 83 return root_window_controller_->shelf() |
| 84 ? root_window_controller_->shelf()->shelf()->wm_shelf() |
| 85 : nullptr; |
| 86 } |
| 87 |
79 WmWindow* WmRootWindowControllerAura::GetWindow() { | 88 WmWindow* WmRootWindowControllerAura::GetWindow() { |
80 return WmWindowAura::Get(root_window_controller_->GetRootWindow()); | 89 return WmWindowAura::Get(root_window_controller_->GetRootWindow()); |
81 } | 90 } |
82 | 91 |
83 void WmRootWindowControllerAura::ConfigureWidgetInitParamsForContainer( | 92 void WmRootWindowControllerAura::ConfigureWidgetInitParamsForContainer( |
84 views::Widget* widget, | 93 views::Widget* widget, |
85 int shell_container_id, | 94 int shell_container_id, |
86 views::Widget::InitParams* init_params) { | 95 views::Widget::InitParams* init_params) { |
87 init_params->parent = Shell::GetContainer( | 96 init_params->parent = Shell::GetContainer( |
88 root_window_controller_->GetRootWindow(), shell_container_id); | 97 root_window_controller_->GetRootWindow(), shell_container_id); |
(...skipping 28 matching lines...) Expand all Loading... |
117 aura::Window* root_window) { | 126 aura::Window* root_window) { |
118 if (root_window != root_window_controller_->GetRootWindow()) | 127 if (root_window != root_window_controller_->GetRootWindow()) |
119 return; | 128 return; |
120 | 129 |
121 FOR_EACH_OBSERVER(WmRootWindowControllerObserver, observers_, | 130 FOR_EACH_OBSERVER(WmRootWindowControllerObserver, observers_, |
122 OnShelfAlignmentChanged()); | 131 OnShelfAlignmentChanged()); |
123 } | 132 } |
124 | 133 |
125 } // namespace wm | 134 } // namespace wm |
126 } // namespace ash | 135 } // namespace ash |
OLD | NEW |