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

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

Issue 6028013: [Mac] In modal JS dialogs with text fields, disable line breaks and just overflow the text box. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | « no previous file | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/js_modal_dialog_cocoa.h" 5 #include "chrome/browser/ui/cocoa/js_modal_dialog_cocoa.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "app/l10n_util_mac.h" 9 #include "app/l10n_util_mac.h"
10 #include "app/message_box_flags.h" 10 #include "app/message_box_flags.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
(...skipping 22 matching lines...) Expand all
34 34
35 @implementation JavaScriptAppModalDialogHelper 35 @implementation JavaScriptAppModalDialogHelper
36 36
37 - (NSAlert*)alert { 37 - (NSAlert*)alert {
38 alert_ = [[NSAlert alloc] init]; 38 alert_ = [[NSAlert alloc] init];
39 return alert_; 39 return alert_;
40 } 40 }
41 41
42 - (NSTextField*)textField { 42 - (NSTextField*)textField {
43 textField_ = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 300, 22)]; 43 textField_ = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 300, 22)];
44 [[textField_ cell] setLineBreakMode:NSLineBreakByTruncatingTail];
44 [alert_ setAccessoryView:textField_]; 45 [alert_ setAccessoryView:textField_];
45 [textField_ release]; 46 [textField_ release];
46 47
47 return textField_; 48 return textField_;
48 } 49 }
49 50
50 - (void)dealloc { 51 - (void)dealloc {
51 [alert_ release]; 52 [alert_ release];
52 [super dealloc]; 53 [super dealloc];
53 } 54 }
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 211
211 //////////////////////////////////////////////////////////////////////////////// 212 ////////////////////////////////////////////////////////////////////////////////
212 // NativeAppModalDialog, public: 213 // NativeAppModalDialog, public:
213 214
214 // static 215 // static
215 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt( 216 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt(
216 JavaScriptAppModalDialog* dialog, 217 JavaScriptAppModalDialog* dialog,
217 gfx::NativeWindow parent_window) { 218 gfx::NativeWindow parent_window) {
218 return new JSModalDialogCocoa(dialog); 219 return new JSModalDialogCocoa(dialog);
219 } 220 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698