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 "core/frame/RemoteFrame.h" | 5 #include "core/frame/RemoteFrame.h" |
6 | 6 |
7 #include "bindings/core/v8/WindowProxy.h" | 7 #include "bindings/core/v8/WindowProxy.h" |
8 #include "bindings/core/v8/WindowProxyManager.h" | 8 #include "bindings/core/v8/WindowProxyManager.h" |
9 #include "core/dom/RemoteSecurityContext.h" | 9 #include "core/dom/RemoteSecurityContext.h" |
10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 void RemoteFrame::advanceFocus(WebFocusType type, LocalFrame* source) { | 186 void RemoteFrame::advanceFocus(WebFocusType type, LocalFrame* source) { |
187 client()->advanceFocus(type, source); | 187 client()->advanceFocus(type, source); |
188 } | 188 } |
189 | 189 |
190 void RemoteFrame::detachChildren() { | 190 void RemoteFrame::detachChildren() { |
191 using FrameVector = HeapVector<Member<Frame>>; | 191 using FrameVector = HeapVector<Member<Frame>>; |
192 FrameVector childrenToDetach; | 192 FrameVector childrenToDetach; |
193 childrenToDetach.reserveCapacity(tree().childCount()); | 193 childrenToDetach.reserveCapacity(tree().childCount()); |
194 for (Frame* child = tree().firstChild(); child; | 194 for (Frame* child = tree().firstChild(); child; |
195 child = child->tree().nextSibling()) | 195 child = child->tree().nextSibling()) |
196 childrenToDetach.append(child); | 196 childrenToDetach.push_back(child); |
197 for (const auto& child : childrenToDetach) | 197 for (const auto& child : childrenToDetach) |
198 child->detach(FrameDetachType::Remove); | 198 child->detach(FrameDetachType::Remove); |
199 } | 199 } |
200 | 200 |
201 } // namespace blink | 201 } // namespace blink |
OLD | NEW |