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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 851333005: Revert of Make RenderFrame(Host) own a RenderWidget(Host). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 5e49b1f0849a7008c5ec7571c32966a5209b37a5..25b1fcde7d784b5695b40eb81a7e6c4d5509c691 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -184,7 +184,6 @@
allow_privileged_mouse_lock_(false),
has_touch_handler_(false),
next_browser_snapshot_id_(1),
- owned_by_render_frame_host_(false),
weak_factory_(this) {
CHECK(delegate_);
if (routing_id_ == MSG_ROUTING_NONE) {
@@ -413,11 +412,6 @@
GetProcess()->ResumeRequestsForView(routing_id_);
WasResized();
-}
-
-void RenderWidgetHostImpl::InitForFrame() {
- DCHECK(process_->HasConnection());
- renderer_initialized_ = true;
}
void RenderWidgetHostImpl::Shutdown() {
@@ -1318,13 +1312,6 @@
max_size_for_auto_resize_ = max_size;
}
-void RenderWidgetHostImpl::Cleanup() {
- if (view_) {
- view_->Destroy();
- view_ = nullptr;
- }
-}
-
void RenderWidgetHostImpl::Destroy() {
NotificationService::current()->Notify(
NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
@@ -1335,10 +1322,8 @@
// Note that in the process of the view shutting down, it can call a ton
// of other messages on us. So if you do any other deinitialization here,
// do it after this call to view_->Destroy().
- if (view_) {
+ if (view_)
view_->Destroy();
- view_ = nullptr;
- }
delete this;
}
@@ -1365,16 +1350,10 @@
}
void RenderWidgetHostImpl::OnRenderProcessGone(int status, int exit_code) {
- // RenderFrameHost owns a RenderWidgetHost when it needs one, in which case
- // it handles destruction.
- if (!owned_by_render_frame_host_) {
- // TODO(evanm): This synchronously ends up calling "delete this".
- // Is that really what we want in response to this message? I'm matching
- // previous behavior of the code here.
- Destroy();
- } else {
- RendererExited(static_cast<base::TerminationStatus>(status), exit_code);
- }
+ // TODO(evanm): This synchronously ends up calling "delete this".
+ // Is that really what we want in response to this message? I'm matching
+ // previous behavior of the code here.
+ Destroy();
}
void RenderWidgetHostImpl::OnClose() {
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698