OLD | NEW |
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 <algorithm> |
7 #include "bindings/core/v8/WindowProxyManager.h" | 8 #include "bindings/core/v8/WindowProxyManager.h" |
8 #include "core/HTMLNames.h" | 9 #include "core/HTMLNames.h" |
9 #include "core/frame/FrameHost.h" | 10 #include "core/frame/FrameHost.h" |
10 #include "core/frame/FrameView.h" | 11 #include "core/frame/FrameView.h" |
11 #include "core/frame/LocalFrame.h" | 12 #include "core/frame/LocalFrame.h" |
12 #include "core/frame/RemoteFrame.h" | 13 #include "core/frame/RemoteFrame.h" |
13 #include "core/html/HTMLFrameElementBase.h" | 14 #include "core/html/HTMLFrameElementBase.h" |
14 #include "core/html/HTMLFrameOwnerElement.h" | 15 #include "core/html/HTMLFrameOwnerElement.h" |
15 #include "core/page/Page.h" | 16 #include "core/page/Page.h" |
16 #include "platform/UserGestureIndicator.h" | 17 #include "platform/UserGestureIndicator.h" |
17 #include "platform/heap/Handle.h" | 18 #include "platform/heap/Handle.h" |
18 #include "public/web/WebElement.h" | 19 #include "public/web/WebElement.h" |
19 #include "public/web/WebFrameOwnerProperties.h" | 20 #include "public/web/WebFrameOwnerProperties.h" |
20 #include "public/web/WebSandboxFlags.h" | 21 #include "public/web/WebSandboxFlags.h" |
21 #include "web/OpenedFrameTracker.h" | 22 #include "web/OpenedFrameTracker.h" |
22 #include "web/RemoteFrameOwner.h" | 23 #include "web/RemoteFrameOwner.h" |
23 #include "web/WebLocalFrameImpl.h" | 24 #include "web/WebLocalFrameImpl.h" |
24 #include "web/WebRemoteFrameImpl.h" | 25 #include "web/WebRemoteFrameImpl.h" |
25 #include <algorithm> | |
26 | 26 |
27 namespace blink { | 27 namespace blink { |
28 | 28 |
29 bool WebFrame::swap(WebFrame* frame) { | 29 bool WebFrame::swap(WebFrame* frame) { |
30 using std::swap; | 30 using std::swap; |
31 Frame* oldFrame = toImplBase()->frame(); | 31 Frame* oldFrame = toImplBase()->frame(); |
32 if (oldFrame->isDetaching()) | 32 if (oldFrame->isDetaching()) |
33 return false; | 33 return false; |
34 | 34 |
35 // Unload the current Document in this frame: this calls unload handlers, | 35 // Unload the current Document in this frame: this calls unload handlers, |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 // m_opener is a weak reference. | 320 // m_opener is a weak reference. |
321 frame->m_openedFrameTracker->traceFrames(visitor); | 321 frame->m_openedFrameTracker->traceFrames(visitor); |
322 } | 322 } |
323 | 323 |
324 void WebFrame::clearWeakFrames(Visitor* visitor) { | 324 void WebFrame::clearWeakFrames(Visitor* visitor) { |
325 if (!isFrameAlive(m_opener)) | 325 if (!isFrameAlive(m_opener)) |
326 m_opener = nullptr; | 326 m_opener = nullptr; |
327 } | 327 } |
328 | 328 |
329 } // namespace blink | 329 } // namespace blink |
OLD | NEW |