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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
511 return; | 511 return; |
512 } | 512 } |
513 | 513 |
514 Shell::GetInstance()->UpdateShelfVisibility(); | 514 Shell::GetInstance()->UpdateShelfVisibility(); |
515 } | 515 } |
516 | 516 |
517 void RootWindowController::UpdateShelfVisibility() { | 517 void RootWindowController::UpdateShelfVisibility() { |
518 shelf_->shelf_layout_manager()->UpdateVisibilityState(); | 518 shelf_->shelf_layout_manager()->UpdateVisibilityState(); |
519 } | 519 } |
520 | 520 |
521 const aura::Window* RootWindowController::GetTopmostFullscreenWindow() const { | 521 const aura::Window* RootWindowController::GetTopmostFullscreenWindow() const { |
pkotwicz
2013/12/05 02:46:29
Would GetWindowForFullscreenMode() / GetFullscreen
flackr
2013/12/05 16:48:54
Sounds like a good name to me, done.
| |
522 const aura::Window::Windows& windows = | 522 const aura::Window::Windows& windows = |
523 GetContainer(kShellWindowId_DefaultContainer)->children(); | 523 GetContainer(kShellWindowId_DefaultContainer)->children(); |
524 const aura::Window* topmost_fullscreen_window = NULL; | |
pkotwicz
2013/12/05 02:46:29
Rename to |topmost_window|.
flackr
2013/12/05 16:48:54
Done.
| |
524 for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin(); | 525 for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin(); |
525 iter != windows.rend(); ++iter) { | 526 iter != windows.rend(); ++iter) { |
526 if (wm::GetWindowState(*iter)->IsFullscreen()) | 527 if ((*iter)->type() != aura::client::WINDOW_TYPE_POPUP && |
527 return *iter; | 528 (*iter)->layer()->GetTargetVisibility() && |
529 (*iter)->layer()->GetTargetOpacity() != 0.0f) { | |
pkotwicz
2013/12/05 02:46:29
I wonder whether the target opacity check is still
flackr
2013/12/05 16:48:54
Looks like this has been the case since the maximi
| |
530 topmost_fullscreen_window = *iter; | |
531 break; | |
532 } | |
533 } | |
534 while (topmost_fullscreen_window) { | |
535 if (wm::GetWindowState(topmost_fullscreen_window)->IsFullscreen()) | |
536 return topmost_fullscreen_window; | |
537 topmost_fullscreen_window = topmost_fullscreen_window->transient_parent(); | |
528 } | 538 } |
529 return NULL; | 539 return NULL; |
530 } | 540 } |
531 | 541 |
532 aura::Window* RootWindowController::GetTopmostFullscreenWindow() { | 542 aura::Window* RootWindowController::GetTopmostFullscreenWindow() { |
533 return const_cast<aura::Window*>( | 543 return const_cast<aura::Window*>( |
534 const_cast<const RootWindowController*>(this)-> | 544 const_cast<const RootWindowController*>(this)-> |
535 GetTopmostFullscreenWindow()); | 545 GetTopmostFullscreenWindow()); |
536 } | 546 } |
537 | 547 |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
929 DisableTouchHudProjection(); | 939 DisableTouchHudProjection(); |
930 } | 940 } |
931 | 941 |
932 RootWindowController* GetRootWindowController( | 942 RootWindowController* GetRootWindowController( |
933 const aura::Window* root_window) { | 943 const aura::Window* root_window) { |
934 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 944 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
935 } | 945 } |
936 | 946 |
937 } // namespace internal | 947 } // namespace internal |
938 } // namespace ash | 948 } // namespace ash |
OLD | NEW |