| OLD | NEW |
| 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 #include "chrome/browser/extensions/extension_commands_global_registry.h" | 5 #include "chrome/browser/extensions/extension_commands_global_registry.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/browser/extensions/api/commands/command_service.h" | 9 #include "chrome/browser/extensions/api/commands/command_service.h" |
| 10 #include "chrome/browser/extensions/extension_keybinding_registry.h" | 10 #include "chrome/browser/extensions/extension_keybinding_registry.h" |
| 11 #include "chrome/browser/extensions/extension_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
| 12 #include "chrome/browser/extensions/global_shortcut_listener.h" | 12 #include "chrome/browser/extensions/global_shortcut_listener.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/common/extensions/extension.h" | 14 #include "extensions/common/extension.h" |
| 15 | 15 |
| 16 namespace extensions { | 16 namespace extensions { |
| 17 | 17 |
| 18 ExtensionCommandsGlobalRegistry::ExtensionCommandsGlobalRegistry( | 18 ExtensionCommandsGlobalRegistry::ExtensionCommandsGlobalRegistry( |
| 19 Profile* profile) | 19 Profile* profile) |
| 20 : ExtensionKeybindingRegistry( | 20 : ExtensionKeybindingRegistry( |
| 21 profile, ExtensionKeybindingRegistry::ALL_EXTENSIONS, NULL), | 21 profile, ExtensionKeybindingRegistry::ALL_EXTENSIONS, NULL), |
| 22 profile_(profile) { | 22 profile_(profile) { |
| 23 Init(); | 23 Init(); |
| 24 } | 24 } |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 EventTargets::iterator it = event_targets_.find(accelerator); | 98 EventTargets::iterator it = event_targets_.find(accelerator); |
| 99 if (it == event_targets_.end()) { | 99 if (it == event_targets_.end()) { |
| 100 NOTREACHED(); // Shouldn't get this event for something not registered. | 100 NOTREACHED(); // Shouldn't get this event for something not registered. |
| 101 return; | 101 return; |
| 102 } | 102 } |
| 103 | 103 |
| 104 CommandExecuted(it->second.first, it->second.second); | 104 CommandExecuted(it->second.first, it->second.second); |
| 105 } | 105 } |
| 106 | 106 |
| 107 } // namespace extensions | 107 } // namespace extensions |
| OLD | NEW |