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

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

Issue 2845593002: Updates Zoom bubble layout and adds +/- buttons (Closed)
Patch Set: Fix compilation error on gcc Created 3 years, 7 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 284f8672adcee772b35cd6d0e4879e2190544d6c..1ec72cd57f7eb623ccd1bd088489bb2b42a1fdeb 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -320,9 +320,10 @@ void LocationBarView::ZoomChangedForActiveTab(bool can_show_bubble) {
}
WebContents* web_contents = GetWebContents();
- if (can_show_bubble && zoom_view_->visible() && web_contents)
+ if (can_show_bubble && web_contents) {
ZoomBubbleView::ShowBubble(web_contents, gfx::Point(),
ZoomBubbleView::AUTOMATIC);
+ }
}
void LocationBarView::SetStarToggled(bool on) {
@@ -701,8 +702,6 @@ bool LocationBarView::RefreshZoomView() {
return false;
const bool was_visible = zoom_view_->visible();
zoom_view_->Update(zoom::ZoomController::FromWebContents(web_contents));
- if (!zoom_view_->visible())
- ZoomBubbleView::CloseCurrentBubble();
return was_visible != zoom_view_->visible();
}
@@ -883,6 +882,11 @@ void LocationBarView::UpdateBookmarkStarVisibility() {
}
}
+void LocationBarView::UpdateZoomViewVisibility() {
+ RefreshZoomView();
+ OnChanged();
+}
+
void LocationBarView::UpdateLocationBarVisibility(bool visible, bool animate) {
if (!animate) {
size_animation_.Reset(visible ? 1 : 0);
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/browser/ui/views/location_bar/zoom_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698