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

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

Issue 25007002: Add GTK support for global Extension Commands (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revise. Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_keybinding_registry.cc
diff --git a/chrome/browser/extensions/extension_keybinding_registry.cc b/chrome/browser/extensions/extension_keybinding_registry.cc
index 43ad281e21cc895bb49564a39179c0040a214a04..3ea9c2c8f0454892d9bce480e6df6a6471d35eef 100644
--- a/chrome/browser/extensions/extension_keybinding_registry.cc
+++ b/chrome/browser/extensions/extension_keybinding_registry.cc
@@ -64,9 +64,11 @@ void ExtensionKeybindingRegistry::CommandExecuted(
return;
// Grant before sending the event so that the permission is granted before
- // the extension acts on the command.
+ // the extension acts on the command. NOTE: The Global Commands handler does
+ // not set the delegate as it deals only with named commands (not page/browser
+ // actions that are associated with the current page directly).
ActiveTabPermissionGranter* granter =
- delegate_->GetActiveTabPermissionGranter();
+ delegate_ ? delegate_->GetActiveTabPermissionGranter() : NULL;
if (granter)
granter->GrantIfRequested(extension);
« no previous file with comments | « chrome/browser/extensions/extension_commands_global_registry.cc ('k') | chrome/browser/extensions/global_shortcut_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698