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

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

Issue 109413003: Refactor GlobalShortcutListener. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync. Created 6 years, 12 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_win.h
diff --git a/chrome/browser/extensions/global_shortcut_listener_win.h b/chrome/browser/extensions/global_shortcut_listener_win.h
index f327f700433e0ead6320820aeb28e2f5d4939b14..a19207340e951ecf8f9ce3094fc5e33f617b9cf7 100644
--- a/chrome/browser/extensions/global_shortcut_listener_win.h
+++ b/chrome/browser/extensions/global_shortcut_listener_win.h
@@ -7,7 +7,6 @@
#include <windows.h>
-#include "base/lazy_instance.h"
#include "chrome/browser/extensions/global_shortcut_listener.h"
#include "ui/gfx/win/singleton_hwnd.h"
@@ -19,36 +18,29 @@ namespace extensions {
class GlobalShortcutListenerWin : public GlobalShortcutListener,
public gfx::SingletonHwnd::Observer {
public:
+ GlobalShortcutListenerWin();
virtual ~GlobalShortcutListenerWin();
- virtual void StartListening() OVERRIDE;
- virtual void StopListening() OVERRIDE;
-
private:
- friend struct base::DefaultLazyInstanceTraits<GlobalShortcutListenerWin>;
-
- GlobalShortcutListenerWin();
-
// The implementation of our Window Proc, called by SingletonHwnd.
virtual void OnWndProc(HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam) OVERRIDE;
- // 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;
+ // GlobalShortcutListener implementation.
+ virtual void StartListening() OVERRIDE;
+ virtual void StopListening() OVERRIDE;
+ virtual bool RegisterAcceleratorImpl(
+ const ui::Accelerator& accelerator) OVERRIDE;
+ virtual void UnregisterAcceleratorImpl(
+ const ui::Accelerator& accelerator) OVERRIDE;
// Whether this object is listening for global shortcuts.
bool is_listening_;
// A map of registered accelerators and their registration ids.
- typedef std::map< ui::Accelerator, int > HotkeyIdMap;
+ typedef std::map<ui::Accelerator, int> HotkeyIdMap;
HotkeyIdMap hotkey_ids_;
DISALLOW_COPY_AND_ASSIGN(GlobalShortcutListenerWin);
« no previous file with comments | « chrome/browser/extensions/global_shortcut_listener_ozone.cc ('k') | chrome/browser/extensions/global_shortcut_listener_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698