| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 249 |
| 250 // static | 250 // static |
| 251 RootWindowController* RootWindowController::ForTargetRootWindow() { | 251 RootWindowController* RootWindowController::ForTargetRootWindow() { |
| 252 return internal::GetRootWindowController(Shell::GetTargetRootWindow()); | 252 return internal::GetRootWindowController(Shell::GetTargetRootWindow()); |
| 253 } | 253 } |
| 254 | 254 |
| 255 // static | 255 // static |
| 256 aura::Window* RootWindowController::GetContainerForWindow( | 256 aura::Window* RootWindowController::GetContainerForWindow( |
| 257 aura::Window* window) { | 257 aura::Window* window) { |
| 258 aura::Window* container = window->parent(); | 258 aura::Window* container = window->parent(); |
| 259 while (container && container->type() != aura::client::WINDOW_TYPE_UNKNOWN) | 259 while (container && container->type() != ui::wm::WINDOW_TYPE_UNKNOWN) |
| 260 container = container->parent(); | 260 container = container->parent(); |
| 261 return container; | 261 return container; |
| 262 } | 262 } |
| 263 | 263 |
| 264 RootWindowController::~RootWindowController() { | 264 RootWindowController::~RootWindowController() { |
| 265 Shutdown(); | 265 Shutdown(); |
| 266 root_window_.reset(); | 266 root_window_.reset(); |
| 267 // The CaptureClient needs to be around for as long as the RootWindow is | 267 // The CaptureClient needs to be around for as long as the RootWindow is |
| 268 // valid. | 268 // valid. |
| 269 capture_client_.reset(); | 269 capture_client_.reset(); |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 void RootWindowController::UpdateShelfVisibility() { | 527 void RootWindowController::UpdateShelfVisibility() { |
| 528 shelf_->shelf_layout_manager()->UpdateVisibilityState(); | 528 shelf_->shelf_layout_manager()->UpdateVisibilityState(); |
| 529 } | 529 } |
| 530 | 530 |
| 531 const aura::Window* RootWindowController::GetWindowForFullscreenMode() const { | 531 const aura::Window* RootWindowController::GetWindowForFullscreenMode() const { |
| 532 const aura::Window::Windows& windows = | 532 const aura::Window::Windows& windows = |
| 533 GetContainer(kShellWindowId_DefaultContainer)->children(); | 533 GetContainer(kShellWindowId_DefaultContainer)->children(); |
| 534 const aura::Window* topmost_window = NULL; | 534 const aura::Window* topmost_window = NULL; |
| 535 for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin(); | 535 for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin(); |
| 536 iter != windows.rend(); ++iter) { | 536 iter != windows.rend(); ++iter) { |
| 537 if (((*iter)->type() == aura::client::WINDOW_TYPE_NORMAL || | 537 if (((*iter)->type() == ui::wm::WINDOW_TYPE_NORMAL || |
| 538 (*iter)->type() == aura::client::WINDOW_TYPE_PANEL) && | 538 (*iter)->type() == ui::wm::WINDOW_TYPE_PANEL) && |
| 539 (*iter)->layer()->GetTargetVisibility()) { | 539 (*iter)->layer()->GetTargetVisibility()) { |
| 540 topmost_window = *iter; | 540 topmost_window = *iter; |
| 541 break; | 541 break; |
| 542 } | 542 } |
| 543 } | 543 } |
| 544 while (topmost_window) { | 544 while (topmost_window) { |
| 545 if (wm::GetWindowState(topmost_window)->IsFullscreen()) | 545 if (wm::GetWindowState(topmost_window)->IsFullscreen()) |
| 546 return topmost_window; | 546 return topmost_window; |
| 547 topmost_window = topmost_window->transient_parent(); | 547 topmost_window = topmost_window->transient_parent(); |
| 548 } | 548 } |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 DisableTouchHudProjection(); | 943 DisableTouchHudProjection(); |
| 944 } | 944 } |
| 945 | 945 |
| 946 RootWindowController* GetRootWindowController( | 946 RootWindowController* GetRootWindowController( |
| 947 const aura::Window* root_window) { | 947 const aura::Window* root_window) { |
| 948 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 948 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
| 949 } | 949 } |
| 950 | 950 |
| 951 } // namespace internal | 951 } // namespace internal |
| 952 } // namespace ash | 952 } // namespace ash |
| OLD | NEW |