Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 232 } | 232 } |
| 233 | 233 |
| 234 RenderFrameHostImpl::~RenderFrameHostImpl() { | 234 RenderFrameHostImpl::~RenderFrameHostImpl() { |
| 235 GetProcess()->RemoveRoute(routing_id_); | 235 GetProcess()->RemoveRoute(routing_id_); |
| 236 g_routing_id_frame_map.Get().erase( | 236 g_routing_id_frame_map.Get().erase( |
| 237 RenderFrameHostID(GetProcess()->GetID(), routing_id_)); | 237 RenderFrameHostID(GetProcess()->GetID(), routing_id_)); |
| 238 | 238 |
| 239 if (delegate_ && render_frame_created_) | 239 if (delegate_ && render_frame_created_) |
| 240 delegate_->RenderFrameDeleted(this); | 240 delegate_->RenderFrameDeleted(this); |
| 241 | 241 |
| 242 // If this was swapped out, it already decremented the active frame count of | 242 if (IsRFHStateActive(rfh_state_)) { |
| 243 // the SiteInstance it belongs to. | 243 // If this was swapped out, it already decremented the active frame count of |
| 244 if (IsRFHStateActive(rfh_state_)) | 244 // the SiteInstance it belongs to. |
| 245 GetSiteInstance()->decrement_active_frame_count(); | 245 GetSiteInstance()->decrement_active_frame_count(); |
| 246 | 246 |
| 247 // In the case of swapping with a RenderFrameProxy, cleanup is already | |
| 248 // handled on the renderer process side. However, in all other cases the | |
| 249 // corresponding RenderFrame also needs to be cleaned up. | |
|
nasko
2015/10/29 23:55:38
I'm not correct here. The case of main frame and s
| |
| 250 if (render_frame_created_) | |
| 251 Send(new FrameMsg_Detach(routing_id_)); | |
| 252 } | |
| 253 | |
| 247 // NULL out the swapout timer; in crash dumps this member will be null only if | 254 // NULL out the swapout timer; in crash dumps this member will be null only if |
| 248 // the dtor has run. | 255 // the dtor has run. |
| 249 swapout_event_monitor_timeout_.reset(); | 256 swapout_event_monitor_timeout_.reset(); |
| 250 | 257 |
| 251 for (const auto& iter: visual_state_callbacks_) { | 258 for (const auto& iter: visual_state_callbacks_) { |
| 252 iter.second.Run(false); | 259 iter.second.Run(false); |
| 253 } | 260 } |
| 254 | 261 |
| 255 if (render_widget_host_ && | 262 if (render_widget_host_ && |
| 256 render_widget_host_->owned_by_render_frame_host()) { | 263 render_widget_host_->owned_by_render_frame_host()) { |
| (...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2293 *dst = src; | 2300 *dst = src; |
| 2294 | 2301 |
| 2295 if (src.routing_id != -1) | 2302 if (src.routing_id != -1) |
| 2296 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); | 2303 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); |
| 2297 | 2304 |
| 2298 if (src.parent_routing_id != -1) | 2305 if (src.parent_routing_id != -1) |
| 2299 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); | 2306 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); |
| 2300 } | 2307 } |
| 2301 | 2308 |
| 2302 } // namespace content | 2309 } // namespace content |
| OLD | NEW |