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

Unified Diff: chrome/browser/ui/gtk/zoom_bubble_gtk.cc

Issue 10959054: Switch ZoomTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/gtk/location_bar_view_gtk.cc ('k') | chrome/browser/ui/tab_contents/tab_contents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/zoom_bubble_gtk.cc
diff --git a/chrome/browser/ui/gtk/zoom_bubble_gtk.cc b/chrome/browser/ui/gtk/zoom_bubble_gtk.cc
index 3341ae87c037b12399caab1924e62b886d2cf7c2..3b7556a69d2c884b6cc4269f6956b1fcba2ef353 100644
--- a/chrome/browser/ui/gtk/zoom_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/zoom_bubble_gtk.cc
@@ -76,7 +76,9 @@ ZoomBubbleGtk::ZoomBubbleGtk(GtkWidget* anchor,
GtkWidget* container = gtk_vbox_new(FALSE, 0);
gtk_container_add(GTK_CONTAINER(event_box_), container);
- int zoom_percent = tab_contents->zoom_controller()->zoom_percent();
+ ZoomController* zoom_controller =
+ ZoomController::FromWebContents(tab_contents->web_contents());
+ int zoom_percent = zoom_controller->zoom_percent();
std::string percentage_text = UTF16ToUTF8(l10n_util::GetStringFUTF16Int(
IDS_TOOLTIP_ZOOM, zoom_percent));
label_ = theme_service->BuildLabel(percentage_text, ui::kGdkBlack);
@@ -147,7 +149,9 @@ ZoomBubbleGtk::~ZoomBubbleGtk() {
}
void ZoomBubbleGtk::Refresh() {
- int zoom_percent = tab_contents_->zoom_controller()->zoom_percent();
+ ZoomController* zoom_controller =
+ ZoomController::FromWebContents(tab_contents_->web_contents());
+ int zoom_percent = zoom_controller->zoom_percent();
string16 text =
l10n_util::GetStringFUTF16Int(IDS_TOOLTIP_ZOOM, zoom_percent);
gtk_label_set_text(GTK_LABEL(g_bubble->label_), UTF16ToUTF8(text).c_str());
« no previous file with comments | « chrome/browser/ui/gtk/location_bar_view_gtk.cc ('k') | chrome/browser/ui/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698