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

Unified Diff: chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm

Issue 9836127: Content shell: Javascript dialogs, first pass, just Mac for now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/content_shell.gypi » ('j') | content/shell/shell_js_dialog.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm b/chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm
index be7b5e430aabd9d5689b14f6d5179d00cebd30c5..2570c7642a6d297daeb3ebd339a739ee1232e049 100644
--- a/chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm
@@ -20,13 +20,13 @@
// going away. Is responsible for cleaning itself up.
@interface JavaScriptAppModalDialogHelper : NSObject<NSAlertDelegate> {
@private
- NSAlert* alert_;
+ scoped_nsobject<NSAlert> alert_;
NSTextField* textField_; // WEAK; owned by alert_
}
- (NSAlert*)alert;
- (NSTextField*)textField;
-- (void)alertDidEnd:(NSAlert *)alert
+- (void)alertDidEnd:(NSAlert*)alert
returnCode:(int)returnCode
contextInfo:(void*)contextInfo;
@@ -35,7 +35,7 @@
@implementation JavaScriptAppModalDialogHelper
- (NSAlert*)alert {
- alert_ = [[NSAlert alloc] init];
+ alert_.reset([[NSAlert alloc] init]);
return alert_;
}
@@ -48,11 +48,6 @@
return textField_;
}
-- (void)dealloc {
- [alert_ release];
- [super dealloc];
-}
-
// |contextInfo| is the JSModalDialogCocoa that owns us.
- (void)alertDidEnd:(NSAlert*)alert
returnCode:(int)returnCode
@@ -90,6 +85,7 @@
}
}
}
+
@end
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « no previous file | content/content_shell.gypi » ('j') | content/shell/shell_js_dialog.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698