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

Unified Diff: chrome/browser/repost_form_warning_controller.h

Issue 8851007: WIP / Do not commit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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/profiles/profile_impl.cc ('k') | chrome/browser/repost_form_warning_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/repost_form_warning_controller.h
diff --git a/chrome/browser/repost_form_warning_controller.h b/chrome/browser/repost_form_warning_controller.h
index 7b8114ac4a7b76eb1bf37d75afad54fdcf3ec078..395de1675dc968ba48351dc797f679dda2a7e4eb 100644
--- a/chrome/browser/repost_form_warning_controller.h
+++ b/chrome/browser/repost_form_warning_controller.h
@@ -7,44 +7,37 @@
#pragma once
#include "base/compiler_specific.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
+#include "chrome/browser/ui/tab_modal_dialog_delegate.h"
-class ConstrainedWindow;
+class NavigationController;
class TabContents;
// This class is used to continue or cancel a pending reload when the
// repost form warning is shown. It is owned by the platform-dependent
// |RepostFormWarning{Gtk,Mac,View}| classes.
-class RepostFormWarningController : public content::NotificationObserver {
+class RepostFormWarningController : public TabModalDialogDelegate {
public:
explicit RepostFormWarningController(TabContents* tab_contents);
virtual ~RepostFormWarningController();
- // Cancel the reload.
- void Cancel();
-
- // Continue the reload.
- void Continue();
-
- void set_window(ConstrainedWindow* window) { window_ = window; }
+ // TabModalDialogDelegate methods:
+ virtual string16 GetTitle() OVERRIDE;
+ virtual string16 GetMessage() OVERRIDE;
+ virtual string16 GetAcceptButtonTitle() OVERRIDE;
+#if defined(TOOLKIT_USES_GTK)
+ virtual const char* GetAcceptButtonIcon() OVERRIDE;
+ virtual const char* GetCancelButtonTitleIcon() OVERRIDE;
+#endif // defined(TOOLKIT_USES_GTK)
+ virtual void OnAccepted() OVERRIDE;
+ virtual void OnCanceled() OVERRIDE;
private:
- // content::NotificationObserver implementation.
- // Watch for a new load or a closed tab and dismiss the dialog if they occur.
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- // Close the warning dialog.
- void CloseDialog();
-
- content::NotificationRegistrar registrar_;
-
- // Tab contents, used to continue the reload.
- TabContents* tab_contents_;
-
- ConstrainedWindow* window_;
+ // Weak pointer; this dialog is cancelled when the TabContents is closed.
+ NavigationController* navigation_controller_;
DISALLOW_COPY_AND_ASSIGN(RepostFormWarningController);
};
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/repost_form_warning_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698