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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1453803002: Separate RenderViewHost from RenderWidgetHost, part 10: shutdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nick's nits Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // the dtor has run. 267 // the dtor has run.
268 swapout_event_monitor_timeout_.reset(); 268 swapout_event_monitor_timeout_.reset();
269 269
270 for (const auto& iter: visual_state_callbacks_) { 270 for (const auto& iter: visual_state_callbacks_) {
271 iter.second.Run(false); 271 iter.second.Run(false);
272 } 272 }
273 273
274 if (render_widget_host_ && 274 if (render_widget_host_ &&
275 render_widget_host_->owned_by_render_frame_host()) { 275 render_widget_host_->owned_by_render_frame_host()) {
276 // Shutdown causes the RenderWidgetHost to delete itself. 276 // Shutdown causes the RenderWidgetHost to delete itself.
277 render_widget_host_->Shutdown(); 277 render_widget_host_->ShutdownAndDestroyWidget(true);
278 } 278 }
279 279
280 // Notify the FrameTree that this RFH is going away, allowing it to shut down 280 // Notify the FrameTree that this RFH is going away, allowing it to shut down
281 // the corresponding RenderViewHost if it is no longer needed. 281 // the corresponding RenderViewHost if it is no longer needed.
282 frame_tree_->ReleaseRenderViewHostRef(render_view_host_); 282 frame_tree_->ReleaseRenderViewHostRef(render_view_host_);
283 } 283 }
284 284
285 int RenderFrameHostImpl::GetRoutingID() { 285 int RenderFrameHostImpl::GetRoutingID() {
286 return routing_id_; 286 return routing_id_;
287 } 287 }
(...skipping 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after
2500 *dst = src; 2500 *dst = src;
2501 2501
2502 if (src.routing_id != -1) 2502 if (src.routing_id != -1)
2503 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); 2503 dst->tree_id = RoutingIDToAXTreeID(src.routing_id);
2504 2504
2505 if (src.parent_routing_id != -1) 2505 if (src.parent_routing_id != -1)
2506 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); 2506 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id);
2507 } 2507 }
2508 2508
2509 } // namespace content 2509 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree.cc ('k') | content/browser/renderer_host/render_view_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698