summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/extension_host.cc24
-rw-r--r--chrome/browser/extensions/extension_host.h1
2 files changed, 10 insertions, 15 deletions
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 8407fc4..767da27 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -131,8 +131,6 @@ ExtensionHost::ExtensionHost(Extension* extension, SiteInstance* site_instance,
// to the task manager then.
registrar_.Add(this, NotificationType::RENDERER_PROCESS_CREATED,
Source<RenderProcessHost>(render_process_host()));
- registrar_.Add(this, NotificationType::RENDERER_PROCESS_CLOSED,
- Source<RenderProcessHost>(render_process_host()));
}
ExtensionHost::~ExtensionHost() {
@@ -233,19 +231,6 @@ void ExtensionHost::Observe(NotificationType type,
NotificationType::EXTENSION_PROCESS_CREATED,
Source<Profile>(profile_),
Details<ExtensionHost>(this));
- } else if (type == NotificationType::RENDERER_PROCESS_CLOSED) {
- Details<RenderProcessHost::RendererClosedDetails> closed_details =
- static_cast<Details<RenderProcessHost::RendererClosedDetails> >(
- details);
- DCHECK(closed_details->was_extension_renderer);
- if (!closed_details->did_crash)
- return;
-
- LOG(INFO) << "Sending EXTENSION_PROCESS_CRASHED for " + extension_->name();
- NotificationService::current()->Notify(
- NotificationType::EXTENSION_PROCESS_CRASHED,
- Source<Profile>(profile_),
- Details<ExtensionHost>(this));
} else {
NOTREACHED();
}
@@ -256,6 +241,15 @@ void ExtensionHost::UpdatePreferredSize(const gfx::Size& new_size) {
view_->UpdatePreferredSize(new_size);
}
+void ExtensionHost::RenderViewGone(RenderViewHost* render_view_host) {
+ LOG(INFO) << "Sending EXTENSION_PROCESS_CRASHED for " + extension_->name();
+ DCHECK_EQ(render_view_host_, render_view_host);
+ NotificationService::current()->Notify(
+ NotificationType::EXTENSION_PROCESS_CRASHED,
+ Source<Profile>(profile_),
+ Details<ExtensionHost>(this));
+}
+
void ExtensionHost::DidNavigate(RenderViewHost* render_view_host,
const ViewHostMsg_FrameNavigate_Params& params) {
// We only care when the outer frame changes.
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index df03314..5f2188c 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -104,6 +104,7 @@ class ExtensionHost : public ExtensionPopupHost::PopupDelegate,
virtual void RenderViewCreated(RenderViewHost* render_view_host);
virtual ViewType::Type GetRenderViewType() const;
virtual int GetBrowserWindowID() const;
+ virtual void RenderViewGone(RenderViewHost* render_view_host);
virtual void DidNavigate(RenderViewHost* render_view_host,
const ViewHostMsg_FrameNavigate_Params& params);
virtual void DidStopLoading();