| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UI_COCOA_REPOST_FORM_WARNING_MAC_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_REPOST_FORM_WARNING_MAC_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_REPOST_FORM_WARNING_MAC_H_ | 6 #define CHROME_BROWSER_UI_COCOA_REPOST_FORM_WARNING_MAC_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 | 10 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "chrome/browser/ui/cocoa/constrained_window_mac.h" | 12 #include "chrome/browser/ui/cocoa/constrained_window_mac.h" |
| 13 | 13 |
| 14 class RepostFormWarningController; | 14 class RepostFormWarningController; |
| 15 class TabContents; |
| 15 | 16 |
| 16 // Displays a dialog that warns the user that they are about to resubmit | 17 // Displays a dialog that warns the user that they are about to resubmit |
| 17 // a form. To show the dialog, call the |Create| method. It will open the | 18 // a form. To show the dialog, call the |Create| method. It will open the |
| 18 // dialog and then delete itself when the user dismisses the dialog. | 19 // dialog and then delete itself when the user dismisses the dialog. |
| 19 class RepostFormWarningMac : public ConstrainedWindowMacDelegateSystemSheet { | 20 class RepostFormWarningMac : public ConstrainedWindowMacDelegateSystemSheet { |
| 20 public: | 21 public: |
| 21 // Convenience method that creates a new |RepostFormWarningController| and | 22 // Convenience method that creates a new |RepostFormWarningController| and |
| 22 // then a new |RepostFormWarningMac| from that. | 23 // then a new |RepostFormWarningMac| from that. |
| 23 static RepostFormWarningMac* Create(NSWindow* parent, | 24 static RepostFormWarningMac* Create(NSWindow* parent, |
| 24 TabContents* tab_contents); | 25 TabContents* tab_contents); |
| 25 | 26 |
| 26 RepostFormWarningMac(NSWindow* parent, | 27 RepostFormWarningMac(NSWindow* parent, |
| 27 RepostFormWarningController* controller, | 28 RepostFormWarningController* controller, |
| 28 TabContents* tab_contents); | 29 TabContents* tab_contents); |
| 29 | 30 |
| 30 // ConstrainedWindowDelegateMacSystemSheet methods: | 31 // ConstrainedWindowDelegateMacSystemSheet methods: |
| 31 virtual void DeleteDelegate(); | 32 virtual void DeleteDelegate(); |
| 32 | 33 |
| 33 private: | 34 private: |
| 34 virtual ~RepostFormWarningMac(); | 35 virtual ~RepostFormWarningMac(); |
| 35 | 36 |
| 36 scoped_ptr<RepostFormWarningController> controller_; | 37 scoped_ptr<RepostFormWarningController> controller_; |
| 37 TabContents* tab_contents_; | 38 TabContents* tab_contents_; |
| 38 | 39 |
| 39 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningMac); | 40 DISALLOW_COPY_AND_ASSIGN(RepostFormWarningMac); |
| 40 }; | 41 }; |
| 41 | 42 |
| 42 #endif // CHROME_BROWSER_UI_COCOA_REPOST_FORM_WARNING_MAC_H_ | 43 #endif // CHROME_BROWSER_UI_COCOA_REPOST_FORM_WARNING_MAC_H_ |
| OLD | NEW |