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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 30323002: [DRAFT] Create RenderFrameHostManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/page_navigator.cc ('k') | content/test/test_web_contents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index f3a78fa69264743c3edd827e3aeccae6fd5ae226..84eb38d0dabdd6200658d84c62316786d052740d 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -224,25 +224,21 @@ WebKit::WebFrame* RenderFrameImpl::createChildFrame(
const WebKit::WebString& name) {
RenderFrameImpl* child_render_frame = this;
long long child_frame_identifier = WebFrame::generateEmbedderIdentifier();
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) {
- // Synchronously notify the browser of a child frame creation to get the
- // routing_id for the RenderFrame.
- int routing_id;
- Send(new FrameHostMsg_CreateChildFrame(GetRoutingID(),
- parent->identifier(),
- child_frame_identifier,
- UTF16ToUTF8(name),
- &routing_id));
- child_render_frame = RenderFrameImpl::Create(render_view_, routing_id);
- }
+ // Synchronously notify the browser of a child frame creation to get the
+ // routing_id for the RenderFrame.
+ int routing_id;
+ Send(new FrameHostMsg_CreateChildFrame(GetRoutingID(),
+ parent->identifier(),
+ child_frame_identifier,
+ UTF16ToUTF8(name),
+ &routing_id));
+ child_render_frame = RenderFrameImpl::Create(render_view_, routing_id);
WebKit::WebFrame* web_frame = WebFrame::create(child_render_frame,
child_frame_identifier);
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) {
- g_child_frame_map.Get().insert(
- std::make_pair(web_frame, child_render_frame));
- }
+ g_child_frame_map.Get().insert(
+ std::make_pair(web_frame, child_render_frame));
return web_frame;
}
@@ -258,11 +254,9 @@ void RenderFrameImpl::frameDetached(WebKit::WebFrame* frame) {
// prevents this class from entering the |is_detaching_| state because
// even though one WebCore::Frame may have detached itself, others will
// still need to use this object.
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) {
- // TODO(ajwong): Add CHECK(!is_detaching_) once we guarantee each
- // RenderFrameImpl is only used by one WebCore::Frame.
- is_detaching_ = true;
- }
+ // TODO(ajwong): Add CHECK(!is_detaching_) once we guarantee each
+ // RenderFrameImpl is only used by one WebCore::Frame.
+ is_detaching_ = true;
int64 parent_frame_id = -1;
if (frame->parent())
@@ -275,13 +269,11 @@ void RenderFrameImpl::frameDetached(WebKit::WebFrame* frame) {
// TODO(nasko): Remove once we have RenderFrameObserver.
render_view_->frameDetached(frame);
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) {
- FrameMap::iterator it = g_child_frame_map.Get().find(frame);
- DCHECK(it != g_child_frame_map.Get().end());
- DCHECK_EQ(it->second, this);
- delete it->second;
- g_child_frame_map.Get().erase(it);
- }
+ FrameMap::iterator it = g_child_frame_map.Get().find(frame);
+ DCHECK(it != g_child_frame_map.Get().end());
+ DCHECK_EQ(it->second, this);
+ delete it->second;
+ g_child_frame_map.Get().erase(it);
frame->close();
}
« no previous file with comments | « content/public/browser/page_navigator.cc ('k') | content/test/test_web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698