| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |