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

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

Issue 18786005: Cleanup: remove redundant tab close observation from TabModalConfirmDialogDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
« no previous file with comments | « chrome/browser/ui/tab_modal_confirm_dialog_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c8e1a588267fdb65c9dd7c1a5024eb1edd53c050..d2711dcdaeb19f080e298bd4718923096bcd0e7b 100644
--- a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
+++ b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
@@ -4,23 +4,14 @@
#include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
-#include "chrome/browser/chrome_notification_types.h"
-#include "content/public/browser/navigation_controller.h"
-#include "content/public/browser/notification_source.h"
-#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
-using content::NavigationController;
using content::WebContents;
-TabModalConfirmDialogDelegate::TabModalConfirmDialogDelegate(
- WebContents* web_contents)
+TabModalConfirmDialogDelegate::TabModalConfirmDialogDelegate()
: operations_delegate_(NULL),
closing_(false) {
- NavigationController* controller = &web_contents->GetController();
- registrar_.Add(this, chrome::NOTIFICATION_TAB_CLOSING,
- content::Source<NavigationController>(controller));
}
TabModalConfirmDialogDelegate::~TabModalConfirmDialogDelegate() {
@@ -61,18 +52,6 @@ void TabModalConfirmDialogDelegate::LinkClicked(
CloseDialog();
}
-void TabModalConfirmDialogDelegate::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- // Close the dialog if the tab is closed.
- if (type == chrome::NOTIFICATION_TAB_CLOSING) {
- Cancel();
- } else {
- NOTREACHED();
- }
-}
-
gfx::Image* TabModalConfirmDialogDelegate::GetIcon() {
return NULL;
}
« no previous file with comments | « chrome/browser/ui/tab_modal_confirm_dialog_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698