Chromium Code Reviews| 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() { |