Index: chrome/browser/ui/sad_tab_helper.cc |
diff --git a/chrome/browser/ui/sad_tab_helper.cc b/chrome/browser/ui/sad_tab_helper.cc |
index dfcb1cfcb00280869a0ee42024afdb2c53d5d027..8ad27ece6ab4acc5cd3fcd8e29f05fc607a56468 100644 |
--- a/chrome/browser/ui/sad_tab_helper.cc |
+++ b/chrome/browser/ui/sad_tab_helper.cc |
@@ -7,8 +7,6 @@ |
#include "base/logging.h" |
#include "chrome/browser/browser_shutdown.h" |
#include "chrome/browser/ui/sad_tab.h" |
-#include "content/public/browser/notification_source.h" |
-#include "content/public/browser/notification_types.h" |
#include "content/public/browser/web_contents.h" |
#include "content/public/browser/web_contents_view.h" |
@@ -19,8 +17,13 @@ SadTabHelper::~SadTabHelper() { |
SadTabHelper::SadTabHelper(content::WebContents* web_contents) |
: content::WebContentsObserver(web_contents) { |
- registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_CONNECTED, |
- content::Source<content::WebContents>(web_contents)); |
+} |
+ |
+void SadTabHelper::RenderViewReady() { |
+ if (sad_tab_) { |
+ sad_tab_->Close(); |
+ sad_tab_.reset(); |
+ } |
} |
void SadTabHelper::RenderProcessGone(base::TerminationStatus status) { |
@@ -37,16 +40,6 @@ void SadTabHelper::RenderProcessGone(base::TerminationStatus status) { |
InstallSadTab(status); |
} |
-void SadTabHelper::Observe(int type, |
- const content::NotificationSource& source, |
- const content::NotificationDetails& details) { |
- DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_CONNECTED, type); |
- if (sad_tab_) { |
- sad_tab_->Close(); |
- sad_tab_.reset(); |
- } |
-} |
- |
void SadTabHelper::InstallSadTab(base::TerminationStatus status) { |
chrome::SadTabKind kind = |
(status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED) ? |