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

Unified Diff: chrome/browser/ui/views/location_bar/zoom_bubble_view.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/views/location_bar/location_bar_view.cc ('k') | chrome/browser/ui/zoom/zoom_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
diff --git a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
index 580725d0cd5a8491f55d0d21153f4b082015e32e..3cdddee12826a68247bbeb7886a6c89bc5f6b123 100644
--- a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
+++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
@@ -84,7 +84,9 @@ ZoomBubbleView::~ZoomBubbleView() {
}
void ZoomBubbleView::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();
label_->SetText(
l10n_util::GetStringFUTF16Int(IDS_TOOLTIP_ZOOM, zoom_percent));
StartTimerIfNecessary();
@@ -130,7 +132,9 @@ void ZoomBubbleView::Init() {
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical,
0, 0, views::kRelatedControlVerticalSpacing));
- 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();
label_ = new views::Label(
l10n_util::GetStringFUTF16Int(IDS_TOOLTIP_ZOOM, zoom_percent));
gfx::Font font = label_->font().DeriveFont(kPercentageFontIncrease);
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | chrome/browser/ui/zoom/zoom_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698