Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(976)

Unified Diff: ash/root_window_controller.cc

Issue 1923983003: Makes WorkspaceLayoutManager use ash/wm/common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix always-on-top and remove mus changes Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index c3db261b4a281c5e913d7e9a26aacead5d526227..2a8bc785774d278293cfe83f90f83aba0a7c4c94 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -25,7 +25,6 @@
#include "ash/shell_delegate.h"
#include "ash/shell_factory.h"
#include "ash/shell_window_ids.h"
-#include "ash/switchable_windows.h"
#include "ash/system/status_area_widget.h"
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/system_tray_notifier.h"
@@ -37,6 +36,8 @@
#include "ash/wm/aura/wm_shelf_aura.h"
#include "ash/wm/aura/wm_window_aura.h"
#include "ash/wm/common/dock/docked_window_layout_manager.h"
+#include "ash/wm/common/fullscreen_window_finder.h"
+#include "ash/wm/common/switchable_windows.h"
#include "ash/wm/common/window_state.h"
#include "ash/wm/common/workspace/workspace_layout_manager_delegate.h"
#include "ash/wm/lock_layout_manager.h"
@@ -623,36 +624,8 @@ void RootWindowController::UpdateShelfVisibility() {
}
aura::Window* RootWindowController::GetWindowForFullscreenMode() {
- aura::Window* topmost_window = NULL;
- aura::Window* active_window = wm::GetActiveWindow();
- if (active_window && active_window->GetRootWindow() == GetRootWindow() &&
- IsSwitchableContainer(active_window->parent())) {
- // Use the active window when it is on the current root window to determine
- // the fullscreen state to allow temporarily using a panel or docked window
- // (which are always above the default container) while a fullscreen
- // window is open. We only use the active window when in a switchable
- // container as the launcher should not exit fullscreen mode.
- topmost_window = active_window;
- } else {
- // Otherwise, use the topmost window on the root window's default container
- // when there is no active window on this root window.
- const aura::Window::Windows& windows =
- GetContainer(kShellWindowId_DefaultContainer)->children();
- for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin();
- iter != windows.rend(); ++iter) {
- if (wm::IsWindowUserPositionable(*iter) &&
- (*iter)->layer()->GetTargetVisibility()) {
- topmost_window = *iter;
- break;
- }
- }
- }
- while (topmost_window) {
- if (wm::GetWindowState(topmost_window)->IsFullscreen())
- return topmost_window;
- topmost_window = ::wm::GetTransientParent(topmost_window);
- }
- return NULL;
+ return wm::WmWindowAura::GetAuraWindow(
+ wm::GetWindowForFullscreenMode(wm::WmWindowAura::Get(GetRootWindow())));
}
void RootWindowController::ActivateKeyboard(
@@ -784,8 +757,8 @@ void RootWindowController::InitLayoutManagers() {
workspace_controller_.reset(new WorkspaceController(
default_container, base::WrapUnique(workspace_layout_manager_delegate)));
- aura::Window* always_on_top_container =
- GetContainer(kShellWindowId_AlwaysOnTopContainer);
+ wm::WmWindow* always_on_top_container =
+ wm::WmWindowAura::Get(GetContainer(kShellWindowId_AlwaysOnTopContainer));
always_on_top_controller_.reset(
new AlwaysOnTopController(always_on_top_container));
« no previous file with comments | « ash/ash.gyp ('k') | ash/shelf/shelf_layout_manager.h » ('j') | ash/shelf/shelf_layout_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698