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

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: Addressed tfarina's comments 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 424f5c5e50ca62297b50c809cf333cb25e92f917..4fbca83c7d8b0c8ccad60f3854651c6303df60f0 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.
Peter Kasting 2012/07/18 03:26:30 Nit: This seems a little sketchy since apparently
Kyle Horimoto 2012/07/18 23:49:38 Hmm, not exactly. ToolbarView creates a LocationBa
+ 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) {
Peter Kasting 2012/07/18 03:26:30 Nit: If this argument is no longer used, can we un
Kyle Horimoto 2012/07/18 23:49:38 This is already being done: http://codereview.chro
- 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