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

Unified Diff: ui/aura/client/accelerator_client.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 suggested by oshima 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: ui/aura/client/accelerator_client.h
diff --git a/ui/aura/client/accelerator_client.h b/ui/aura/client/accelerator_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..cf999a9fd25d3da3e04126893d3643e917765306
--- /dev/null
+++ b/ui/aura/client/accelerator_client.h
@@ -0,0 +1,35 @@
+// 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 UI_AURA_ACCELERATOR_CLIENT_H_
+#define UI_AURA_ACCELERATOR_CLIENT_H_
+#pragma once
+
+#include "ui/aura/aura_export.h"
+
+namespace ui {
+class Accelerator;
+}
+
+namespace aura {
+
+namespace client {
+
+// A property key to store the accelerator controller for menus. The type of the
+// value is |aura::client::AcceleratorClient*|.
+AURA_EXPORT extern const char kMenuAcceleratorClient[];
+
+// An interface implemented by an object which handles aura accelerators.
+class AURA_EXPORT AcceleratorClient {
+ public:
+ virtual bool Process(const ui::Accelerator& accelerator) = 0;
oshima 2012/01/27 21:41:34 Can you pass base::NativeEvent so that menu_contro
+};
+
+AURA_EXPORT void SetAcceleratorClient(AcceleratorClient* client);
+AURA_EXPORT AcceleratorClient* GetAcceleratorClient();
+
+} // namespace client
+} // namespace aura
+
+#endif // UI_AURA_ACCELERATOR_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698