diff options
Diffstat (limited to 'chrome/browser/web_contents.cc')
-rw-r--r-- | chrome/browser/web_contents.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/web_contents.cc b/chrome/browser/web_contents.cc index c3c0a9e..0c0b34d 100644 --- a/chrome/browser/web_contents.cc +++ b/chrome/browser/web_contents.cc @@ -213,6 +213,9 @@ WebContents::WebContents(Profile* profile, NotificationService::current()-> AddObserver(this, NOTIFY_BOOKMARK_MODEL_LOADED, NotificationService::AllSources()); + NotificationService::current()-> + AddObserver(this, NOTIFY_RENDER_WIDGET_HOST_DESTROYED, + NotificationService::AllSources()); } WebContents::~WebContents() { @@ -220,6 +223,9 @@ WebContents::~WebContents() { web_app_->RemoveObserver(this); if (pending_install_.callback_functor) pending_install_.callback_functor->Cancel(); + NotificationService::current()-> + RemoveObserver(this, NOTIFY_RENDER_WIDGET_HOST_DESTROYED, + NotificationService::AllSources()); } // static @@ -1475,6 +1481,9 @@ void WebContents::Observe(NotificationType type, } break; } + case NOTIFY_RENDER_WIDGET_HOST_DESTROYED: + view_->RenderWidgetHostDestroyed(Source<RenderWidgetHost>(source).ptr()); + break; default: { TabContents::Observe(type, source, details); break; |