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 <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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
251 // RenderFrameHost during cleanup. | 251 // RenderFrameHost during cleanup. |
252 ClearAllWebUI(); | 252 ClearAllWebUI(); |
253 | 253 |
254 GetProcess()->RemoveRoute(routing_id_); | 254 GetProcess()->RemoveRoute(routing_id_); |
255 g_routing_id_frame_map.Get().erase( | 255 g_routing_id_frame_map.Get().erase( |
256 RenderFrameHostID(GetProcess()->GetID(), routing_id_)); | 256 RenderFrameHostID(GetProcess()->GetID(), routing_id_)); |
257 | 257 |
258 if (delegate_ && render_frame_created_) | 258 if (delegate_ && render_frame_created_) |
259 delegate_->RenderFrameDeleted(this); | 259 delegate_->RenderFrameDeleted(this); |
260 | 260 |
261 // If this was swapped out, it already decremented the active frame count of | 261 if (IsRFHStateActive(rfh_state_)) { |
262 // the SiteInstance it belongs to. | 262 // If this was swapped out, it already decremented the active frame count of |
263 if (IsRFHStateActive(rfh_state_)) | 263 // the SiteInstance it belongs to. |
264 GetSiteInstance()->decrement_active_frame_count(); | 264 GetSiteInstance()->decrement_active_frame_count(); |
265 | 265 |
266 // In the case of swapping with a RenderFrameProxy, cleanup is already | |
267 // handled on the renderer process side. However, in all other cases the | |
268 // corresponding RenderFrame also needs to be cleaned up. | |
269 if (!frame_tree_node_->IsMainFrame() && render_frame_created_) | |
Charlie Reis
2015/12/11 20:10:14
Hmm, this condition and the comment above seem to
nasko
2015/12/14 21:00:02
Done.
| |
270 Send(new FrameMsg_Detach(routing_id_)); | |
271 } | |
272 | |
266 // NULL out the swapout timer; in crash dumps this member will be null only if | 273 // NULL out the swapout timer; in crash dumps this member will be null only if |
267 // the dtor has run. | 274 // the dtor has run. |
268 swapout_event_monitor_timeout_.reset(); | 275 swapout_event_monitor_timeout_.reset(); |
269 | 276 |
270 for (const auto& iter: visual_state_callbacks_) { | 277 for (const auto& iter: visual_state_callbacks_) { |
271 iter.second.Run(false); | 278 iter.second.Run(false); |
272 } | 279 } |
273 | 280 |
274 if (render_widget_host_ && | 281 if (render_widget_host_ && |
275 render_widget_host_->owned_by_render_frame_host()) { | 282 render_widget_host_->owned_by_render_frame_host()) { |
(...skipping 2224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2500 *dst = src; | 2507 *dst = src; |
2501 | 2508 |
2502 if (src.routing_id != -1) | 2509 if (src.routing_id != -1) |
2503 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); | 2510 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); |
2504 | 2511 |
2505 if (src.parent_routing_id != -1) | 2512 if (src.parent_routing_id != -1) |
2506 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); | 2513 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); |
2507 } | 2514 } |
2508 | 2515 |
2509 } // namespace content | 2516 } // namespace content |
OLD | NEW |