Index: ui/views/controls/menu/menu_event_filter.h |
diff --git a/ui/views/controls/menu/menu_event_filter.h b/ui/views/controls/menu/menu_event_filter.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..da37cfe0babc7d770b173354d9b038a6d20e8637 |
--- /dev/null |
+++ b/ui/views/controls/menu/menu_event_filter.h |
@@ -0,0 +1,34 @@ |
+// Copyright 2015 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 UI_VIEWS_CONTROLS_MENU_MENU_EVENT_FILTER_H_ |
+#define UI_VIEWS_CONTROLS_MENU_MENU_EVENT_FILTER_H_ |
+ |
+#include "base/macros.h" |
+#include "ui/events/event_handler.h" |
+#include "ui/views/views_export.h" |
+ |
+namespace ui { |
+class Accelerator; |
+} |
+ |
+namespace views { |
+ |
+// Handles events while a menu is open. |
+class VIEWS_EXPORT MenuEventFilter : public ui::EventHandler { |
oshima
2015/09/08 21:43:08
Is there any reason why this is called MenuEventFi
afakhry
2015/09/08 23:34:38
Done.
|
+ public: |
+ MenuEventFilter(); |
+ ~MenuEventFilter() override; |
+ |
+ // ui::EventHandler: |
+ void OnKeyEvent(ui::KeyEvent* event) override; |
+ void OnTouchEvent(ui::TouchEvent* event) override; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(MenuEventFilter); |
+}; |
+ |
+} // namespace views |
+ |
+#endif // UI_VIEWS_CONTROLS_MENU_MENU_EVENT_FILTER_H_ |