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

Unified Diff: chrome/browser/ui/gtk/location_bar_view_gtk.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
« no previous file with comments | « chrome/browser/ui/extensions/application_launch.cc ('k') | chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/location_bar_view_gtk.cc
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index eb3ecdcb7004fff46a062ed380f023d6b90df326..b89f2a6dbbd95a039f600494db45ae532a2571db 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -956,10 +956,11 @@ void LocationBarViewGtk::UpdateContentSettingsIcons() {
void LocationBarViewGtk::UpdatePageActions() {
std::vector<ExtensionAction*> new_page_actions;
- TabContents* tab_contents = GetTabContents();
- if (tab_contents) {
+ WebContents* contents = GetWebContents();
+ if (contents) {
LocationBarController* location_bar_controller =
- tab_contents->extension_tab_helper()->location_bar_controller();
+ extensions::TabHelper::FromWebContents(contents)->
+ location_bar_controller();
new_page_actions = location_bar_controller->GetCurrentActions();
}
@@ -981,7 +982,6 @@ void LocationBarViewGtk::UpdatePageActions() {
content::NotificationService::NoDetails());
}
- WebContents* contents = GetWebContents();
if (!page_action_views_.empty() && contents) {
GURL url = chrome::GetActiveWebContents(browser())->GetURL();
@@ -2036,7 +2036,8 @@ gboolean LocationBarViewGtk::PageActionViewGtk::OnButtonPressed(
return TRUE;
LocationBarController* controller =
- tab_contents->extension_tab_helper()->location_bar_controller();
+ extensions::TabHelper::FromWebContents(tab_contents->web_contents())->
+ location_bar_controller();
switch (controller->OnClicked(extension->id(), event->button)) {
case LocationBarController::ACTION_NONE:
« no previous file with comments | « chrome/browser/ui/extensions/application_launch.cc ('k') | chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698