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

Side by Side Diff: chrome/browser/cocoa/repost_form_warning_mac.h

Issue 354009: Address post-submit comments from http://codereview.chromium.org/327009 . (Closed)
Patch Set: Created 11 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/cocoa/repost_form_warning_mac.mm » ('j') | 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) 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 #ifndef CHROME_BROWSER_COCOA_REPOST_FORM_WARNING_MAC_H_ 5 #ifndef CHROME_BROWSER_COCOA_REPOST_FORM_WARNING_MAC_H_
6 #define CHROME_BROWSER_COCOA_REPOST_FORM_WARNING_MAC_H_ 6 #define CHROME_BROWSER_COCOA_REPOST_FORM_WARNING_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/scoped_nsobject.h" 10 #include "base/scoped_nsobject.h"
11 #include "chrome/common/notification_registrar.h" 11 #include "chrome/common/notification_registrar.h"
12 12
13 class NavigationController; 13 class NavigationController;
14 @class RepostDelegate;
14 class RepostFormWarningMac; 15 class RepostFormWarningMac;
15 16
16 @interface RepostDelegate : NSObject { 17 // Displays a dialog that warns the user that they are about to resubmit a form.
17 RepostFormWarningMac* warning_; // weak, owns us. 18 // To display the dialog, allocate this object on the heap. It will open the
18 } 19 // dialog from its constructor and then delete itself when the user dismisses
19 - (id)initWithWarning:(RepostFormWarningMac*)warning; 20 // the dialog.
20 - (void)alertDidEnd:(NSAlert*)alert
21 returnCode:(int)returnCode
22 contextInfo:(void*)contextInfo;
23 @end
24
25 class RepostFormWarningMac : public NotificationObserver { 21 class RepostFormWarningMac : public NotificationObserver {
26 public: 22 public:
27 RepostFormWarningMac(NSWindow* parent, 23 RepostFormWarningMac(NSWindow* parent,
28 NavigationController* navigation_controller); 24 NavigationController* navigation_controller);
29 virtual ~RepostFormWarningMac(); 25 virtual ~RepostFormWarningMac();
30 26
31 void Confirm(); 27 void Confirm();
32 void Cancel(); 28 void Cancel();
33 29
34 private: 30 private:
(...skipping 13 matching lines...) Expand all
48 NavigationController* navigation_controller_; 44 NavigationController* navigation_controller_;
49 45
50 scoped_nsobject<NSAlert> alert_; 46 scoped_nsobject<NSAlert> alert_;
51 47
52 scoped_nsobject<RepostDelegate> delegate_; 48 scoped_nsobject<RepostDelegate> delegate_;
53 49
54 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningMac); 50 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningMac);
55 }; 51 };
56 52
57 #endif // CHROME_BROWSER_COCOA_REPOST_FORM_WARNING_MAC_H_ 53 #endif // CHROME_BROWSER_COCOA_REPOST_FORM_WARNING_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/cocoa/repost_form_warning_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698