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

Side by Side Diff: chrome/browser/extensions/global_shortcut_listener_win.h

Issue 624153002: replace OVERRIDE and FINAL with override and final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_WIN_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_WIN_H_
6 #define CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_WIN_H_ 6 #define CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include "chrome/browser/extensions/global_shortcut_listener.h" 10 #include "chrome/browser/extensions/global_shortcut_listener.h"
11 #include "ui/gfx/win/singleton_hwnd.h" 11 #include "ui/gfx/win/singleton_hwnd.h"
12 12
13 namespace extensions { 13 namespace extensions {
14 14
15 // Windows-specific implementation of the GlobalShortcutListener class that 15 // Windows-specific implementation of the GlobalShortcutListener class that
16 // listens for global shortcuts. Handles setting up a keyboard hook and 16 // listens for global shortcuts. Handles setting up a keyboard hook and
17 // forwarding its output to the base class for processing. 17 // forwarding its output to the base class for processing.
18 class GlobalShortcutListenerWin : public GlobalShortcutListener, 18 class GlobalShortcutListenerWin : public GlobalShortcutListener,
19 public gfx::SingletonHwnd::Observer { 19 public gfx::SingletonHwnd::Observer {
20 public: 20 public:
21 GlobalShortcutListenerWin(); 21 GlobalShortcutListenerWin();
22 virtual ~GlobalShortcutListenerWin(); 22 virtual ~GlobalShortcutListenerWin();
23 23
24 private: 24 private:
25 // The implementation of our Window Proc, called by SingletonHwnd. 25 // The implementation of our Window Proc, called by SingletonHwnd.
26 virtual void OnWndProc(HWND hwnd, 26 virtual void OnWndProc(HWND hwnd,
27 UINT message, 27 UINT message,
28 WPARAM wparam, 28 WPARAM wparam,
29 LPARAM lparam) OVERRIDE; 29 LPARAM lparam) override;
30 30
31 // GlobalShortcutListener implementation. 31 // GlobalShortcutListener implementation.
32 virtual void StartListening() OVERRIDE; 32 virtual void StartListening() override;
33 virtual void StopListening() OVERRIDE; 33 virtual void StopListening() override;
34 virtual bool RegisterAcceleratorImpl( 34 virtual bool RegisterAcceleratorImpl(
35 const ui::Accelerator& accelerator) OVERRIDE; 35 const ui::Accelerator& accelerator) override;
36 virtual void UnregisterAcceleratorImpl( 36 virtual void UnregisterAcceleratorImpl(
37 const ui::Accelerator& accelerator) OVERRIDE; 37 const ui::Accelerator& accelerator) override;
38 38
39 // Whether this object is listening for global shortcuts. 39 // Whether this object is listening for global shortcuts.
40 bool is_listening_; 40 bool is_listening_;
41 41
42 // A map of registered accelerators and their registration ids. 42 // A map of registered accelerators and their registration ids.
43 typedef std::map<ui::Accelerator, int> HotkeyIdMap; 43 typedef std::map<ui::Accelerator, int> HotkeyIdMap;
44 HotkeyIdMap hotkey_ids_; 44 HotkeyIdMap hotkey_ids_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(GlobalShortcutListenerWin); 46 DISALLOW_COPY_AND_ASSIGN(GlobalShortcutListenerWin);
47 }; 47 };
48 48
49 } // namespace extensions 49 } // namespace extensions
50 50
51 #endif // CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_WIN_H_ 51 #endif // CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_WIN_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/global_shortcut_listener_ozone.h ('k') | chrome/browser/extensions/global_shortcut_listener_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698