Index: chrome/browser/extensions/extension_commands_global_registry.cc |
=================================================================== |
--- chrome/browser/extensions/extension_commands_global_registry.cc (revision 232310) |
+++ chrome/browser/extensions/extension_commands_global_registry.cc (working copy) |
@@ -21,6 +21,7 @@ |
profile, ExtensionKeybindingRegistry::ALL_EXTENSIONS, NULL), |
profile_(profile) { |
Init(); |
+ VLOG(0) << "ExtensionCommandsGlobalRegistry created"; |
} |
ExtensionCommandsGlobalRegistry::~ExtensionCommandsGlobalRegistry() { |
@@ -60,15 +61,22 @@ |
extensions::CommandService::Get(profile_); |
// Add all the active global keybindings, if any. |
extensions::CommandMap commands; |
+ VLOG(0) << "Calling GetNamedCommands..."; |
if (!command_service->GetNamedCommands( |
extension->id(), |
extensions::CommandService::ACTIVE_ONLY, |
- extensions::CommandService::GLOBAL, |
+ // TODO(smus): For now, make everything global. Sort out |
+ // why this is working so poorly later. |
+ extensions::CommandService::ANY_SCOPE, |
+ // extensions::CommandService::GLOBAL, |
&commands)) |
return; |
+ VLOG(0) << "GetNamedCommands(...) is true. Size: " << commands.size(); |
extensions::CommandMap::const_iterator iter = commands.begin(); |
for (; iter != commands.end(); ++iter) { |
+ VLOG(0) << "Processing command. Name: " << command_name |
+ << "Second name: " << iter->second.command_name(); |
if (!command_name.empty() && (iter->second.command_name() != command_name)) |
continue; |
@@ -95,6 +103,7 @@ |
void ExtensionCommandsGlobalRegistry::OnKeyPressed( |
const ui::Accelerator& accelerator) { |
+ VLOG(0) << "ExtensionCommandsGlobalRegistry OnKeyPressed"; |
EventTargets::iterator it = event_targets_.find(accelerator); |
if (it == event_targets_.end()) { |
NOTREACHED(); // Shouldn't get this event for something not registered. |