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

Side by Side Diff: chrome/browser/ui/cocoa/browser/zoom_bubble_controller.mm

Issue 301733006: Zoom Extension API (chrome) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix javascript test function signature. Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698