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

Unified Diff: ash/common/wm/maximize_mode/maximize_mode_event_handler.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/common/wm/maximize_mode/maximize_mode_event_handler.h
diff --git a/ash/common/wm/maximize_mode/maximize_mode_event_handler.h b/ash/common/wm/maximize_mode/maximize_mode_event_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..bb7d6b5aea024a2873c35ad8e676747f941c3f45
--- /dev/null
+++ b/ash/common/wm/maximize_mode/maximize_mode_event_handler.h
@@ -0,0 +1,37 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_COMMON_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_EVENT_HANDLER_H_
+#define ASH_COMMON_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_EVENT_HANDLER_H_
+
+#include "base/macros.h"
+
+namespace ui {
+class TouchEvent;
+}
+
+namespace ash {
+namespace wm {
+
+// MaximizeModeEventHandler handles toggling fullscreen when appropriate.
+// MaximizeModeEventHandler installs event handlers in an environment specific
+// way, e.g. EventHandler for aura.
+class MaximizeModeEventHandler {
+ public:
+ MaximizeModeEventHandler();
+ virtual ~MaximizeModeEventHandler();
+
+ protected:
+ // Subclasses call this to toggle fullscreen. If a toggle happened returns
+ // true.
+ bool ToggleFullscreen(const ui::TouchEvent& event);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MaximizeModeEventHandler);
+};
+
+} // namespace wm
+} // namespace ash
+
+#endif // ASH_COMMON_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_EVENT_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698