OLD | NEW |
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 #include "content/shell/shell_javascript_dialog.h" | 5 #include "content/shell/shell_javascript_dialog.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #import "base/mac/cocoa_protocols.h" | |
10 #import "base/memory/scoped_nsobject.h" | 9 #import "base/memory/scoped_nsobject.h" |
11 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
12 #include "content/shell/shell_javascript_dialog_creator.h" | 11 #include "content/shell/shell_javascript_dialog_creator.h" |
13 | 12 |
14 // Helper object that receives the notification that the dialog/sheet is | 13 // Helper object that receives the notification that the dialog/sheet is |
15 // going away. Is responsible for cleaning itself up. | 14 // going away. Is responsible for cleaning itself up. |
16 @interface ShellJavaScriptDialogHelper : NSObject<NSAlertDelegate> { | 15 @interface ShellJavaScriptDialogHelper : NSObject<NSAlertDelegate> { |
17 @private | 16 @private |
18 scoped_nsobject<NSAlert> alert_; | 17 scoped_nsobject<NSAlert> alert_; |
19 NSTextField* textField_; // WEAK; owned by alert_ | 18 NSTextField* textField_; // WEAK; owned by alert_ |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 128 |
130 ShellJavaScriptDialog::~ShellJavaScriptDialog() { | 129 ShellJavaScriptDialog::~ShellJavaScriptDialog() { |
131 [helper_ release]; | 130 [helper_ release]; |
132 } | 131 } |
133 | 132 |
134 void ShellJavaScriptDialog::Cancel() { | 133 void ShellJavaScriptDialog::Cancel() { |
135 [helper_ cancel]; | 134 [helper_ cancel]; |
136 } | 135 } |
137 | 136 |
138 } // namespace content | 137 } // namespace content |
OLD | NEW |