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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.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/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index a2a2e3d8a52ee207557fef61c5315a690bb5ac4f..ee8fdbece3c785fdbb9d04d7a5e0b76df5632efc 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -1151,10 +1151,12 @@ void LocationBarView::RefreshPageActionViews() {
std::vector<ExtensionAction*> new_page_actions;
- TabContents* tab_contents = GetTabContents();
- if (tab_contents) {
+ WebContents* contents = GetWebContentsFromDelegate(delegate_);
+ if (contents) {
+ extensions::TabHelper* extensions_tab_helper =
+ extensions::TabHelper::FromWebContents(contents);
extensions::LocationBarController* controller =
- tab_contents->extension_tab_helper()->location_bar_controller();
+ extensions_tab_helper->location_bar_controller();
new_page_actions = controller->GetCurrentActions();
}
@@ -1180,7 +1182,6 @@ void LocationBarView::RefreshPageActionViews() {
}
}
- WebContents* contents = GetWebContentsFromDelegate(delegate_);
if (!page_action_views_.empty() && contents) {
Browser* browser = browser::FindBrowserWithWebContents(contents);
GURL url = chrome::GetActiveWebContents(browser)->GetURL();
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/location_bar/page_action_image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698