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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 23 matching lines...) Expand all
34 #include "core/dom/MutationObserver.h" 34 #include "core/dom/MutationObserver.h"
35 #include "platform/heap/Handle.h" 35 #include "platform/heap/Handle.h"
36 #include "wtf/HashSet.h" 36 #include "wtf/HashSet.h"
37 #include "wtf/text/AtomicString.h" 37 #include "wtf/text/AtomicString.h"
38 #include "wtf/text/AtomicStringHash.h" 38 #include "wtf/text/AtomicStringHash.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 class QualifiedName; 42 class QualifiedName;
43 43
44 class MutationObserverRegistration final : public NoBaseWillBeGarbageCollectedFi nalized<MutationObserverRegistration> { 44 class MutationObserverRegistration final : public GarbageCollectedFinalized<Muta tionObserverRegistration> {
45 USING_FAST_MALLOC_WILL_BE_REMOVED(MutationObserverRegistration);
46 public: 45 public:
47 static PassOwnPtrWillBeRawPtr<MutationObserverRegistration> create(MutationO bserver&, Node*, MutationObserverOptions, const HashSet<AtomicString>& attribute Filter); 46 static RawPtr<MutationObserverRegistration> create(MutationObserver&, Node*, MutationObserverOptions, const HashSet<AtomicString>& attributeFilter);
48 ~MutationObserverRegistration(); 47 ~MutationObserverRegistration();
49 48
50 void resetObservation(MutationObserverOptions, const HashSet<AtomicString>& attributeFilter); 49 void resetObservation(MutationObserverOptions, const HashSet<AtomicString>& attributeFilter);
51 void observedSubtreeNodeWillDetach(Node&); 50 void observedSubtreeNodeWillDetach(Node&);
52 void clearTransientRegistrations(); 51 void clearTransientRegistrations();
53 bool hasTransientRegistrations() const { return m_transientRegistrationNodes && !m_transientRegistrationNodes->isEmpty(); } 52 bool hasTransientRegistrations() const { return m_transientRegistrationNodes && !m_transientRegistrationNodes->isEmpty(); }
54 void unregister(); 53 void unregister();
55 54
56 bool shouldReceiveMutationFrom(Node&, MutationObserver::MutationType, const QualifiedName* attributeName) const; 55 bool shouldReceiveMutationFrom(Node&, MutationObserver::MutationType, const QualifiedName* attributeName) const;
57 bool isSubtree() const { return m_options & MutationObserver::Subtree; } 56 bool isSubtree() const { return m_options & MutationObserver::Subtree; }
58 57
59 MutationObserver& observer() const { return *m_observer; } 58 MutationObserver& observer() const { return *m_observer; }
60 MutationRecordDeliveryOptions deliveryOptions() const { return m_options & ( MutationObserver::AttributeOldValue | MutationObserver::CharacterDataOldValue); } 59 MutationRecordDeliveryOptions deliveryOptions() const { return m_options & ( MutationObserver::AttributeOldValue | MutationObserver::CharacterDataOldValue); }
61 MutationObserverOptions mutationTypes() const { return m_options & MutationO bserver::AllMutationTypes; } 60 MutationObserverOptions mutationTypes() const { return m_options & MutationO bserver::AllMutationTypes; }
62 61
63 void addRegistrationNodesToSet(WillBeHeapHashSet<RawPtrWillBeMember<Node>>&) const; 62 void addRegistrationNodesToSet(HeapHashSet<Member<Node>>&) const;
64 63
65 DECLARE_TRACE(); 64 DECLARE_TRACE();
66 65
67 void dispose(); 66 void dispose();
68 67
69 private: 68 private:
70 MutationObserverRegistration(MutationObserver&, Node*, MutationObserverOptio ns, const HashSet<AtomicString>& attributeFilter); 69 MutationObserverRegistration(MutationObserver&, Node*, MutationObserverOptio ns, const HashSet<AtomicString>& attributeFilter);
71 70
72 RefPtrWillBeMember<MutationObserver> m_observer; 71 Member<MutationObserver> m_observer;
73 RawPtrWillBeWeakMember<Node> m_registrationNode; 72 WeakMember<Node> m_registrationNode;
74 RefPtrWillBeMember<Node> m_registrationNodeKeepAlive; 73 Member<Node> m_registrationNodeKeepAlive;
75 typedef WillBeHeapHashSet<RefPtrWillBeMember<Node>> NodeHashSet; 74 typedef HeapHashSet<Member<Node>> NodeHashSet;
76 OwnPtrWillBeMember<NodeHashSet> m_transientRegistrationNodes; 75 Member<NodeHashSet> m_transientRegistrationNodes;
77 76
78 MutationObserverOptions m_options; 77 MutationObserverOptions m_options;
79 HashSet<AtomicString> m_attributeFilter; 78 HashSet<AtomicString> m_attributeFilter;
80 }; 79 };
81 80
82 } // namespace blink 81 } // namespace blink
83 82
84 #endif // MutationObserverRegistration_h 83 #endif // MutationObserverRegistration_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698