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

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

Issue 10831372: Revert 152080 - Refactor browser window zoom handling and enable zoom icon on all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
===================================================================
--- chrome/browser/ui/views/location_bar/location_bar_view.cc (revision 152086)
+++ chrome/browser/ui/views/location_bar/location_bar_view.cc (working copy)
@@ -400,7 +400,7 @@
void LocationBarView::Update(const WebContents* tab_for_state_restoring) {
RefreshContentSettingViews();
ZoomBubbleView::CloseBubble();
- RefreshZoomView();
+ zoom_view_->Update();
RefreshPageActionViews();
bool star_enabled = star_view_ && !model_->input_in_progress() &&
@@ -512,23 +512,20 @@
chrome::ShowBookmarkBubbleView(star_view_, profile_, url, newly_bookmarked);
}
-void LocationBarView::ZoomChangedForActiveTab(bool can_show_bubble) {
- DCHECK(zoom_view_);
- RefreshZoomView();
+void LocationBarView::SetZoomIconTooltipPercent(int zoom_percent) {
+ zoom_view_->SetZoomIconTooltipPercent(zoom_percent);
+}
+void LocationBarView::SetZoomIconState(
+ ZoomController::ZoomIconState zoom_icon_state) {
+ zoom_view_->SetZoomIconState(zoom_icon_state);
+
Layout();
SchedulePaint();
-
- // TODO(dbeam): don't show a bubble when the wrench menu is showing.
- if (can_show_bubble && zoom_view_->visible())
- ZoomBubbleView::ShowBubble(zoom_view_, GetTabContents(), true);
}
-void LocationBarView::RefreshZoomView() {
- DCHECK(zoom_view_);
- TabContents* tab_contents = GetTabContents();
- if (tab_contents)
- zoom_view_->Update(tab_contents->zoom_controller());
+void LocationBarView::ShowZoomBubble(int zoom_percent) {
+ ZoomBubbleView::ShowBubble(zoom_view_, GetTabContents(), true);
}
void LocationBarView::ShowChromeToMobileBubble() {
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/browser/ui/views/location_bar/zoom_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698