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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 10792020: Implements the "Set to default" button on the zoom bubble. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updated a comment. Created 8 years, 5 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 4894ff6963de12d1432fc1bb02366a9ee34dc830..9e4e6d309484569e99298ce276aef7d1a2ee68e6 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -270,7 +270,11 @@ void LocationBarView::Init(views::View* popup_parent_view) {
content_blocked_view->SetVisible(false);
}
- zoom_view_ = new ZoomView(model_);
+ // Create the zoom view. At this point, |delegate_| has not yet been assigned
+ // a TabContents, so calling GetTabContents() will just return NULL. Thus,
+ // |delegate_| itself is passed here, where it can be queried at a later time
+ // for the appropriate TabContents.
+ zoom_view_ = new ZoomView(model_, delegate_);
AddChildView(zoom_view_);
if (extensions::switch_utils::IsActionBoxEnabled()) {
@@ -515,7 +519,7 @@ void LocationBarView::SetZoomIconState(
}
void LocationBarView::ShowZoomBubble(int zoom_percent) {
- ZoomBubbleView::ShowBubble(zoom_view_, zoom_percent, true);
+ ZoomBubbleView::ShowBubble(zoom_view_, GetTabContents(), true);
}
void LocationBarView::ShowChromeToMobileBubble() {

Powered by Google App Engine
This is Rietveld 408576698