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

Unified Diff: chrome/browser/extensions/extension_commands_global_registry.cc

Issue 60353008: Mac global keybindings (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 1 month 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/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.

Powered by Google App Engine
This is Rietveld 408576698