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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 return; | 494 return; |
495 } | 495 } |
496 | 496 |
497 Shell::GetInstance()->UpdateShelfVisibility(); | 497 Shell::GetInstance()->UpdateShelfVisibility(); |
498 } | 498 } |
499 | 499 |
500 void RootWindowController::UpdateShelfVisibility() { | 500 void RootWindowController::UpdateShelfVisibility() { |
501 shelf_->shelf_layout_manager()->UpdateVisibilityState(); | 501 shelf_->shelf_layout_manager()->UpdateVisibilityState(); |
502 } | 502 } |
503 | 503 |
504 const aura::Window* RootWindowController::GetFullscreenWindow() const { | 504 const aura::Window* RootWindowController::GetTopmostFullscreenWindow() const { |
505 const aura::Window* container = GetContainer(kShellWindowId_DefaultContainer); | 505 const aura::Window::Windows& windows = |
506 for (size_t i = 0; i < container->children().size(); ++i) { | 506 GetContainer(kShellWindowId_DefaultContainer)->children(); |
507 aura::Window* child = container->children()[i]; | 507 for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin(); |
508 if (wm::IsWindowFullscreen(child)) | 508 iter != windows.rend(); ++iter) { |
509 return child; | 509 if (wm::IsWindowFullscreen(*iter)) |
| 510 return *iter; |
510 } | 511 } |
511 return NULL; | 512 return NULL; |
512 } | 513 } |
513 | 514 |
514 void RootWindowController::InitKeyboard() { | 515 void RootWindowController::InitKeyboard() { |
515 if (keyboard::IsKeyboardEnabled()) { | 516 if (keyboard::IsKeyboardEnabled()) { |
516 aura::Window* parent = root_window(); | 517 aura::Window* parent = root_window(); |
517 | 518 |
518 keyboard::KeyboardControllerProxy* proxy = | 519 keyboard::KeyboardControllerProxy* proxy = |
519 Shell::GetInstance()->delegate()->CreateKeyboardControllerProxy(); | 520 Shell::GetInstance()->delegate()->CreateKeyboardControllerProxy(); |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 | 809 |
809 void RootWindowController::OnTouchHudProjectionToggled(bool enabled) { | 810 void RootWindowController::OnTouchHudProjectionToggled(bool enabled) { |
810 if (enabled) | 811 if (enabled) |
811 EnableTouchHudProjection(); | 812 EnableTouchHudProjection(); |
812 else | 813 else |
813 DisableTouchHudProjection(); | 814 DisableTouchHudProjection(); |
814 } | 815 } |
815 | 816 |
816 } // namespace internal | 817 } // namespace internal |
817 } // namespace ash | 818 } // namespace ash |
OLD | NEW |