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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 536063002: Clean up RenderWidgetHostView destruction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Safer scheme Created 6 years, 3 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 | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | content/test/test_render_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 593a4ac533fabc01b8683dde775bf998409104c6..57db33f24e1a43199dbc251de90527d77b429cab 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -571,7 +571,7 @@ RenderWidgetHostViewMac::~RenderWidgetHostViewMac() {
// RenderWidgetHost does we need to tell it not to hold a stale pointer to
// us.
if (render_widget_host_)
- render_widget_host_->SetView(NULL);
+ render_widget_host_->ViewDestroyed(this);
}
void RenderWidgetHostViewMac::SetDelegate(
@@ -974,11 +974,6 @@ void RenderWidgetHostViewMac::ImeCompositionRangeChanged(
composition_bounds_ = character_bounds;
}
-void RenderWidgetHostViewMac::RenderProcessGone(base::TerminationStatus status,
- int error_code) {
- Destroy();
-}
-
void RenderWidgetHostViewMac::Destroy() {
[[NSNotificationCenter defaultCenter]
removeObserver:cocoa_view_
@@ -1011,6 +1006,7 @@ void RenderWidgetHostViewMac::Destroy() {
// by some other code. Examples are WebContentsViewMac's
// |latent_focus_view_| and TabWindowController's
// |cachedContentView_|.
+ render_widget_host_->ViewDestroyed(this);
render_widget_host_ = NULL;
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | content/test/test_render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698