| 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_constants.h" | 9 #include "ash/ash_constants.h" |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 bool RootWindowController::IsImmersiveMode() const { | 484 bool RootWindowController::IsImmersiveMode() const { |
| 485 aura::Window* container = workspace_controller_->GetActiveWorkspaceWindow(); | 485 aura::Window* container = workspace_controller_->GetActiveWorkspaceWindow(); |
| 486 for (size_t i = 0; i < container->children().size(); ++i) { | 486 for (size_t i = 0; i < container->children().size(); ++i) { |
| 487 aura::Window* child = container->children()[i]; | 487 aura::Window* child = container->children()[i]; |
| 488 if (child->IsVisible() && child->GetProperty(kImmersiveModeKey)) | 488 if (child->IsVisible() && child->GetProperty(kImmersiveModeKey)) |
| 489 return true; | 489 return true; |
| 490 } | 490 } |
| 491 return false; | 491 return false; |
| 492 } | 492 } |
| 493 | 493 |
| 494 void RootWindowController::SetPendingImmersiveGesture(bool value) { |
| 495 aura::Window* container = workspace_controller_->GetActiveWorkspaceWindow(); |
| 496 for (size_t i = 0; i < container->children().size(); ++i) { |
| 497 aura::Window* child = container->children()[i]; |
| 498 if (child->IsVisible() && child->GetProperty(kImmersiveModeKey)) { |
| 499 child->SetProperty(kPendingImmersiveGestureKey, value); |
| 500 return; |
| 501 } |
| 502 } |
| 503 } |
| 504 |
| 494 //////////////////////////////////////////////////////////////////////////////// | 505 //////////////////////////////////////////////////////////////////////////////// |
| 495 // RootWindowController, private: | 506 // RootWindowController, private: |
| 496 | 507 |
| 497 void RootWindowController::CreateContainersInRootWindow( | 508 void RootWindowController::CreateContainersInRootWindow( |
| 498 aura::RootWindow* root_window) { | 509 aura::RootWindow* root_window) { |
| 499 // These containers are just used by PowerButtonController to animate groups | 510 // These containers are just used by PowerButtonController to animate groups |
| 500 // of containers simultaneously without messing up the current transformations | 511 // of containers simultaneously without messing up the current transformations |
| 501 // on those containers. These are direct children of the root window; all of | 512 // on those containers. These are direct children of the root window; all of |
| 502 // the other containers are their children. | 513 // the other containers are their children. |
| 503 | 514 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 "OverlayContainer", | 656 "OverlayContainer", |
| 646 lock_screen_related_containers); | 657 lock_screen_related_containers); |
| 647 SetUsesScreenCoordinates(overlay_container); | 658 SetUsesScreenCoordinates(overlay_container); |
| 648 | 659 |
| 649 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, | 660 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, |
| 650 "PowerButtonAnimationContainer", root_window) ; | 661 "PowerButtonAnimationContainer", root_window) ; |
| 651 } | 662 } |
| 652 | 663 |
| 653 } // namespace internal | 664 } // namespace internal |
| 654 } // namespace ash | 665 } // namespace ash |
| OLD | NEW |