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

Side by Side Diff: Source/core/loader/FrameLoader.cpp

Issue 23506013: Make the embedder responsible for creating the WebFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add WebViewHelper for unittests. Created 7 years, 3 months 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
« no previous file with comments | « no previous file | Source/web/WebFrameImpl.h » ('j') | Source/web/WebFrameImpl.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 1148
1149 InspectorInstrumentation::frameDetachedFromParent(m_frame); 1149 InspectorInstrumentation::frameDetachedFromParent(m_frame);
1150 1150
1151 if (m_documentLoader) 1151 if (m_documentLoader)
1152 m_documentLoader->detachFromFrame(); 1152 m_documentLoader->detachFromFrame();
1153 m_documentLoader = 0; 1153 m_documentLoader = 0;
1154 m_client->detachedFromParent(); 1154 m_client->detachedFromParent();
1155 1155
1156 m_progressTracker.clear(); 1156 m_progressTracker.clear();
1157 1157
1158 //
1159 //
1160 //
1161 // Note...the problem is mainframe ownership is the embedder and not the
darin (slow to review) 2013/09/13 04:02:47 nit: this comment could use some word-smithing.
1162 // FrameLoader. This is borked. What we want is the mainframe to get be
1163 // adoptRefed() in the initalizeAsMainFrame() call somewhere. Weird, but
1164 // it makes it consistent with child frames in that the embedder holds
1165 // nothing. Either that, or the embedder should drop the ref afterwards.
1166 // All this is odd.
1167 //
1168 //
1169
1158 if (Frame* parent = m_frame->tree()->parent()) { 1170 if (Frame* parent = m_frame->tree()->parent()) {
1159 parent->loader()->closeAndRemoveChild(m_frame); 1171 parent->loader()->closeAndRemoveChild(m_frame);
1160 parent->loader()->scheduleCheckCompleted(); 1172 parent->loader()->scheduleCheckCompleted();
1161 } else { 1173 } else {
1162 m_frame->setView(0); 1174 m_frame->setView(0);
1163 m_frame->willDetachPage(); 1175 m_frame->willDetachPage();
1164 m_frame->detachFromPage(); 1176 m_frame->detachFromPage();
1165 } 1177 }
1166 } 1178 }
1167 1179
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 { 1618 {
1607 SandboxFlags flags = m_forcedSandboxFlags; 1619 SandboxFlags flags = m_forcedSandboxFlags;
1608 if (Frame* parentFrame = m_frame->tree()->parent()) 1620 if (Frame* parentFrame = m_frame->tree()->parent())
1609 flags |= parentFrame->document()->sandboxFlags(); 1621 flags |= parentFrame->document()->sandboxFlags();
1610 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) 1622 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement())
1611 flags |= ownerElement->sandboxFlags(); 1623 flags |= ownerElement->sandboxFlags();
1612 return flags; 1624 return flags;
1613 } 1625 }
1614 1626
1615 } // namespace WebCore 1627 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/web/WebFrameImpl.h » ('j') | Source/web/WebFrameImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698