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

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

Issue 10917026: Switch Extensions::TabHelper to use WebContents, WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 8 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/script_badge_controller.cc
diff --git a/chrome/browser/extensions/script_badge_controller.cc b/chrome/browser/extensions/script_badge_controller.cc
index 3a2ef2b23c04007ad71380d543099c731723bf4d..7c1ad869c2c74882f48db278fa4531b6e85ea291 100644
--- a/chrome/browser/extensions/script_badge_controller.cc
+++ b/chrome/browser/extensions/script_badge_controller.cc
@@ -79,10 +79,10 @@ LocationBarController::Action ScriptBadgeController::OnClicked(
switch (mouse_button) {
case 1: // left
case 2: { // middle
- TabContents* tab_contents = TabContents::FromWebContents(web_contents());
- tab_contents->extension_tab_helper()->active_tab_permission_manager()->
- GrantIfRequested(extension);
+ extensions::TabHelper::FromWebContents(web_contents())->
+ active_tab_permission_manager()->GrantIfRequested(extension);
+ TabContents* tab_contents = TabContents::FromWebContents(web_contents());
// Even if clicking the badge doesn't immediately cause the extension to
// run script on the page, we want to help users associate clicking with
// the extension having permission to modify the page, so we make the icon
« no previous file with comments | « chrome/browser/extensions/page_action_controller.cc ('k') | chrome/browser/extensions/script_badge_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698