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

Unified Diff: content/browser/frame_host/render_widget_host_view_guest.cc

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
Index: content/browser/frame_host/render_widget_host_view_guest.cc
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index 954bc63f355c68989ca0288314f249d1fd612141..5a1fb7daf23c8728f23889bff1a7a124d52b6aa3 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -135,18 +135,10 @@ gfx::Rect RenderWidgetHostViewGuest::GetViewBounds() const {
return shifted_rect;
}
-void RenderWidgetHostViewGuest::RenderProcessGone(
- base::TerminationStatus status,
- int error_code) {
- platform_view_->RenderProcessGone(status, error_code);
- // Destroy the guest view instance only, so we don't end up calling
- // platform_view_->Destroy().
- DestroyGuestView();
-}
-
void RenderWidgetHostViewGuest::Destroy() {
- // The RenderWidgetHost's destruction led here, so don't call it.
- DestroyGuestView();
+ host_->ViewDestroyed(this);
+ host_ = NULL;
+ base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
platform_view_->Destroy();
}
@@ -472,12 +464,6 @@ gfx::NativeViewId RenderWidgetHostViewGuest::GetParentForWindowlessPlugin()
}
#endif
-void RenderWidgetHostViewGuest::DestroyGuestView() {
- host_->SetView(NULL);
- host_ = NULL;
- base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
-}
-
bool RenderWidgetHostViewGuest::CanDispatchToConsumer(
ui::GestureConsumer* consumer) {
CHECK_EQ(static_cast<RenderWidgetHostViewGuest*>(consumer), this);
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_guest.h ('k') | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698