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

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

Issue 2106823004: Refactors maximize mode event handling into its own class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup 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 67de5b5095b7d289ee2a2ee6bae164a19295f0aa..ab3173f26f5a2eb1ba4b4bb47ed762c60f9984d6 100644
--- a/ash/wm/maximize_mode/maximize_mode_window_manager.h
+++ b/ash/wm/maximize_mode/maximize_mode_window_manager.h
@@ -17,17 +17,16 @@
#include "base/macros.h"
#include "ui/aura/window_observer.h"
#include "ui/display/display_observer.h"
-#include "ui/events/event_handler.h"
-
-namespace ui {
-class TouchEvent;
-}
namespace ash {
class MaximizeModeController;
class MaximizeModeWindowState;
class WmWindow;
+namespace wm {
+class MaximizeModeEventHandler;
+}
+
// A window manager which - when created - will force all windows into maximized
// mode. Exception are panels and windows which cannot be maximized.
// Windows which cannot be maximized / resized are centered with a layer placed
@@ -36,8 +35,7 @@ class WmWindow;
// original state.
class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver,
public display::DisplayObserver,
- public ShellObserver,
- public ui::EventHandler {
+ public ShellObserver {
public:
// This should only be deleted by the creator (ash::Shell).
~MaximizeModeWindowManager() override;
@@ -74,9 +72,6 @@ class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver,
void OnDisplayMetricsChanged(const display::Display& display,
uint32_t metrics) override;
- // ui::EventHandler override:
- void OnTouchEvent(ui::TouchEvent* event) override;
-
protected:
friend class MaximizeModeController;
@@ -134,6 +129,8 @@ class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver,
// True if all backdrops are hidden.
bool backdrops_hidden_;
+ std::unique_ptr<wm::MaximizeModeEventHandler> event_handler_;
+
DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowManager);
};

Powered by Google App Engine
This is Rietveld 408576698