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

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

Issue 1657005: Merge 44481 - Ensure proper teardown of repost form warning objects.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/375/src/
Patch Set: Created 10 years, 8 months 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 | Annotate | Revision Log
« 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_ptr.h"
11 #include "chrome/browser/cocoa/constrained_window_mac.h" 11 #include "chrome/browser/cocoa/constrained_window_mac.h"
12 12
13 class RepostFormWarningController; 13 class RepostFormWarningController;
14 14
15 // Displays a dialog that warns the user that they are about to resubmit 15 // Displays a dialog that warns the user that they are about to resubmit
16 // a form. To show the dialog, call the |Create| method. It will open the 16 // a form. To show the dialog, call the |Create| method. It will open the
17 // dialog and then delete itself when the user dismisses the dialog. 17 // dialog and then delete itself when the user dismisses the dialog.
18 class RepostFormWarningMac : public ConstrainedDialogDelegate { 18 class RepostFormWarningMac : public ConstrainedDialogDelegate {
19 public: 19 public:
20 // Convenience method that creates a new |RepostFormWarningController| and 20 // Convenience method that creates a new |RepostFormWarningController| and
21 // then a new |RepostFormWarningMac| from that. 21 // then a new |RepostFormWarningMac| from that.
22 static RepostFormWarningMac* Create(NSWindow* parent, 22 static RepostFormWarningMac* Create(NSWindow* parent,
23 TabContents* tab_contents); 23 TabContents* tab_contents);
24 24
25 RepostFormWarningMac(NSWindow* parent, 25 RepostFormWarningMac(NSWindow* parent,
26 RepostFormWarningController* controller); 26 RepostFormWarningController* controller);
27 27
28 // ConstrainedWindowDelegateMacSystemSheet methods: 28 // ConstrainedWindowDelegateMacSystemSheet methods:
29 virtual void DeleteDelegate(); 29 virtual void DeleteDelegate();
30 30
31 private: 31 private:
32 virtual ~RepostFormWarningMac(); 32 virtual ~RepostFormWarningMac();
33 33
34 // Close the sheet. 34 scoped_ptr<RepostFormWarningController> controller_;
35 void Dismiss();
36 35
37 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningMac); 36 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningMac);
38 }; 37 };
39 38
40 #endif // CHROME_BROWSER_COCOA_REPOST_FORM_WARNING_MAC_H_ 39 #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