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

Unified Diff: chrome/browser/extensions/location_bar_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/location_bar_controller.cc
diff --git a/chrome/browser/extensions/location_bar_controller.cc b/chrome/browser/extensions/location_bar_controller.cc
index 9bdc73645f835e183dbe95ede1ea8331787ed124..69491bae70277d6f34f51064db63a1094a5de631 100644
--- a/chrome/browser/extensions/location_bar_controller.cc
+++ b/chrome/browser/extensions/location_bar_controller.cc
@@ -57,27 +57,6 @@ std::vector<ExtensionAction*> LocationBarController::GetCurrentActions() {
return current_actions;
}
-ExtensionAction::ShowAction LocationBarController::OnClicked(
- const ExtensionAction* action) {
- const Extension* extension =
- ExtensionRegistry::Get(web_contents_->GetBrowserContext())
- ->enabled_extensions().GetByID(action->extension_id());
- CHECK(extension) << action->extension_id();
-
- ExtensionAction::ShowAction page_action =
- page_action_controller_->GetActionForExtension(extension) ?
- page_action_controller_->OnClicked(extension) :
- ExtensionAction::ACTION_NONE;
- ExtensionAction::ShowAction active_script_action =
- active_script_controller_->GetActionForExtension(extension) ?
- active_script_controller_->OnClicked(extension) :
- ExtensionAction::ACTION_NONE;
-
- // PageAction response takes priority.
- return page_action != ExtensionAction::ACTION_NONE ? page_action :
- active_script_action;
-}
-
// static
void LocationBarController::NotifyChange(content::WebContents* web_contents) {
Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
« no previous file with comments | « chrome/browser/extensions/location_bar_controller.h ('k') | chrome/browser/extensions/page_action_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698