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

Unified Diff: ash/wm/maximize_mode/maximize_mode_window_manager.cc

Issue 2890733005: Refactor backdrop that is currently used in the maximized mode. (Closed)
Patch Set: fix memory issue in AshTouchExplorationManager Created 3 years, 7 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/wm/maximize_mode/maximize_mode_window_manager.cc
diff --git a/ash/wm/maximize_mode/maximize_mode_window_manager.cc b/ash/wm/maximize_mode/maximize_mode_window_manager.cc
index 05b9c74c0bb0df12ad8489461996938269bd5ee4..8e7df2659d2a03b59bbce927689d3372140a931f 100644
--- a/ash/wm/maximize_mode/maximize_mode_window_manager.cc
+++ b/ash/wm/maximize_mode/maximize_mode_window_manager.cc
@@ -10,9 +10,9 @@
#include "ash/session/session_state_delegate.h"
#include "ash/shell.h"
#include "ash/shell_port.h"
+#include "ash/wm/maximize_mode/maximize_mode_backdrop_delegate_impl.h"
#include "ash/wm/maximize_mode/maximize_mode_event_handler.h"
#include "ash/wm/maximize_mode/maximize_mode_window_state.h"
-#include "ash/wm/maximize_mode/workspace_backdrop_delegate.h"
#include "ash/wm/mru_window_tracker.h"
#include "ash/wm/overview/window_selector_controller.h"
#include "ash/wm/window_state.h"
@@ -82,20 +82,10 @@ void MaximizeModeWindowManager::WindowStateDestroyed(WmWindow* window) {
}
void MaximizeModeWindowManager::OnOverviewModeStarting() {
- if (backdrops_hidden_)
- return;
-
- EnableBackdropBehindTopWindowOnEachDisplay(false);
SetDeferBoundsUpdates(true);
- backdrops_hidden_ = true;
}
void MaximizeModeWindowManager::OnOverviewModeEnded() {
- if (!backdrops_hidden_)
- return;
-
- backdrops_hidden_ = false;
- EnableBackdropBehindTopWindowOnEachDisplay(true);
SetDeferBoundsUpdates(false);
}
@@ -202,8 +192,7 @@ void MaximizeModeWindowManager::SetIgnoreWmEventsForExit() {
}
}
-MaximizeModeWindowManager::MaximizeModeWindowManager()
- : backdrops_hidden_(false) {
+MaximizeModeWindowManager::MaximizeModeWindowManager() {
// The overview mode needs to be ended before the maximize mode is started. To
// guarantee the proper order, it will be turned off from here.
CancelOverview();
@@ -310,17 +299,12 @@ bool MaximizeModeWindowManager::IsContainerWindow(aura::Window* window) {
void MaximizeModeWindowManager::EnableBackdropBehindTopWindowOnEachDisplay(
bool enable) {
- if (backdrops_hidden_)
- return;
-
// Inform the WorkspaceLayoutManager that we want to show a backdrop behind
// the topmost window of its container.
for (WmWindow* root : ShellPort::Get()->GetAllRootWindows()) {
RootWindowController* controller = root->GetRootWindowController();
- WmWindow* default_container =
- root->GetChildByShellWindowId(kShellWindowId_DefaultContainer);
- controller->workspace_controller()->SetMaximizeBackdropDelegate(
- enable ? base::MakeUnique<WorkspaceBackdropDelegate>(default_container)
+ controller->workspace_controller()->SetBackdropDelegate(
+ enable ? base::MakeUnique<MaximizeModeBackdropDelegateImpl>()
: nullptr);
}
}
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_window_manager.h ('k') | ash/wm/maximize_mode/workspace_backdrop_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698