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

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

Issue 2103913003: Converts MaximizeModeWindowManager to use ash/common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@maximize_mode_event_handler
Patch Set: fix chrome Created 4 years, 6 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.h
diff --git a/ash/wm/maximize_mode/maximize_mode_window_manager.h b/ash/wm/maximize_mode/maximize_mode_window_manager.h
index ab3173f26f5a2eb1ba4b4bb47ed762c60f9984d6..eb0839fad11d9b6a276bb420d39f127dfc289c79 100644
--- a/ash/wm/maximize_mode/maximize_mode_window_manager.h
+++ b/ash/wm/maximize_mode/maximize_mode_window_manager.h
@@ -13,15 +13,13 @@
#include "ash/ash_export.h"
#include "ash/common/shell_observer.h"
#include "ash/common/wm/window_state.h"
-#include "base/compiler_specific.h"
+#include "ash/common/wm_window_observer.h"
#include "base/macros.h"
-#include "ui/aura/window_observer.h"
#include "ui/display/display_observer.h"
namespace ash {
class MaximizeModeController;
class MaximizeModeWindowState;
-class WmWindow;
namespace wm {
class MaximizeModeEventHandler;
@@ -33,7 +31,7 @@ class MaximizeModeEventHandler;
// behind the window so that no other windows are visible and/or obscured.
// With the destruction of the manager all windows will be restored to their
// original state.
-class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver,
+class ASH_EXPORT MaximizeModeWindowManager : public WmWindowObserver,
public display::DisplayObserver,
public ShellObserver {
public:
@@ -47,22 +45,22 @@ class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver,
// managers for windows which needs to get tracked due to (upcoming) state
// changes.
// The call gets ignored if the window was already or should not be handled.
- void AddWindow(aura::Window* window);
+ void AddWindow(WmWindow* window);
// Called from a window state object when it gets destroyed.
- void WindowStateDestroyed(WmWindow* wm_window);
+ void WindowStateDestroyed(WmWindow* window);
// ShellObserver overrides:
void OnOverviewModeStarting() override;
void OnOverviewModeEnded() override;
// Overridden from WindowObserver:
- void OnWindowDestroying(aura::Window* window) override;
- void OnWindowAdded(aura::Window* window) override;
- void OnWindowPropertyChanged(aura::Window* window,
- const void* key,
- intptr_t old) override;
- void OnWindowBoundsChanged(aura::Window* window,
+ void OnWindowDestroying(WmWindow* window) override;
+ void OnWindowTreeChanged(WmWindow* window,
+ const TreeChangeParams& params) override;
+ void OnWindowPropertyChanged(WmWindow* window,
+ WmWindowProperty window_property) override;
+ void OnWindowBoundsChanged(WmWindow* window,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) override;
@@ -79,7 +77,7 @@ class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver,
MaximizeModeWindowManager();
private:
- typedef std::map<aura::Window*, MaximizeModeWindowState*> WindowToState;
+ using WindowToState = std::map<WmWindow*, MaximizeModeWindowState*>;
// Maximize all windows and restore their current state.
void MaximizeAllWindows();
@@ -96,13 +94,13 @@ class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver,
// state).
// Note: If the given window cannot be handled by us the function will return
// immediately.
- void MaximizeAndTrackWindow(aura::Window* window);
+ void MaximizeAndTrackWindow(WmWindow* window);
// Remove a window from our tracking list.
- void ForgetWindow(aura::Window* window);
+ void ForgetWindow(WmWindow* window);
// Returns true when the given window should be modified in any way by us.
- bool ShouldHandleWindow(aura::Window* window);
+ bool ShouldHandleWindow(WmWindow* window);
// Add window creation observers to track creation of new windows.
void AddWindowCreationObservers();
@@ -115,7 +113,7 @@ class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver,
void DisplayConfigurationChanged();
// Returns true when the |window| is a container window.
- bool IsContainerWindow(aura::Window* window);
+ bool IsContainerWindow(WmWindow* window);
// Add a backdrop behind the currently active window on each desktop.
void EnableBackdropBehindTopWindowOnEachDisplay(bool enable);
@@ -124,7 +122,7 @@ class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver,
WindowToState window_state_map_;
// All container windows which have to be tracked.
- std::set<aura::Window*> observed_container_windows_;
+ std::set<WmWindow*> observed_container_windows_;
// True if all backdrops are hidden.
bool backdrops_hidden_;
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_controller.cc ('k') | ash/wm/maximize_mode/maximize_mode_window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698