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

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

Issue 10818016: [OSX] Remove wide->NSString conversion (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed more widestring code. Created 8 years, 4 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
« no previous file with comments | « base/sys_string_conversions_mac_unittest.mm ('k') | no next file » | 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/login_prompt_cocoa.h" 5 #import "chrome/browser/ui/cocoa/login_prompt_cocoa.h"
6 6
7 #include "base/mac/bundle_locations.h" 7 #include "base/mac/bundle_locations.h"
8 #include "base/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 - (void)dealloc { 146 - (void)dealloc {
147 // The buttons could be in a modal loop, so disconnect them so they cannot 147 // The buttons could be in a modal loop, so disconnect them so they cannot
148 // call back to us after we're dead. 148 // call back to us after we're dead.
149 [loginButton_ setTarget:nil]; 149 [loginButton_ setTarget:nil];
150 [cancelButton_ setTarget:nil]; 150 [cancelButton_ setTarget:nil];
151 [super dealloc]; 151 [super dealloc];
152 } 152 }
153 153
154 - (IBAction)loginPressed:(id)sender { 154 - (IBAction)loginPressed:(id)sender {
155 using base::SysNSStringToWide;
156 [NSApp endSheet:[self window]]; 155 [NSApp endSheet:[self window]];
157 handler_->OnLoginPressed( 156 handler_->OnLoginPressed(
158 base::SysNSStringToUTF16([nameField_ stringValue]), 157 base::SysNSStringToUTF16([nameField_ stringValue]),
159 base::SysNSStringToUTF16([passwordField_ stringValue])); 158 base::SysNSStringToUTF16([passwordField_ stringValue]));
160 } 159 }
161 160
162 - (IBAction)cancelPressed:(id)sender { 161 - (IBAction)cancelPressed:(id)sender {
163 [NSApp endSheet:[self window]]; 162 [NSApp endSheet:[self window]];
164 handler_->OnCancelPressed(); 163 handler_->OnCancelPressed();
165 } 164 }
(...skipping 23 matching lines...) Expand all
189 sizeToFitFixedWidthTextField:explanationField_]; 188 sizeToFitFixedWidthTextField:explanationField_];
190 189
191 // Resize the window (no shifting needed due to window layout). 190 // Resize the window (no shifting needed due to window layout).
192 NSSize windowDelta = NSMakeSize(0, explanationShift); 191 NSSize windowDelta = NSMakeSize(0, explanationShift);
193 [GTMUILocalizerAndLayoutTweaker 192 [GTMUILocalizerAndLayoutTweaker
194 resizeWindowWithoutAutoResizingSubViews:[self window] 193 resizeWindowWithoutAutoResizingSubViews:[self window]
195 delta:windowDelta]; 194 delta:windowDelta];
196 } 195 }
197 196
198 @end 197 @end
OLDNEW
« no previous file with comments | « base/sys_string_conversions_mac_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698