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

Unified Diff: chrome/browser/cocoa/repost_form_warning_mac.h

Issue 969003: Make repost form warning tab-modal on Mac. (Closed)
Patch Set: Remove an unnecessary line. Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/repost_form_warning_mac.h
diff --git a/chrome/browser/cocoa/repost_form_warning_mac.h b/chrome/browser/cocoa/repost_form_warning_mac.h
index 91586cf7dd81120b36767eebe54603297701b950..a9c480afc92654b6e7db9832aac6f598c39b2903 100644
--- a/chrome/browser/cocoa/repost_form_warning_mac.h
+++ b/chrome/browser/cocoa/repost_form_warning_mac.h
@@ -8,6 +8,8 @@
#import <Cocoa/Cocoa.h>
#include "base/scoped_nsobject.h"
+#include "chrome/browser/tab_contents/tab_contents.h"
+#include "chrome/browser/cocoa/constrained_window_mac.h"
#include "chrome/common/notification_registrar.h"
class NavigationController;
@@ -18,12 +20,15 @@ class RepostFormWarningMac;
// 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 {
+class RepostFormWarningMac : public NotificationObserver,
+ public ConstrainedWindowMacDelegateSystemSheet {
public:
RepostFormWarningMac(NSWindow* parent,
- NavigationController* navigation_controller);
+ TabContents* tab_contents);
virtual ~RepostFormWarningMac();
+ virtual void DeleteDelegate();
+
void Confirm();
void Cancel();
@@ -34,7 +39,9 @@ class RepostFormWarningMac : public NotificationObserver {
const NotificationSource& source,
const NotificationDetails& details);
- // Close the sheet. This will only be done once, even if Destroy is called
+ // Close the sheet.
+ void Dismiss();
+ // Clean up. This will only be done once, even if Destroy is called
// multiple times (eg, from both Confirm and Observe.)
void Destroy();
@@ -43,9 +50,7 @@ class RepostFormWarningMac : public NotificationObserver {
// Navigation controller, used to continue the reload.
NavigationController* navigation_controller_;
- scoped_nsobject<NSAlert> alert_;
-
- scoped_nsobject<RepostDelegate> delegate_;
+ ConstrainedWindow* window_;
DISALLOW_COPY_AND_ASSIGN(RepostFormWarningMac);
};
« 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