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

Unified Diff: trunk/src/chrome/browser/ui/tab_modal_confirm_dialog_delegate.h

Issue 21372006: Revert 212329 "Reland "Close web contents modal dialogs on conte..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 5 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
Index: trunk/src/chrome/browser/ui/tab_modal_confirm_dialog_delegate.h
===================================================================
--- trunk/src/chrome/browser/ui/tab_modal_confirm_dialog_delegate.h (revision 214772)
+++ trunk/src/chrome/browser/ui/tab_modal_confirm_dialog_delegate.h (working copy)
@@ -20,18 +20,15 @@
class Image;
}
-// Operations to be performed on the dialog by the
-// TabModalConfirmDialogDelegate.
-class TabModalConfirmDialogOperationsDelegate {
+class TabModalConfirmDialogCloseDelegate {
public:
- TabModalConfirmDialogOperationsDelegate() {}
- virtual ~TabModalConfirmDialogOperationsDelegate() {}
+ TabModalConfirmDialogCloseDelegate() {}
+ virtual ~TabModalConfirmDialogCloseDelegate() {}
virtual void CloseDialog() = 0;
- virtual void SetPreventCloseOnLoadStart(bool prevent) = 0;
private:
- DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogOperationsDelegate);
+ DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogCloseDelegate);
};
// This class acts as the delegate for a simple tab-modal dialog confirming
@@ -41,9 +38,8 @@
explicit TabModalConfirmDialogDelegate(content::WebContents* web_contents);
virtual ~TabModalConfirmDialogDelegate();
- void set_operations_delegate(
- TabModalConfirmDialogOperationsDelegate* operations_delegate) {
- operations_delegate_ = operations_delegate;
+ void set_close_delegate(TabModalConfirmDialogCloseDelegate* close_delegate) {
+ close_delegate_ = close_delegate;
}
// Accepts the confirmation prompt and calls |OnAccepted|.
@@ -85,12 +81,12 @@
virtual const char* GetCancelButtonIcon();
protected:
- TabModalConfirmDialogOperationsDelegate* operations_delegate() {
- return operations_delegate_;
+ TabModalConfirmDialogCloseDelegate* close_delegate() {
+ return close_delegate_;
}
// content::NotificationObserver implementation.
- // Watch for a closed tab and dismiss the dialog if it occurs.
+ // 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;
@@ -113,7 +109,7 @@
// Close the dialog.
void CloseDialog();
- TabModalConfirmDialogOperationsDelegate* operations_delegate_;
+ TabModalConfirmDialogCloseDelegate* close_delegate_;
// True iff we are in the process of closing, to avoid running callbacks
// multiple times.
bool closing_;

Powered by Google App Engine
This is Rietveld 408576698