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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm

Issue 968213003: Don't hide the zoom icon when not at default zoom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add regression test. Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/zoom_decoration_browsertest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/location_bar/zoom_decoration.h" 5 #import "chrome/browser/ui/cocoa/location_bar/zoom_decoration.h"
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h" 10 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 return owner_->GetWebContents(); 144 return owner_->GetWebContents();
145 } 145 }
146 146
147 void ZoomDecoration::OnClose() { 147 void ZoomDecoration::OnClose() {
148 bubble_.delegate = nil; 148 bubble_.delegate = nil;
149 bubble_ = nil; 149 bubble_ = nil;
150 150
151 // If the page is at default zoom then hiding the zoom decoration 151 // If the page is at default zoom then hiding the zoom decoration
152 // was suppressed while the bubble was open. Now that the bubble is 152 // was suppressed while the bubble was open. Now that the bubble is
153 // closed the decoration can be hidden. 153 // closed the decoration can be hidden.
154 if (IsVisible()) { 154 if (IsAtDefaultZoom() && IsVisible()) {
155 SetVisible(false); 155 SetVisible(false);
156 owner_->OnDecorationsChanged(); 156 owner_->OnDecorationsChanged();
157 } 157 }
158 } 158 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/zoom_decoration_browsertest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698