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

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

Issue 600553003: Enable swapping a frame back in to its parent process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remoteToLocal
Patch Set: Created 6 years, 1 month 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 "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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 570
571 // The process may (if we're sharing a process with another host that already 571 // The process may (if we're sharing a process with another host that already
572 // initialized it) or may not (we have our own process or the old process 572 // initialized it) or may not (we have our own process or the old process
573 // crashed) have been initialized. Calling Init multiple times will be 573 // crashed) have been initialized. Calling Init multiple times will be
574 // ignored, so this is safe. 574 // ignored, so this is safe.
575 if (!GetProcess()->Init()) 575 if (!GetProcess()->Init())
576 return false; 576 return false;
577 577
578 DCHECK(GetProcess()->HasConnection()); 578 DCHECK(GetProcess()->HasConnection());
579 579
580 Send(new FrameMsg_NewFrame(routing_id_, parent_routing_id)); 580 RenderFrameProxyHost* proxy = frame_tree_node_->render_manager()->
581 GetRenderFrameProxyHost(GetSiteInstance());
nasko 2014/10/27 22:52:54 This type of logic should be in RenderFrameHostMan
Charlie Reis 2014/10/28 16:38:29 +1. This should get passed in from RFHM via WebCo
Nate Chapin 2014/10/28 19:59:19 Done.
582 int proxy_routing_id = proxy ? proxy->GetRoutingID() : MSG_ROUTING_NONE;
583
584 Send(new FrameMsg_NewFrame(routing_id_, parent_routing_id, proxy_routing_id));
581 585
582 // The renderer now has a RenderFrame for this RenderFrameHost. Note that 586 // The renderer now has a RenderFrame for this RenderFrameHost. Note that
583 // this path is only used for out-of-process iframes. Main frame RenderFrames 587 // this path is only used for out-of-process iframes. Main frame RenderFrames
584 // are created with their RenderView, and same-site iframes are created at the 588 // are created with their RenderView, and same-site iframes are created at the
585 // time of OnCreateChildFrame. 589 // time of OnCreateChildFrame.
586 set_render_frame_created(true); 590 set_render_frame_created(true);
587 591
588 return true; 592 return true;
589 } 593 }
590 594
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 // Clear any state if a pending navigation is canceled or preempted. 1601 // Clear any state if a pending navigation is canceled or preempted.
1598 if (suspended_nav_params_) 1602 if (suspended_nav_params_)
1599 suspended_nav_params_.reset(); 1603 suspended_nav_params_.reset();
1600 1604
1601 TRACE_EVENT_ASYNC_END0("navigation", 1605 TRACE_EVENT_ASYNC_END0("navigation",
1602 "RenderFrameHostImpl navigation suspended", this); 1606 "RenderFrameHostImpl navigation suspended", this);
1603 navigations_suspended_ = false; 1607 navigations_suspended_ = false;
1604 } 1608 }
1605 1609
1606 } // namespace content 1610 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698