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

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

Issue 109413003: Refactor GlobalShortcutListener. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Mark's comments. Created 7 years 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_x11.h
diff --git a/chrome/browser/extensions/global_shortcut_listener_x11.h b/chrome/browser/extensions/global_shortcut_listener_x11.h
index d710206e62422e9d0e70713f9a974f4d03556a0d..2ad6c3e2621807d4b4708e304737f752fdba00a9 100644
--- a/chrome/browser/extensions/global_shortcut_listener_x11.h
+++ b/chrome/browser/extensions/global_shortcut_listener_x11.h
@@ -5,10 +5,9 @@
#ifndef CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_X11_H_
#define CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_X11_H_
-#include <set>
#include <X11/Xlib.h>
+#include <set>
-#include "base/lazy_instance.h"
#include "base/message_loop/message_pump_dispatcher.h"
#include "chrome/browser/extensions/global_shortcut_listener.h"
@@ -25,28 +24,20 @@ namespace extensions {
class GlobalShortcutListenerX11 : public GlobalShortcutListener,
public base::MessagePumpDispatcher {
Mark Mentovai 2013/12/20 17:54:47 I think that MessagePumpDispatcher and the Dispatc
zhchbin 2013/12/21 09:10:25 This class is implemented by me. I knew the proble
Mark Mentovai 2014/01/02 17:42:37 zhchbin wrote:
public:
+ GlobalShortcutListenerX11();
virtual ~GlobalShortcutListenerX11();
- // GlobalShortcutListener implementation.
- virtual void StartListening() OVERRIDE;
- virtual void StopListening() OVERRIDE;
-
// base::MessagePumpDispatcher implementation.
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
private:
- friend struct base::DefaultLazyInstanceTraits<GlobalShortcutListenerX11>;
-
- GlobalShortcutListenerX11();
-
- // 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;
#if defined(TOOLKIT_GTK)
// Callback for XEvents of the default root window.

Powered by Google App Engine
This is Rietveld 408576698