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

Unified Diff: ash/wm/tablet_mode/tablet_mode_event_handler_aura.cc

Issue 2905383003: (fix landed) Reland of name MaximizeMode to TabletMode (Closed)
Patch Set: 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/tablet_mode/tablet_mode_event_handler_aura.cc
diff --git a/ash/wm/tablet_mode/tablet_mode_event_handler_aura.cc b/ash/wm/tablet_mode/tablet_mode_event_handler_aura.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e3263585fe0f918b45d1accbb4964be88d6cfdb8
--- /dev/null
+++ b/ash/wm/tablet_mode/tablet_mode_event_handler_aura.cc
@@ -0,0 +1,27 @@
+// 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.
+
+#include "ash/wm/tablet_mode/tablet_mode_event_handler_aura.h"
+
+#include "ash/shell.h"
+#include "ui/events/event.h"
+
+namespace ash {
+namespace wm {
+
+TabletModeEventHandlerAura::TabletModeEventHandlerAura() {
+ Shell::Get()->AddPreTargetHandler(this);
+}
+
+TabletModeEventHandlerAura::~TabletModeEventHandlerAura() {
+ Shell::Get()->RemovePreTargetHandler(this);
+}
+
+void TabletModeEventHandlerAura::OnTouchEvent(ui::TouchEvent* event) {
+ if (ToggleFullscreen(*event))
+ event->StopPropagation();
+}
+
+} // namespace wm
+} // namespace ash
« no previous file with comments | « ash/wm/tablet_mode/tablet_mode_event_handler_aura.h ('k') | ash/wm/tablet_mode/tablet_mode_window_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698