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

Side by Side Diff: third_party/WebKit/Source/core/dom/ChildFrameDisconnector.h

Issue 1770523002: Track connected subframes per-Document instead of per-Node. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix various crashes but still doesn't refcount tracked nodes (and needs to) Created 4 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
(Empty)
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.
4
5 #ifndef ChildFrameDisconnector_h
6 #define ChildFrameDisconnector_h
7
8 #include "platform/heap/Handle.h"
9
10 namespace blink {
11
12 class ElementShadow;
13 class HTMLFrameOwnerElement;
14 class Node;
15
16 class ChildFrameDisconnector {
17 STACK_ALLOCATED();
18 public:
19 enum DisconnectPolicy {
20 RootAndDescendants,
21 DescendantsOnly
22 };
23
24 explicit ChildFrameDisconnector(Node& root)
25 : m_root(root)
26 {
27 }
28
29 void disconnect(DisconnectPolicy = RootAndDescendants);
30
31 private:
32 void collectFrameOwners(Node&);
33 void collectFrameOwners(ElementShadow&);
34 void disconnectCollectedFrameOwners();
35 Node& root() const { return *m_root; }
36
37 WillBeHeapVector<RefPtrWillBeMember<HTMLFrameOwnerElement>, 10> m_frameOwner s;
38 RawPtrWillBeMember<Node> m_root;
39 };
40
41 } // namespace blink
42
43 #endif // ChildFrameDisconnector_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/dom/ChildFrameDisconnector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698