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

Side by Side Diff: Source/core/dom/CustomElementRegistry.h

Issue 17351003: Rename ContextDestructionObserver to ContextLifecycleObserver (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reapplied Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/ContextLifecycleObserver.cpp ('k') | Source/core/dom/CustomElementRegistry.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef CustomElementRegistry_h 31 #ifndef CustomElementRegistry_h
32 #define CustomElementRegistry_h 32 #define CustomElementRegistry_h
33 33
34 #include "bindings/v8/ScriptValue.h" 34 #include "bindings/v8/ScriptValue.h"
35 #include "core/dom/ContextDestructionObserver.h" 35 #include "core/dom/ContextLifecycleObserver.h"
36 #include "core/dom/CustomElementUpgradeCandidateMap.h" 36 #include "core/dom/CustomElementUpgradeCandidateMap.h"
37 #include "core/dom/ExceptionCode.h" 37 #include "core/dom/ExceptionCode.h"
38 #include "core/dom/QualifiedName.h" 38 #include "core/dom/QualifiedName.h"
39 #include "wtf/HashSet.h" 39 #include "wtf/HashSet.h"
40 #include "wtf/ListHashSet.h" 40 #include "wtf/ListHashSet.h"
41 #include "wtf/PassRefPtr.h" 41 #include "wtf/PassRefPtr.h"
42 #include "wtf/RefCounted.h" 42 #include "wtf/RefCounted.h"
43 #include "wtf/RefPtr.h" 43 #include "wtf/RefPtr.h"
44 #include "wtf/Vector.h" 44 #include "wtf/Vector.h"
45 #include "wtf/text/AtomicString.h" 45 #include "wtf/text/AtomicString.h"
(...skipping 13 matching lines...) Expand all
59 ~CustomElementInvocation(); 59 ~CustomElementInvocation();
60 60
61 Element* element() const { return m_element.get(); } 61 Element* element() const { return m_element.get(); }
62 62
63 private: 63 private:
64 RefPtr<Element> m_element; 64 RefPtr<Element> m_element;
65 }; 65 };
66 66
67 void setTypeExtension(Element*, const AtomicString& typeExtension); 67 void setTypeExtension(Element*, const AtomicString& typeExtension);
68 68
69 class CustomElementRegistry : public RefCounted<CustomElementRegistry>, public C ontextDestructionObserver { 69 class CustomElementRegistry : public RefCounted<CustomElementRegistry>, public C ontextLifecycleObserver {
70 WTF_MAKE_NONCOPYABLE(CustomElementRegistry); WTF_MAKE_FAST_ALLOCATED; 70 WTF_MAKE_NONCOPYABLE(CustomElementRegistry); WTF_MAKE_FAST_ALLOCATED;
71 public: 71 public:
72 class CallbackDeliveryScope { 72 class CallbackDeliveryScope {
73 public: 73 public:
74 CallbackDeliveryScope() { } 74 CallbackDeliveryScope() { }
75 ~CallbackDeliveryScope() { CustomElementRegistry::deliverAllLifecycleCal lbacksIfNeeded(); } 75 ~CallbackDeliveryScope() { CustomElementRegistry::deliverAllLifecycleCal lbacksIfNeeded(); }
76 }; 76 };
77 77
78 explicit CustomElementRegistry(Document*); 78 explicit CustomElementRegistry(Document*);
79 ~CustomElementRegistry(); 79 ~CustomElementRegistry();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 inline CustomElementRegistry::InstanceSet& CustomElementRegistry::activeCustomEl ementRegistries() 126 inline CustomElementRegistry::InstanceSet& CustomElementRegistry::activeCustomEl ementRegistries()
127 { 127 {
128 DEFINE_STATIC_LOCAL(InstanceSet, activeInstances, ()); 128 DEFINE_STATIC_LOCAL(InstanceSet, activeInstances, ());
129 return activeInstances; 129 return activeInstances;
130 } 130 }
131 131
132 132
133 } // namespace WebCore 133 } // namespace WebCore
134 134
135 #endif 135 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/ContextLifecycleObserver.cpp ('k') | Source/core/dom/CustomElementRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698