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 17 matching lines...) Expand all Loading... |
28 #include "ash/wm/panels/panel_layout_manager.h" | 28 #include "ash/wm/panels/panel_layout_manager.h" |
29 #include "ash/wm/property_util.h" | 29 #include "ash/wm/property_util.h" |
30 #include "ash/wm/root_window_layout_manager.h" | 30 #include "ash/wm/root_window_layout_manager.h" |
31 #include "ash/wm/screen_dimmer.h" | 31 #include "ash/wm/screen_dimmer.h" |
32 #include "ash/wm/stacking_controller.h" | 32 #include "ash/wm/stacking_controller.h" |
33 #include "ash/wm/status_area_layout_manager.h" | 33 #include "ash/wm/status_area_layout_manager.h" |
34 #include "ash/wm/system_background_controller.h" | 34 #include "ash/wm/system_background_controller.h" |
35 #include "ash/wm/system_modal_container_layout_manager.h" | 35 #include "ash/wm/system_modal_container_layout_manager.h" |
36 #include "ash/wm/toplevel_window_event_handler.h" | 36 #include "ash/wm/toplevel_window_event_handler.h" |
37 #include "ash/wm/window_properties.h" | 37 #include "ash/wm/window_properties.h" |
| 38 #include "ash/wm/window_util.h" |
38 #include "ash/wm/workspace_controller.h" | 39 #include "ash/wm/workspace_controller.h" |
39 #include "base/command_line.h" | 40 #include "base/command_line.h" |
40 #include "base/time.h" | 41 #include "base/time.h" |
41 #include "ui/aura/client/activation_client.h" | 42 #include "ui/aura/client/activation_client.h" |
42 #include "ui/aura/client/aura_constants.h" | 43 #include "ui/aura/client/aura_constants.h" |
43 #include "ui/aura/client/capture_client.h" | 44 #include "ui/aura/client/capture_client.h" |
44 #include "ui/aura/client/focus_client.h" | 45 #include "ui/aura/client/focus_client.h" |
45 #include "ui/aura/client/tooltip_client.h" | 46 #include "ui/aura/client/tooltip_client.h" |
46 #include "ui/aura/root_window.h" | 47 #include "ui/aura/root_window.h" |
47 #include "ui/aura/window.h" | 48 #include "ui/aura/window.h" |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 return; | 485 return; |
485 } | 486 } |
486 | 487 |
487 Shell::GetInstance()->UpdateShelfVisibility(); | 488 Shell::GetInstance()->UpdateShelfVisibility(); |
488 } | 489 } |
489 | 490 |
490 void RootWindowController::UpdateShelfVisibility() { | 491 void RootWindowController::UpdateShelfVisibility() { |
491 shelf_->shelf_layout_manager()->UpdateVisibilityState(); | 492 shelf_->shelf_layout_manager()->UpdateVisibilityState(); |
492 } | 493 } |
493 | 494 |
494 bool RootWindowController::IsImmersiveMode() const { | 495 aura::Window* RootWindowController::GetFullscreenWindow() const { |
495 aura::Window* container = workspace_controller_->GetActiveWorkspaceWindow(); | 496 aura::Window* container = workspace_controller_->GetActiveWorkspaceWindow(); |
496 for (size_t i = 0; i < container->children().size(); ++i) { | 497 for (size_t i = 0; i < container->children().size(); ++i) { |
497 aura::Window* child = container->children()[i]; | 498 aura::Window* child = container->children()[i]; |
498 if (child->IsVisible() && child->GetProperty(kImmersiveModeKey)) | 499 if (ash::wm::IsWindowFullscreen(child)) |
499 return true; | 500 return child; |
500 } | 501 } |
501 return false; | 502 return NULL; |
502 } | 503 } |
503 | 504 |
504 void RootWindowController::InitKeyboard() { | 505 void RootWindowController::InitKeyboard() { |
505 if (keyboard::IsKeyboardEnabled()) { | 506 if (keyboard::IsKeyboardEnabled()) { |
506 aura::Window* parent = root_window(); | 507 aura::Window* parent = root_window(); |
507 | 508 |
508 keyboard::KeyboardControllerProxy* proxy = | 509 keyboard::KeyboardControllerProxy* proxy = |
509 Shell::GetInstance()->delegate()->CreateKeyboardControllerProxy(); | 510 Shell::GetInstance()->delegate()->CreateKeyboardControllerProxy(); |
510 keyboard_controller_.reset( | 511 keyboard_controller_.reset( |
511 new keyboard::KeyboardController(proxy)); | 512 new keyboard::KeyboardController(proxy)); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 "OverlayContainer", | 672 "OverlayContainer", |
672 lock_screen_related_containers); | 673 lock_screen_related_containers); |
673 SetUsesScreenCoordinates(overlay_container); | 674 SetUsesScreenCoordinates(overlay_container); |
674 | 675 |
675 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, | 676 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, |
676 "PowerButtonAnimationContainer", root_window) ; | 677 "PowerButtonAnimationContainer", root_window) ; |
677 } | 678 } |
678 | 679 |
679 } // namespace internal | 680 } // namespace internal |
680 } // namespace ash | 681 } // namespace ash |
OLD | NEW |