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

Unified Diff: ui/keyboard/keyboard_event_filter.cc

Issue 2666843003: Disable pinch-to-zoom gesture on virtual keyboard (Closed)
Patch Set: rebase Created 3 years, 10 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
« no previous file with comments | « ui/keyboard/keyboard_event_filter.h ('k') | ui/keyboard/keyboard_event_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_event_filter.cc
diff --git a/ui/keyboard/keyboard_event_filter.cc b/ui/keyboard/keyboard_event_filter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..bd5945498679aaedd40cf24a6b772e9a3d0531e9
--- /dev/null
+++ b/ui/keyboard/keyboard_event_filter.cc
@@ -0,0 +1,23 @@
+// Copyright 2017 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 "ui/keyboard/keyboard_event_filter.h"
+
+#include "ui/events/event.h"
+
+namespace keyboard {
+
+void KeyboardEventFilter::OnGestureEvent(ui::GestureEvent* event) {
+ switch (event->type()) {
+ case ui::ET_GESTURE_PINCH_BEGIN:
+ case ui::ET_GESTURE_PINCH_END:
+ case ui::ET_GESTURE_PINCH_UPDATE:
+ event->StopPropagation();
+ break;
+ default:
+ break;
+ }
+}
+
+} // nemespace keyboard
« no previous file with comments | « ui/keyboard/keyboard_event_filter.h ('k') | ui/keyboard/keyboard_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698