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

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

Issue 2702273004: bindings: Simplifies WindowProxyManager and its relation to Frame. (Closed)
Patch Set: Fixed WindowProxyManager::createWindowProxy(ForFrame). 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(); 73 AtomicString uniqueName = oldFrame->tree().uniqueName();
74 FrameOwner* owner = oldFrame->owner(); 74 FrameOwner* owner = oldFrame->owner();
75 75
76 v8::HandleScope handleScope(v8::Isolate::GetCurrent()); 76 v8::HandleScope handleScope(v8::Isolate::GetCurrent());
77 WindowProxyManagerBase::GlobalsVector globals; 77 WindowProxyManager::GlobalsVector globals;
78 oldFrame->getWindowProxyManager()->clearForNavigation(); 78 oldFrame->getWindowProxyManager()->clearForNavigation();
79 oldFrame->getWindowProxyManager()->releaseGlobals(globals); 79 oldFrame->getWindowProxyManager()->releaseGlobals(globals);
80 80
81 // Although the Document in this frame is now unloaded, many resources 81 // Although the Document in this frame is now unloaded, many resources
82 // associated with the frame itself have not yet been freed yet. 82 // associated with the frame itself have not yet been freed yet.
83 oldFrame->detach(FrameDetachType::Swap); 83 oldFrame->detach(FrameDetachType::Swap);
84 84
85 // Clone the state of the current Frame into the one being swapped in. 85 // Clone the state of the current Frame into the one being swapped in.
86 // FIXME: This is a bit clunky; this results in pointless decrements and 86 // FIXME: This is a bit clunky; this results in pointless decrements and
87 // increments of connected subframes. 87 // increments of connected subframes.
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 for (WebFrame* child = frame->firstChild(); child; 313 for (WebFrame* child = frame->firstChild(); child;
314 child = child->nextSibling()) 314 child = child->nextSibling())
315 traceFrame(visitor, child); 315 traceFrame(visitor, child);
316 } 316 }
317 317
318 void WebFrame::close() { 318 void WebFrame::close() {
319 m_openedFrameTracker->dispose(); 319 m_openedFrameTracker->dispose();
320 } 320 }
321 321
322 } // namespace blink 322 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698