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

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

Issue 327009: [Mac] Implement form resubmission warning dialog (Closed)
Patch Set: rebase tot 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_COCOA_REPOST_FORM_WARNING_MAC_H_
6 #define CHROME_BROWSER_COCOA_REPOST_FORM_WARNING_MAC_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 #include "base/scoped_nsobject.h"
11 #include "chrome/common/notification_registrar.h"
12
13 class NavigationController;
14 class RepostFormWarningMac;
15
16 @interface RepostDelegate : NSObject {
pink (ping after 24hrs) 2009/11/02 17:36:19 class needs a comment. Does this really need to be
Nico 2009/11/02 18:05:16 Done.
17 RepostFormWarningMac* warning_; // weak, owns us.
18 }
19 - (id)initWithWarning:(RepostFormWarningMac*)warning;
20 - (void)alertDidEnd:(NSAlert*)alert
21 returnCode:(int)returnCode
22 contextInfo:(void*)contextInfo;
23 @end
24
25 class RepostFormWarningMac : public NotificationObserver {
pink (ping after 24hrs) 2009/11/02 17:36:19 class needs a comment. Especially needs to mention
Nico 2009/11/02 18:05:16 Done.
26 public:
27 RepostFormWarningMac(NSWindow* parent,
28 NavigationController* navigation_controller);
29 virtual ~RepostFormWarningMac();
30
31 void Confirm();
32 void Cancel();
33
34 private:
35 // NotificationObserver implementation.
36 // Watch for a new load or a closed tab and dismiss the dialog if they occur.
37 virtual void Observe(NotificationType type,
38 const NotificationSource& source,
39 const NotificationDetails& details);
40
41 // Close the sheet. This will only be done once, even if Destroy is called
42 // multiple times (eg, from both Confirm and Observe.)
43 void Destroy();
44
45 NotificationRegistrar registrar_;
46
47 // Navigation controller, used to continue the reload.
48 NavigationController* navigation_controller_;
49
50 scoped_nsobject<NSAlert> alert_;
51
52 scoped_nsobject<RepostDelegate> delegate_;
53
54 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningMac);
55 };
56
57 #endif // CHROME_BROWSER_COCOA_REPOST_FORM_WARNING_MAC_H_
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/cocoa/repost_form_warning_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698