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

Side by Side Diff: third_party/WebKit/Source/web/WebFrame.cpp

Issue 2714943004: Move unique name generation and tracking into //content. (Closed)
Patch Set: Rebase again. Created 3 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "public/web/WebFrame.h" 5 #include "public/web/WebFrame.h"
6 6
7 #include "bindings/core/v8/WindowProxyManager.h" 7 #include "bindings/core/v8/WindowProxyManager.h"
8 #include "core/HTMLNames.h" 8 #include "core/HTMLNames.h"
9 #include "core/frame/FrameHost.h" 9 #include "core/frame/FrameHost.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 if (m_opener) { 65 if (m_opener) {
66 frame->setOpener(m_opener); 66 frame->setOpener(m_opener);
67 setOpener(nullptr); 67 setOpener(nullptr);
68 } 68 }
69 m_openedFrameTracker->transferTo(frame); 69 m_openedFrameTracker->transferTo(frame);
70 70
71 FrameHost* host = oldFrame->host(); 71 FrameHost* host = oldFrame->host();
72 AtomicString name = oldFrame->tree().name(); 72 AtomicString name = oldFrame->tree().name();
73 AtomicString uniqueName = oldFrame->tree().uniqueName();
74 FrameOwner* owner = oldFrame->owner(); 73 FrameOwner* owner = oldFrame->owner();
75 74
76 v8::HandleScope handleScope(v8::Isolate::GetCurrent()); 75 v8::HandleScope handleScope(v8::Isolate::GetCurrent());
77 WindowProxyManager::GlobalsVector globals; 76 WindowProxyManager::GlobalsVector globals;
78 oldFrame->getWindowProxyManager()->clearForNavigation(); 77 oldFrame->getWindowProxyManager()->clearForNavigation();
79 oldFrame->getWindowProxyManager()->releaseGlobals(globals); 78 oldFrame->getWindowProxyManager()->releaseGlobals(globals);
80 79
81 // Although the Document in this frame is now unloaded, many resources 80 // Although the Document in this frame is now unloaded, many resources
82 // associated with the frame itself have not yet been freed yet. 81 // associated with the frame itself have not yet been freed yet.
83 oldFrame->detach(FrameDetachType::Swap); 82 oldFrame->detach(FrameDetachType::Swap);
(...skipping 15 matching lines...) Expand all
99 if (owner->isLocal()) 98 if (owner->isLocal())
100 toHTMLFrameOwnerElement(owner)->setWidget(localFrame.view()); 99 toHTMLFrameOwnerElement(owner)->setWidget(localFrame.view());
101 } else { 100 } else {
102 localFrame.page()->setMainFrame(&localFrame); 101 localFrame.page()->setMainFrame(&localFrame);
103 // This trace event is needed to detect the main frame of the 102 // This trace event is needed to detect the main frame of the
104 // renderer in telemetry metrics. See crbug.com/692112#c11. 103 // renderer in telemetry metrics. See crbug.com/692112#c11.
105 TRACE_EVENT_INSTANT1("loading", "markAsMainFrame", 104 TRACE_EVENT_INSTANT1("loading", "markAsMainFrame",
106 TRACE_EVENT_SCOPE_THREAD, "frame", &localFrame); 105 TRACE_EVENT_SCOPE_THREAD, "frame", &localFrame);
107 } 106 }
108 } else { 107 } else {
109 toWebRemoteFrameImpl(frame)->initializeCoreFrame(host, owner, name, 108 toWebRemoteFrameImpl(frame)->initializeCoreFrame(host, owner, name);
110 uniqueName);
111 } 109 }
112 110
113 if (m_parent && oldFrame->hasReceivedUserGesture()) 111 if (m_parent && oldFrame->hasReceivedUserGesture())
114 frame->toImplBase()->frame()->setDocumentHasReceivedUserGesture(); 112 frame->toImplBase()->frame()->setDocumentHasReceivedUserGesture();
115 113
116 frame->toImplBase()->frame()->getWindowProxyManager()->setGlobals(globals); 114 frame->toImplBase()->frame()->getWindowProxyManager()->setGlobals(globals);
117 115
118 m_parent = nullptr; 116 m_parent = nullptr;
119 117
120 return true; 118 return true;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 for (WebFrame* child = frame->firstChild(); child; 310 for (WebFrame* child = frame->firstChild(); child;
313 child = child->nextSibling()) 311 child = child->nextSibling())
314 traceFrame(visitor, child); 312 traceFrame(visitor, child);
315 } 313 }
316 314
317 void WebFrame::close() { 315 void WebFrame::close() {
318 m_openedFrameTracker->dispose(); 316 m_openedFrameTracker->dispose();
319 } 317 }
320 318
321 } // namespace blink 319 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/LocalFrameClientImpl.cpp ('k') | third_party/WebKit/Source/web/WebFrameImplBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698