diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-02 18:25:02 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-02 18:25:02 +0000 |
commit | cb40a25aff3899e7e71b2ecd4b3333b41b9ffee6 (patch) | |
tree | c0bdeeb5fb8b579a24bedf4ae0a0dbc805cadba4 /chrome/browser/cocoa | |
parent | 070bbbf3a74da9f82573fdf098844fdb7d338105 (diff) | |
download | chromium_src-cb40a25aff3899e7e71b2ecd4b3333b41b9ffee6.zip chromium_src-cb40a25aff3899e7e71b2ecd4b3333b41b9ffee6.tar.gz chromium_src-cb40a25aff3899e7e71b2ecd4b3333b41b9ffee6.tar.bz2 |
Address post-submit comments from http://codereview.chromium.org/327009 .
BUG=TEST=none
Review URL: http://codereview.chromium.org/354009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30718 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r-- | chrome/browser/cocoa/repost_form_warning_mac.h | 14 | ||||
-rw-r--r-- | chrome/browser/cocoa/repost_form_warning_mac.mm | 11 |
2 files changed, 16 insertions, 9 deletions
diff --git a/chrome/browser/cocoa/repost_form_warning_mac.h b/chrome/browser/cocoa/repost_form_warning_mac.h index d55beeb..7841fa5 100644 --- a/chrome/browser/cocoa/repost_form_warning_mac.h +++ b/chrome/browser/cocoa/repost_form_warning_mac.h @@ -11,17 +11,13 @@ #include "chrome/common/notification_registrar.h" class NavigationController; +@class RepostDelegate; class RepostFormWarningMac; -@interface RepostDelegate : NSObject { - RepostFormWarningMac* warning_; // weak, owns us. -} -- (id)initWithWarning:(RepostFormWarningMac*)warning; -- (void)alertDidEnd:(NSAlert*)alert - returnCode:(int)returnCode - contextInfo:(void*)contextInfo; -@end - +// Displays a dialog that warns the user that they are about to resubmit a form. +// To display the dialog, allocate this object on the heap. It will open the +// dialog from its constructor and then delete itself when the user dismisses +// the dialog. class RepostFormWarningMac : public NotificationObserver { public: RepostFormWarningMac(NSWindow* parent, diff --git a/chrome/browser/cocoa/repost_form_warning_mac.mm b/chrome/browser/cocoa/repost_form_warning_mac.mm index ab63cee..0635e95 100644 --- a/chrome/browser/cocoa/repost_form_warning_mac.mm +++ b/chrome/browser/cocoa/repost_form_warning_mac.mm @@ -10,6 +10,17 @@ #include "chrome/common/notification_service.h" #include "grit/generated_resources.h" +// The delegate of the NSAlert used to display the dialog. Forwards the alert's +// completion event to the C++ class |RepostFormWarningMac|. +@interface RepostDelegate : NSObject { + RepostFormWarningMac* warning_; // weak, owns us. +} +- (id)initWithWarning:(RepostFormWarningMac*)warning; +- (void)alertDidEnd:(NSAlert*)alert + returnCode:(int)returnCode + contextInfo:(void*)contextInfo; +@end + @implementation RepostDelegate - (id)initWithWarning:(RepostFormWarningMac*)warning { if ((self = [super init])) { |