Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / core / dom / ChildFrameDisconnector.h
blobb57ad10d4211816823cdd30b0927f44f679eefca
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
3 // found in the LICENSE file.
5 #ifndef ChildFrameDisconnector_h
6 #define ChildFrameDisconnector_h
8 #include "platform/heap/Handle.h"
10 namespace blink {
12 class ElementShadow;
13 class HTMLFrameOwnerElement;
14 class Node;
16 class ChildFrameDisconnector {
17 STACK_ALLOCATED();
18 public:
19 enum DisconnectPolicy {
20 RootAndDescendants,
21 DescendantsOnly
24 explicit ChildFrameDisconnector(Node& root)
25 : m_root(root)
29 void disconnect(DisconnectPolicy = RootAndDescendants);
31 private:
32 void collectFrameOwners(Node&);
33 void collectFrameOwners(ElementShadow&);
34 void disconnectCollectedFrameOwners();
35 Node& root() const { return *m_root; }
37 WillBeHeapVector<RefPtrWillBeMember<HTMLFrameOwnerElement>, 10> m_frameOwners;
38 RawPtrWillBeMember<Node> m_root;
41 } // namespace blink
43 #endif // ChildFrameDisconnector_h