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

Unified Diff: chrome/browser/extensions/page_action_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/page_action_controller.cc
diff --git a/chrome/browser/extensions/page_action_controller.cc b/chrome/browser/extensions/page_action_controller.cc
index 3956072adabfc988485398f383d1746fd39c74ce..09a7107c652b8f3f567b2714e10bd8d1243f9cd5 100644
--- a/chrome/browser/extensions/page_action_controller.cc
+++ b/chrome/browser/extensions/page_action_controller.cc
@@ -40,29 +40,6 @@ ExtensionAction* PageActionController::GetActionForExtension(
return ExtensionActionManager::Get(GetProfile())->GetPageAction(*extension);
}
-ExtensionAction::ShowAction PageActionController::OnClicked(
- const Extension* extension) {
- ExtensionAction* page_action =
- ExtensionActionManager::Get(GetProfile())->GetPageAction(*extension);
- CHECK(page_action);
-
- int tab_id = SessionTabHelper::IdForTab(web_contents_);
- TabHelper::FromWebContents(web_contents_)->
- active_tab_permission_granter()->GrantIfRequested(extension);
-
- if (page_action->HasPopup(tab_id))
- return ExtensionAction::ACTION_SHOW_POPUP;
-
- ExtensionActionAPI::PageActionExecuted(
- web_contents_->GetBrowserContext(),
- *page_action,
- tab_id,
- web_contents_->GetLastCommittedURL().spec(),
- 1 /* Button indication. We only ever pass left-click. */);
-
- return ExtensionAction::ACTION_NONE;
-}
-
void PageActionController::OnNavigated() {
// Clearing extension action values is handled in TabHelper, so nothing to
// do here.
« no previous file with comments | « chrome/browser/extensions/page_action_controller.h ('k') | chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698