| 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" |
| 11 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h" | 11 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h" |
| 12 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" | 12 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" |
| 13 #import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" | 13 #import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" |
| 14 #include "chrome/browser/ui/zoom/zoom_controller.h" | 14 #include "chrome/browser/ui/zoom/zoom_controller.h" |
| 15 #include "grit/generated_resources.h" | 15 #include "chrome/grit/generated_resources.h" |
| 16 #include "ui/base/l10n/l10n_util_mac.h" | 16 #include "ui/base/l10n/l10n_util_mac.h" |
| 17 | 17 |
| 18 ZoomDecoration::ZoomDecoration(LocationBarViewMac* owner) | 18 ZoomDecoration::ZoomDecoration(LocationBarViewMac* owner) |
| 19 : owner_(owner), | 19 : owner_(owner), |
| 20 bubble_(nil) { | 20 bubble_(nil) { |
| 21 } | 21 } |
| 22 | 22 |
| 23 ZoomDecoration::~ZoomDecoration() { | 23 ZoomDecoration::~ZoomDecoration() { |
| 24 [bubble_ closeWithoutAnimation]; | 24 [bubble_ closeWithoutAnimation]; |
| 25 } | 25 } |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 bubble_ = nil; | 132 bubble_ = nil; |
| 133 | 133 |
| 134 // If the page is at default zoom then hiding the zoom decoration | 134 // If the page is at default zoom then hiding the zoom decoration |
| 135 // was suppressed while the bubble was open. Now that the bubble is | 135 // was suppressed while the bubble was open. Now that the bubble is |
| 136 // closed the decoration can be hidden. | 136 // closed the decoration can be hidden. |
| 137 if (IsAtDefaultZoom() && IsVisible()) { | 137 if (IsAtDefaultZoom() && IsVisible()) { |
| 138 SetVisible(false); | 138 SetVisible(false); |
| 139 owner_->OnDecorationsChanged(); | 139 owner_->OnDecorationsChanged(); |
| 140 } | 140 } |
| 141 } | 141 } |
| OLD | NEW |