Index: chrome/browser/extensions/global_shortcut_listener_chromeos.h |
diff --git a/chrome/browser/extensions/global_shortcut_listener_chromeos.h b/chrome/browser/extensions/global_shortcut_listener_chromeos.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f22ea25eb63f495492fe53dfa1c4bd36694bb7dc |
--- /dev/null |
+++ b/chrome/browser/extensions/global_shortcut_listener_chromeos.h |
@@ -0,0 +1,48 @@ |
+// Copyright (c) 2013 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 CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_CHROMEOS_H_ |
+#define CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_CHROMEOS_H_ |
+ |
+#include "base/lazy_instance.h" |
+#include "chrome/browser/extensions/global_shortcut_listener.h" |
+ |
+// TODO(finnur): Figure out what to do on ChromeOS, where the Commands API kind |
+// of is global already... |
+ |
+namespace extensions { |
+ |
+// ChromeOS-specific implementation of the GlobalShortcutListener class that |
+// listens for global shortcuts. Handles basic keyboard intercepting and |
+// forwards its output to the base class for processing. |
+class GlobalShortcutListenerChromeOs : public GlobalShortcutListener { |
Yoyo Zhou
2013/10/03 22:08:50
nit: ChromeOS is a more common spelling than Chrom
Finnur
2013/10/04 17:57:02
Done.
|
+ public: |
+ virtual ~GlobalShortcutListenerChromeOs(); |
+ |
+ virtual void StartListening() OVERRIDE; |
+ virtual void StopListening() OVERRIDE; |
+ |
+ private: |
+ friend struct base::DefaultLazyInstanceTraits<GlobalShortcutListenerChromeOs>; |
+ |
+ GlobalShortcutListenerChromeOs(); |
+ |
+ // Register an |accelerator| with the particular |observer|. |
+ virtual void RegisterAccelerator( |
+ const ui::Accelerator& accelerator, |
+ GlobalShortcutListener::Observer* observer) OVERRIDE; |
+ // Unregister an |accelerator| with the particular |observer|. |
+ virtual void UnregisterAccelerator( |
+ const ui::Accelerator& accelerator, |
+ GlobalShortcutListener::Observer* observer) OVERRIDE; |
+ |
+ // Whether this object is listening for global shortcuts. |
+ bool is_listening_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(GlobalShortcutListenerChromeOs); |
+}; |
+ |
+} // namespace extensions |
+ |
+#endif // CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_CHROMEOS_H_ |