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

Unified Diff: ui/views/controls/menu/menu_key_event_handler.h

Issue 1138523006: Enable keyboard accelerators while a menu is open (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed OnTouchEvent() Created 5 years, 3 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: ui/views/controls/menu/menu_key_event_handler.h
diff --git a/ui/views/controls/menu/menu_key_event_handler.h b/ui/views/controls/menu/menu_key_event_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..fd4fd0367858c8515cd2385a17a061107f62df62
--- /dev/null
+++ b/ui/views/controls/menu/menu_key_event_handler.h
@@ -0,0 +1,33 @@
+// 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_KEY_EVENT_HANDLER_H_
+#define UI_VIEWS_CONTROLS_MENU_MENU_KEY_EVENT_HANDLER_H_
+
+#include "base/macros.h"
+#include "ui/events/event_handler.h"
+#include "ui/views/views_export.h"
+
+namespace ui {
+class Accelerator;
+}
+
+namespace views {
+
+// Handles key events while the menu is open.
+class VIEWS_EXPORT MenuKeyEventHandler : public ui::EventHandler {
+ public:
+ MenuKeyEventHandler();
+ ~MenuKeyEventHandler() override;
+
+ // ui::EventHandler:
+ void OnKeyEvent(ui::KeyEvent* event) override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MenuKeyEventHandler);
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_CONTROLS_MENU_MENU_KEY_EVENT_HANDLER_H_
« no previous file with comments | « ui/views/controls/menu/menu_controller_unittest.cc ('k') | ui/views/controls/menu/menu_key_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698