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

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

Issue 1092183005: Fix Up SingletonHwnd Observer Lifetime Issues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 a155d8f8991f48e325f23a8203532c699e91651c..8336926f2f9aae9d8c76c6f2b81480a630756f66 100644
--- a/chrome/browser/extensions/global_shortcut_listener_win.h
+++ b/chrome/browser/extensions/global_shortcut_listener_win.h
@@ -15,18 +15,13 @@ namespace extensions {
// Windows-specific implementation of the GlobalShortcutListener class that
// listens for global shortcuts. Handles setting up a keyboard hook and
// forwarding its output to the base class for processing.
-class GlobalShortcutListenerWin : public GlobalShortcutListener,
- public gfx::SingletonHwnd::Observer {
+class GlobalShortcutListenerWin : public GlobalShortcutListener {
public:
GlobalShortcutListenerWin();
virtual ~GlobalShortcutListenerWin();
private:
- // The implementation of our Window Proc, called by SingletonHwnd.
- virtual void OnWndProc(HWND hwnd,
- UINT message,
- WPARAM wparam,
- LPARAM lparam) override;
+ void OnHotkey(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
// GlobalShortcutListener implementation.
virtual void StartListening() override;
@@ -43,6 +38,8 @@ class GlobalShortcutListenerWin : public GlobalShortcutListener,
typedef std::map<ui::Accelerator, int> HotkeyIdMap;
HotkeyIdMap hotkey_ids_;
+ gfx::SingletonHwnd::Observer singletonHwndObserver_;
sky 2015/04/24 20:58:23 singleton_hwnd_observer_
robliao 2015/04/24 21:49:03 Oops, been juggling a few too many standards here.
+
DISALLOW_COPY_AND_ASSIGN(GlobalShortcutListenerWin);
};
« no previous file with comments | « no previous file | chrome/browser/extensions/global_shortcut_listener_win.cc » ('j') | content/browser/time_zone_monitor_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698