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 |