| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/desktop_background/desktop_background_widget_controller.h" | 10 #include "ash/desktop_background/desktop_background_widget_controller.h" |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 } | 505 } |
| 506 | 506 |
| 507 bool RootWindowController::SetShelfAlignment(ShelfAlignment alignment) { | 507 bool RootWindowController::SetShelfAlignment(ShelfAlignment alignment) { |
| 508 return shelf_->SetAlignment(alignment); | 508 return shelf_->SetAlignment(alignment); |
| 509 } | 509 } |
| 510 | 510 |
| 511 ShelfAlignment RootWindowController::GetShelfAlignment() { | 511 ShelfAlignment RootWindowController::GetShelfAlignment() { |
| 512 return shelf_->GetAlignment(); | 512 return shelf_->GetAlignment(); |
| 513 } | 513 } |
| 514 | 514 |
| 515 bool RootWindowController::IsImmersiveMode() const { |
| 516 aura::Window* container = workspace_controller_->GetActiveWorkspaceWindow(); |
| 517 for (size_t i = 0; i < container->children().size(); ++i) { |
| 518 aura::Window* child = container->children()[i]; |
| 519 if (child->IsVisible() && child->GetProperty(kImmersiveModeKey)) |
| 520 return true; |
| 521 } |
| 522 return false; |
| 523 } |
| 524 |
| 515 //////////////////////////////////////////////////////////////////////////////// | 525 //////////////////////////////////////////////////////////////////////////////// |
| 516 // RootWindowController, private: | 526 // RootWindowController, private: |
| 517 | 527 |
| 518 void RootWindowController::CreateContainersInRootWindow( | 528 void RootWindowController::CreateContainersInRootWindow( |
| 519 aura::RootWindow* root_window) { | 529 aura::RootWindow* root_window) { |
| 520 // These containers are just used by PowerButtonController to animate groups | 530 // These containers are just used by PowerButtonController to animate groups |
| 521 // of containers simultaneously without messing up the current transformations | 531 // of containers simultaneously without messing up the current transformations |
| 522 // on those containers. These are direct children of the root window; all of | 532 // on those containers. These are direct children of the root window; all of |
| 523 // the other containers are their children. | 533 // the other containers are their children. |
| 524 | 534 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 "OverlayContainer", | 676 "OverlayContainer", |
| 667 lock_screen_related_containers); | 677 lock_screen_related_containers); |
| 668 SetUsesScreenCoordinates(overlay_container); | 678 SetUsesScreenCoordinates(overlay_container); |
| 669 | 679 |
| 670 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, | 680 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, |
| 671 "PowerButtonAnimationContainer", root_window) ; | 681 "PowerButtonAnimationContainer", root_window) ; |
| 672 } | 682 } |
| 673 | 683 |
| 674 } // namespace internal | 684 } // namespace internal |
| 675 } // namespace ash | 685 } // namespace ash |
| OLD | NEW |