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

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: Removed .gitmodules, oops Created 8 years, 4 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 aab0c3209e3f5d4290782e47fe131433d3f5174e..3c448351d46d2188cabbdd3f9eb0542c2d507072 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -275,7 +275,7 @@ void LocationBarView::Init(views::View* popup_parent_view) {
content_blocked_view->SetVisible(false);
}
- zoom_view_ = new ZoomView(model_);
+ zoom_view_ = new ZoomView(model_, delegate_);
AddChildView(zoom_view_);
if (extensions::switch_utils::IsActionBoxEnabled()) {
@@ -533,7 +533,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() {
@@ -1074,7 +1074,7 @@ void LocationBarView::OnSetFocus() {
}
SkBitmap LocationBarView::GetFavicon() const {
- return delegate_->GetTabContents()->favicon_tab_helper()->GetFavicon();
+ return GetTabContents()->favicon_tab_helper()->GetFavicon();
}
string16 LocationBarView::GetTitle() const {
@@ -1303,7 +1303,7 @@ void LocationBarView::WriteDragDataForView(views::View* sender,
DCHECK_NE(GetDragOperationsForView(sender, press_pt),
ui::DragDropTypes::DRAG_NONE);
- TabContents* tab_contents = delegate_->GetTabContents();
+ TabContents* tab_contents = GetTabContents();
DCHECK(tab_contents);
button_drag_utils::SetURLAndDragImage(
tab_contents->web_contents()->GetURL(),

Powered by Google App Engine
This is Rietveld 408576698