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

Unified Diff: ash/accelerators/accelerator_dispatcher.h

Issue 9224001: Fixes issue with accelerators when a menu is open (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes as requested Created 8 years, 11 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: ash/accelerators/accelerator_dispatcher.h
diff --git a/ash/accelerators/accelerator_dispatcher.h b/ash/accelerators/accelerator_dispatcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..5ed940a7e65e55325066f872c85b1ee7542d447f
--- /dev/null
+++ b/ash/accelerators/accelerator_dispatcher.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2012 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 ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_
+#define ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_
+#pragma once
+
+#include "ash/ash_export.h"
+#include "base/message_loop.h"
+
+namespace ash {
+
+// Dispatcher for handling accelerators in ash.
+// Wraps a nested dispatcher to which control is passed if no accelerator key
+// has been pressed.
+
+#if defined(OS_MACOSX)
+class ASH_EXPORT AcceleratorDispatcher {
+#else
+class ASH_EXPORT AcceleratorDispatcher : public MessageLoop::Dispatcher {
+#endif // defined(OS_MACOSX)
+ public:
+ explicit AcceleratorDispatcher(MessageLoop::Dispatcher* nested_dispatcher);
+
+#if defined(OS_POSIX)
+ virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(
+ XEvent* xev) OVERRIDE;
oshima 2012/01/25 21:24:37 This doesn't make sense for mac (OS_POSIX is defin
+#elif defined(OS_WIN)
+ bool AcceleratorDispatcher::Dispatch(const MSG& msg) OVERRIDE;
+#endif
+
+ private:
+ MessageLoop::Dispatcher* nested_dispatcher_;
+
+ DISALLOW_COPY_AND_ASSIGN(AcceleratorDispatcher);
+};
+
+} // namespace ash
+
+#endif // ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_
« no previous file with comments | « no previous file | ash/accelerators/accelerator_dispatcher.cc » ('j') | ash/accelerators/accelerator_dispatcher_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698