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

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

Issue 496863003: Consolidate ExtensionAction execution code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/active_script_controller.cc
diff --git a/chrome/browser/extensions/active_script_controller.cc b/chrome/browser/extensions/active_script_controller.cc
index 9a8a6ec92dee420f9a4f5576271b52faab3bd712..a6ad2bb56847d478adf99463e6683a1e21ec573f 100644
--- a/chrome/browser/extensions/active_script_controller.cc
+++ b/chrome/browser/extensions/active_script_controller.cc
@@ -139,6 +139,11 @@ void ActiveScriptController::AlwaysRunOnVisibleOrigin(
OnClicked(extension);
}
+void ActiveScriptController::OnClicked(const Extension* extension) {
+ DCHECK(ContainsKey(pending_requests_, extension->id()));
+ RunPendingForExtension(extension);
+}
+
bool ActiveScriptController::HasActiveScriptAction(const Extension* extension) {
return enabled_ && pending_requests_.count(extension->id()) > 0;
}
@@ -162,13 +167,6 @@ ExtensionAction* ActiveScriptController::GetActionForExtension(
return action.get();
}
-ExtensionAction::ShowAction ActiveScriptController::OnClicked(
- const Extension* extension) {
- DCHECK(ContainsKey(pending_requests_, extension->id()));
- RunPendingForExtension(extension);
- return ExtensionAction::ACTION_NONE;
-}
-
void ActiveScriptController::OnNavigated() {
LogUMA();
permitted_extensions_.clear();

Powered by Google App Engine
This is Rietveld 408576698