| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_OZONE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_OZONE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_OZONE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_OZONE_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/extensions/global_shortcut_listener.h" | 8 #include "chrome/browser/extensions/global_shortcut_listener.h" |
| 9 | 9 |
| 10 namespace extensions { | 10 namespace extensions { |
| 11 | 11 |
| 12 // Ozone-specific implementation of the GlobalShortcutListener class that | 12 // Ozone-specific implementation of the GlobalShortcutListener class that |
| 13 // listens for global shortcuts. Handles basic keyboard intercepting and | 13 // listens for global shortcuts. Handles basic keyboard intercepting and |
| 14 // forwards its output to the base class for processing. | 14 // forwards its output to the base class for processing. |
| 15 class GlobalShortcutListenerOzone : public GlobalShortcutListener { | 15 class GlobalShortcutListenerOzone : public GlobalShortcutListener { |
| 16 public: | 16 public: |
| 17 GlobalShortcutListenerOzone(); | 17 GlobalShortcutListenerOzone(); |
| 18 virtual ~GlobalShortcutListenerOzone(); | 18 virtual ~GlobalShortcutListenerOzone(); |
| 19 | 19 |
| 20 private: | 20 private: |
| 21 // GlobalShortcutListener implementation. | 21 // GlobalShortcutListener implementation. |
| 22 virtual void StartListening() OVERRIDE; | 22 virtual void StartListening() override; |
| 23 virtual void StopListening() OVERRIDE; | 23 virtual void StopListening() override; |
| 24 virtual bool RegisterAcceleratorImpl( | 24 virtual bool RegisterAcceleratorImpl( |
| 25 const ui::Accelerator& accelerator) OVERRIDE; | 25 const ui::Accelerator& accelerator) override; |
| 26 virtual void UnregisterAcceleratorImpl( | 26 virtual void UnregisterAcceleratorImpl( |
| 27 const ui::Accelerator& accelerator) OVERRIDE; | 27 const ui::Accelerator& accelerator) override; |
| 28 | 28 |
| 29 // Whether this object is listening for global shortcuts. | 29 // Whether this object is listening for global shortcuts. |
| 30 bool is_listening_; | 30 bool is_listening_; |
| 31 | 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(GlobalShortcutListenerOzone); | 32 DISALLOW_COPY_AND_ASSIGN(GlobalShortcutListenerOzone); |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 } // namespace extensions | 35 } // namespace extensions |
| 36 | 36 |
| 37 #endif // CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_OZONE_H_ | 37 #endif // CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_OZONE_H_ |
| OLD | NEW |