summaryrefslogtreecommitdiffstats
path: root/chromium/ui/views/controls/menu/menu_message_pump_dispatcher_win.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/views/controls/menu/menu_message_pump_dispatcher_win.h')
-rw-r--r--chromium/ui/views/controls/menu/menu_message_pump_dispatcher_win.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/chromium/ui/views/controls/menu/menu_message_pump_dispatcher_win.h b/chromium/ui/views/controls/menu/menu_message_pump_dispatcher_win.h
new file mode 100644
index 00000000000..31f1b369610
--- /dev/null
+++ b/chromium/ui/views/controls/menu/menu_message_pump_dispatcher_win.h
@@ -0,0 +1,36 @@
+// Copyright 2014 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_MESSAGE_PUMP_DISPATCHER_WIN_H_
+#define UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_PUMP_DISPATCHER_WIN_H_
+
+#include "base/macros.h"
+#include "base/message_loop/message_pump_dispatcher.h"
+
+namespace views {
+
+class MenuController;
+
+namespace internal {
+
+// A message-pump dispatcher object used to dispatch events from the nested
+// message-loop initiated by the MenuController.
+class MenuMessagePumpDispatcher : public base::MessagePumpDispatcher {
+ public:
+ explicit MenuMessagePumpDispatcher(MenuController* menu_controller);
+ virtual ~MenuMessagePumpDispatcher();
+
+ private:
+ // base::MessagePumpDispatcher:
+ virtual uint32_t Dispatch(const base::NativeEvent& event) OVERRIDE;
+
+ MenuController* menu_controller_;
+
+ DISALLOW_COPY_AND_ASSIGN(MenuMessagePumpDispatcher);
+};
+
+} // namespace internal
+} // namespace views
+
+#endif // UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_PUMP_DISPATCHER_WIN_H_