| 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/aura_constants.h" | 42 #include "ui/aura/client/aura_constants.h" |
| 42 #include "ui/aura/client/tooltip_client.h" | 43 #include "ui/aura/client/tooltip_client.h" |
| 43 #include "ui/aura/root_window.h" | 44 #include "ui/aura/root_window.h" |
| 44 #include "ui/aura/window.h" | 45 #include "ui/aura/window.h" |
| 45 #include "ui/aura/window_observer.h" | 46 #include "ui/aura/window_observer.h" |
| 46 #include "ui/base/models/menu_model.h" | 47 #include "ui/base/models/menu_model.h" |
| 47 #include "ui/gfx/display.h" | 48 #include "ui/gfx/display.h" |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 return; | 453 return; |
| 453 } | 454 } |
| 454 | 455 |
| 455 Shell::GetInstance()->UpdateShelfVisibility(); | 456 Shell::GetInstance()->UpdateShelfVisibility(); |
| 456 } | 457 } |
| 457 | 458 |
| 458 void RootWindowController::UpdateShelfVisibility() { | 459 void RootWindowController::UpdateShelfVisibility() { |
| 459 shelf_->shelf_layout_manager()->UpdateVisibilityState(); | 460 shelf_->shelf_layout_manager()->UpdateVisibilityState(); |
| 460 } | 461 } |
| 461 | 462 |
| 462 bool RootWindowController::IsImmersiveMode() const { | 463 aura::Window* RootWindowController::GetFullscreenWindow() const { |
| 463 aura::Window* container = workspace_controller_->GetActiveWorkspaceWindow(); | 464 aura::Window* container = workspace_controller_->GetActiveWorkspaceWindow(); |
| 464 for (size_t i = 0; i < container->children().size(); ++i) { | 465 for (size_t i = 0; i < container->children().size(); ++i) { |
| 465 aura::Window* child = container->children()[i]; | 466 aura::Window* child = container->children()[i]; |
| 466 if (child->IsVisible() && child->GetProperty(kImmersiveModeKey)) | 467 if (ash::wm::IsWindowFullscreen(child)) |
| 467 return true; | 468 return child; |
| 468 } | 469 } |
| 469 return false; | 470 return NULL; |
| 470 } | 471 } |
| 471 | 472 |
| 472 void RootWindowController::InitKeyboard() { | 473 void RootWindowController::InitKeyboard() { |
| 473 if (keyboard::IsKeyboardEnabled()) { | 474 if (keyboard::IsKeyboardEnabled()) { |
| 474 aura::Window* parent = root_window(); | 475 aura::Window* parent = root_window(); |
| 475 | 476 |
| 476 keyboard::KeyboardControllerProxy* proxy = | 477 keyboard::KeyboardControllerProxy* proxy = |
| 477 Shell::GetInstance()->delegate()->CreateKeyboardControllerProxy(); | 478 Shell::GetInstance()->delegate()->CreateKeyboardControllerProxy(); |
| 478 keyboard_controller_.reset( | 479 keyboard_controller_.reset( |
| 479 new keyboard::KeyboardController(proxy)); | 480 new keyboard::KeyboardController(proxy)); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 "OverlayContainer", | 640 "OverlayContainer", |
| 640 lock_screen_related_containers); | 641 lock_screen_related_containers); |
| 641 SetUsesScreenCoordinates(overlay_container); | 642 SetUsesScreenCoordinates(overlay_container); |
| 642 | 643 |
| 643 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, | 644 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, |
| 644 "PowerButtonAnimationContainer", root_window) ; | 645 "PowerButtonAnimationContainer", root_window) ; |
| 645 } | 646 } |
| 646 | 647 |
| 647 } // namespace internal | 648 } // namespace internal |
| 648 } // namespace ash | 649 } // namespace ash |
| OLD | NEW |