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

Unified Diff: chrome/browser/extensions/global_shortcut_listener_chromeos.h

Issue 350943003: Support global keyboard commands on Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test updates Created 6 years, 5 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: 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
index e9055214061e92485b7c3d6877e4e69135828712..a5c0641e3fb2f5d753013249274f5f0a0213594b 100644
--- a/chrome/browser/extensions/global_shortcut_listener_chromeos.h
+++ b/chrome/browser/extensions/global_shortcut_listener_chromeos.h
@@ -7,15 +7,15 @@
#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...
+#include "ui/base/accelerators/accelerator.h"
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 {
+class GlobalShortcutListenerChromeOS : public GlobalShortcutListener,
+ ui::AcceleratorTarget {
public:
GlobalShortcutListenerChromeOS();
virtual ~GlobalShortcutListenerChromeOS();
@@ -29,6 +29,10 @@ class GlobalShortcutListenerChromeOS : public GlobalShortcutListener {
virtual void UnregisterAcceleratorImpl(
const ui::Accelerator& accelerator) OVERRIDE;
+ // ui::AcceleratorTarget implementation.
+ virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
+ virtual bool CanHandleAccelerators() const OVERRIDE;
+
// Whether this object is listening for global shortcuts.
bool is_listening_;

Powered by Google App Engine
This is Rietveld 408576698