| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "chrome/browser/ui/cocoa/browser/zoom_bubble_controller.h" | 5 #include "chrome/browser/ui/cocoa/browser/zoom_bubble_controller.h" |
| 6 | 6 |
| 7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "chrome/browser/chrome_page_zoom.h" | 9 #include "chrome/browser/chrome_page_zoom.h" |
| 10 #import "chrome/browser/ui/cocoa/info_bubble_window.h" | 10 #import "chrome/browser/ui/cocoa/info_bubble_window.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // tests. | 131 // tests. |
| 132 | 132 |
| 133 content::WebContents* contents = delegate_->GetWebContents(); | 133 content::WebContents* contents = delegate_->GetWebContents(); |
| 134 if (!contents) | 134 if (!contents) |
| 135 return; | 135 return; |
| 136 | 136 |
| 137 ZoomController* zoomController = ZoomController::FromWebContents(contents); | 137 ZoomController* zoomController = ZoomController::FromWebContents(contents); |
| 138 if (!zoomController) | 138 if (!zoomController) |
| 139 return; | 139 return; |
| 140 | 140 |
| 141 int percent = zoomController->zoom_percent(); | 141 int percent = zoomController->GetZoomPercent(); |
| 142 NSString* string = | 142 NSString* string = |
| 143 l10n_util::GetNSStringF(IDS_ZOOM_PERCENT, base::IntToString16(percent)); | 143 l10n_util::GetNSStringF(IDS_ZOOM_PERCENT, base::IntToString16(percent)); |
| 144 [zoomPercent_ setAttributedStringValue: | 144 [zoomPercent_ setAttributedStringValue: |
| 145 [self attributedStringWithString:string | 145 [self attributedStringWithString:string |
| 146 fontSize:kTextFontSize]]; | 146 fontSize:kTextFontSize]]; |
| 147 | 147 |
| 148 [self updateAutoCloseTimer]; | 148 [self updateAutoCloseTimer]; |
| 149 } | 149 } |
| 150 | 150 |
| 151 - (void)resetToDefault:(id)sender { | 151 - (void)resetToDefault:(id)sender { |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 range:NSMakeRange(0, [title length])]; | 337 range:NSMakeRange(0, [title length])]; |
| 338 title = selectedTitle.autorelease(); | 338 title = selectedTitle.autorelease(); |
| 339 } | 339 } |
| 340 | 340 |
| 341 [[self cell] drawTitle:title | 341 [[self cell] drawTitle:title |
| 342 withFrame:bounds | 342 withFrame:bounds |
| 343 inView:self]; | 343 inView:self]; |
| 344 } | 344 } |
| 345 | 345 |
| 346 @end | 346 @end |
| OLD | NEW |