| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/app_modal_dialog.h" | 5 #include "chrome/browser/app_modal_dialog.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 #import "base/cocoa_protocols_mac.h" |
| 11 #include "base/sys_string_conversions.h" | 12 #include "base/sys_string_conversions.h" |
| 12 #include "grit/app_strings.h" | 13 #include "grit/app_strings.h" |
| 13 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
| 14 | 15 |
| 15 // Helper object that receives the notification that the dialog/sheet is | 16 // Helper object that receives the notification that the dialog/sheet is |
| 16 // going away. Is responsible for cleaning itself up. | 17 // going away. Is responsible for cleaning itself up. |
| 17 @interface AppModalDialogHelper : NSObject { | 18 @interface AppModalDialogHelper : NSObject<NSAlertDelegate> { |
| 18 @private | 19 @private |
| 19 NSAlert* alert_; | 20 NSAlert* alert_; |
| 20 NSTextField* textField_; // WEAK; owned by alert_ | 21 NSTextField* textField_; // WEAK; owned by alert_ |
| 21 } | 22 } |
| 22 | 23 |
| 23 - (NSAlert*)alert; | 24 - (NSAlert*)alert; |
| 24 - (NSTextField*)textField; | 25 - (NSTextField*)textField; |
| 25 - (void)alertDidEnd:(NSAlert *)alert | 26 - (void)alertDidEnd:(NSAlert *)alert |
| 26 returnCode:(int)returnCode | 27 returnCode:(int)returnCode |
| 27 contextInfo:(void*)contextInfo; | 28 contextInfo:(void*)contextInfo; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 return 0; | 145 return 0; |
| 145 } | 146 } |
| 146 | 147 |
| 147 void AppModalDialog::AcceptWindow() { | 148 void AppModalDialog::AcceptWindow() { |
| 148 NOTIMPLEMENTED(); | 149 NOTIMPLEMENTED(); |
| 149 } | 150 } |
| 150 | 151 |
| 151 void AppModalDialog::CancelWindow() { | 152 void AppModalDialog::CancelWindow() { |
| 152 NOTIMPLEMENTED(); | 153 NOTIMPLEMENTED(); |
| 153 } | 154 } |
| OLD | NEW |