| 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() {
|
|
|