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

Unified Diff: chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc

Issue 12276010: Factor out uses of the WebContentsModalDialog interface from platform-independent code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove incorrect override Created 7 years, 10 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: chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
diff --git a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
index e6a0f1c156cc42d69f52cbeb391ccfa8e3f1ff6d..2dd89a89c68443e1e5bb435dd9c402bce566e435 100644
--- a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
+++ b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
-#include "chrome/browser/ui/web_contents_modal_dialog.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_source.h"
@@ -17,7 +16,7 @@ using content::WebContents;
TabModalConfirmDialogDelegate::TabModalConfirmDialogDelegate(
WebContents* web_contents)
- : window_(NULL),
+ : close_delegate_(NULL),
closing_(false) {
NavigationController* controller = &web_contents->GetController();
registrar_.Add(this, content::NOTIFICATION_LOAD_START,
@@ -27,9 +26,9 @@ TabModalConfirmDialogDelegate::TabModalConfirmDialogDelegate(
}
TabModalConfirmDialogDelegate::~TabModalConfirmDialogDelegate() {
- // If we end up here, the constrained window has been closed, so make sure we
- // don't close it again.
- window_ = NULL;
+ // If we end up here, the window has been closed, so make sure we don't close
+ // it again.
+ close_delegate_ = NULL;
// Make sure everything is cleaned up.
Cancel();
}
@@ -96,6 +95,6 @@ void TabModalConfirmDialogDelegate::OnCanceled() {
}
void TabModalConfirmDialogDelegate::CloseDialog() {
- if (window_)
- window_->CloseWebContentsModalDialog();
+ if (close_delegate_)
+ close_delegate_->CloseDialog();
}

Powered by Google App Engine
This is Rietveld 408576698