| 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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
| 6 | 6 |
| 7 #include <queue> | 7 #include <queue> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_constants.h" | 10 #include "ash/ash_constants.h" |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 controller->Init(RootWindowController::PRIMARY, | 267 controller->Init(RootWindowController::PRIMARY, |
| 268 Shell::GetInstance()->delegate()->IsFirstRunAfterBoot()); | 268 Shell::GetInstance()->delegate()->IsFirstRunAfterBoot()); |
| 269 } | 269 } |
| 270 | 270 |
| 271 void RootWindowController::CreateForSecondaryDisplay(AshWindowTreeHost* host) { | 271 void RootWindowController::CreateForSecondaryDisplay(AshWindowTreeHost* host) { |
| 272 RootWindowController* controller = new RootWindowController(host); | 272 RootWindowController* controller = new RootWindowController(host); |
| 273 controller->Init(RootWindowController::SECONDARY, false /* first run */); | 273 controller->Init(RootWindowController::SECONDARY, false /* first run */); |
| 274 } | 274 } |
| 275 | 275 |
| 276 // static | 276 // static |
| 277 RootWindowController* RootWindowController::ForShelf( | |
| 278 const aura::Window* window) { | |
| 279 CHECK(Shell::HasInstance()); | |
| 280 return GetRootWindowController(window->GetRootWindow()); | |
| 281 } | |
| 282 | |
| 283 // static | |
| 284 RootWindowController* RootWindowController::ForWindow( | 277 RootWindowController* RootWindowController::ForWindow( |
| 285 const aura::Window* window) { | 278 const aura::Window* window) { |
| 286 CHECK(Shell::HasInstance()); | 279 CHECK(Shell::HasInstance()); |
| 287 return GetRootWindowController(window->GetRootWindow()); | 280 return GetRootWindowController(window->GetRootWindow()); |
| 288 } | 281 } |
| 289 | 282 |
| 290 // static | 283 // static |
| 291 RootWindowController* RootWindowController::ForTargetRootWindow() { | 284 RootWindowController* RootWindowController::ForTargetRootWindow() { |
| 292 CHECK(Shell::HasInstance()); | 285 CHECK(Shell::HasInstance()); |
| 293 return GetRootWindowController(Shell::GetTargetRootWindow()); | 286 return GetRootWindowController(Shell::GetTargetRootWindow()); |
| (...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1056 else | 1049 else |
| 1057 DisableTouchHudProjection(); | 1050 DisableTouchHudProjection(); |
| 1058 } | 1051 } |
| 1059 | 1052 |
| 1060 RootWindowController* GetRootWindowController( | 1053 RootWindowController* GetRootWindowController( |
| 1061 const aura::Window* root_window) { | 1054 const aura::Window* root_window) { |
| 1062 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 1055 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
| 1063 } | 1056 } |
| 1064 | 1057 |
| 1065 } // namespace ash | 1058 } // namespace ash |
| OLD | NEW |