OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/stacking_controller.h" | 5 #include "ash/wm/stacking_controller.h" |
6 | 6 |
7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/wm/always_on_top_controller.h" | 10 #include "ash/wm/always_on_top_controller.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 } else { | 134 } else { |
135 container = GetContainerById( | 135 container = GetContainerById( |
136 root, internal::kShellWindowId_LockSystemModalContainer); | 136 root, internal::kShellWindowId_LockSystemModalContainer); |
137 } | 137 } |
138 | 138 |
139 return container; | 139 return container; |
140 } | 140 } |
141 | 141 |
142 // TODO(oshima): Remove this once extended desktop is on by default. | 142 // TODO(oshima): Remove this once extended desktop is on by default. |
143 internal::AlwaysOnTopController* | 143 internal::AlwaysOnTopController* |
144 StackingController::GetAlwaysOnTopController( | 144 StackingController::GetAlwaysOnTopController(aura::RootWindow* root_window) { |
145 aura::RootWindow* root_window) { | |
146 internal::AlwaysOnTopController* controller = | 145 internal::AlwaysOnTopController* controller = |
147 root_window->GetProperty(internal::kAlwaysOnTopControllerKey); | 146 root_window->GetProperty(internal::kAlwaysOnTopControllerKey); |
148 if (!controller) { | 147 if (!controller) { |
149 controller = new internal::AlwaysOnTopController; | 148 controller = new internal::AlwaysOnTopController; |
150 controller->SetContainers( | 149 controller->SetContainers( |
151 root_window->GetChildById(internal::kShellWindowId_DefaultContainer), | 150 root_window->GetChildById(internal::kShellWindowId_DefaultContainer), |
152 root_window->GetChildById( | 151 root_window->GetChildById( |
153 internal::kShellWindowId_AlwaysOnTopContainer)); | 152 internal::kShellWindowId_AlwaysOnTopContainer)); |
154 // RootWindow owns the AlwaysOnTopController object. | 153 // RootWindow owns the AlwaysOnTopController object. |
155 root_window->SetProperty(kAlwaysOnTopControllerKey, controller); | 154 root_window->SetProperty(kAlwaysOnTopControllerKey, controller); |
156 } | 155 } |
157 return controller; | 156 return controller; |
158 } | 157 } |
159 | 158 |
160 } // namespace internal | 159 } // namespace internal |
161 } // namespace ash | 160 } // namespace ash |
OLD | NEW |