Chromium Code Reviews| Index: chrome/browser/extensions/global_shortcut_listener_chromeos.cc |
| diff --git a/chrome/browser/extensions/global_shortcut_listener_chromeos.cc b/chrome/browser/extensions/global_shortcut_listener_chromeos.cc |
| index af97100c483f95c95e547dd6f9700553bc2fb871..5e7ab8ef52feeeda596e5db446902f96ab58727f 100644 |
| --- a/chrome/browser/extensions/global_shortcut_listener_chromeos.cc |
| +++ b/chrome/browser/extensions/global_shortcut_listener_chromeos.cc |
| @@ -8,19 +8,14 @@ |
| using content::BrowserThread; |
| -namespace { |
| - |
| -static base::LazyInstance<extensions::GlobalShortcutListenerChromeOS> instance = |
| - LAZY_INSTANCE_INITIALIZER; |
| - |
| -} // namespace |
| - |
| namespace extensions { |
| // static |
| GlobalShortcutListener* GlobalShortcutListener::GetInstance() { |
| CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| - return instance.Pointer(); |
| + static GlobalShortcutListenerChromeOS *instance = |
|
Mark Mentovai
2013/12/20 17:54:47
I personally don’t care as long as you stay consis
zhchbin
2013/12/21 09:10:25
Done.
I didn't pay attention to it when I follow
|
| + new GlobalShortcutListenerChromeOS(); |
| + return instance; |
| } |
| GlobalShortcutListenerChromeOS::GlobalShortcutListenerChromeOS() |
| @@ -48,28 +43,22 @@ void GlobalShortcutListenerChromeOS::StopListening() { |
| is_listening_ = false; |
| } |
| -void GlobalShortcutListenerChromeOS::RegisterAccelerator( |
| - const ui::Accelerator& accelerator, |
| - GlobalShortcutListener::Observer* observer) { |
| +bool GlobalShortcutListenerChromeOS::RegisterAcceleratorImpl( |
| + const ui::Accelerator& accelerator) { |
| NOTIMPLEMENTED(); |
| // To implement: |
| // 1) Convert modifiers to platform specific modifiers. |
| // 2) Register for the hotkey. |
| - // 3) If not successful, log why. |
| - // 4) Else, call base class RegisterAccelerator. |
| + // 3) If not successful, log why and return false. |
| + // 4) Else, return true. |
| - GlobalShortcutListener::RegisterAccelerator(accelerator, observer); |
| + return false; |
| } |
| -void GlobalShortcutListenerChromeOS::UnregisterAccelerator( |
| - const ui::Accelerator& accelerator, |
| - GlobalShortcutListener::Observer* observer) { |
| +void GlobalShortcutListenerChromeOS::UnregisterAcceleratorImpl( |
| + const ui::Accelerator& accelerator) { |
| NOTIMPLEMENTED(); |
| - // To implement: |
| - // 1) Unregister for the hotkey. |
| - // 2) Call base class UnregisterAccelerator. |
| - |
| - GlobalShortcutListener::UnregisterAccelerator(accelerator, observer); |
| + // To implement: Unregister for the hotkey. |
| } |
| } // namespace extensions |