OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 21 matching lines...) Expand all Loading... |
32 #define CustomElementCallbackScheduler_h | 32 #define CustomElementCallbackScheduler_h |
33 | 33 |
34 #include "core/dom/custom/CustomElementCallbackQueue.h" | 34 #include "core/dom/custom/CustomElementCallbackQueue.h" |
35 #include "wtf/HashMap.h" | 35 #include "wtf/HashMap.h" |
36 #include "wtf/OwnPtr.h" | 36 #include "wtf/OwnPtr.h" |
37 #include "wtf/PassRefPtr.h" | 37 #include "wtf/PassRefPtr.h" |
38 #include "wtf/text/AtomicString.h" | 38 #include "wtf/text/AtomicString.h" |
39 | 39 |
40 namespace WebCore { | 40 namespace WebCore { |
41 | 41 |
| 42 class CustomElementDescriptor; |
42 class CustomElementLifecycleCallbacks; | 43 class CustomElementLifecycleCallbacks; |
| 44 class CustomElementPendingImport; |
43 class Element; | 45 class Element; |
44 | 46 |
45 class CustomElementCallbackScheduler { | 47 class CustomElementCallbackScheduler { |
46 public: | 48 public: |
47 static void scheduleAttributeChangedCallback(PassRefPtr<CustomElementLifecyc
leCallbacks>, PassRefPtr<Element>, const AtomicString& name, const AtomicString&
oldValue, const AtomicString& newValue); | 49 static void scheduleAttributeChangedCallback(PassRefPtr<CustomElementLifecyc
leCallbacks>, PassRefPtr<Element>, const AtomicString& name, const AtomicString&
oldValue, const AtomicString& newValue); |
48 static void scheduleCreatedCallback(PassRefPtr<CustomElementLifecycleCallbac
ks>, PassRefPtr<Element>); | |
49 static void scheduleAttachedCallback(PassRefPtr<CustomElementLifecycleCallba
cks>, PassRefPtr<Element>); | 50 static void scheduleAttachedCallback(PassRefPtr<CustomElementLifecycleCallba
cks>, PassRefPtr<Element>); |
50 static void scheduleDetachedCallback(PassRefPtr<CustomElementLifecycleCallba
cks>, PassRefPtr<Element>); | 51 static void scheduleDetachedCallback(PassRefPtr<CustomElementLifecycleCallba
cks>, PassRefPtr<Element>); |
| 52 static void scheduleResolutionStep(const CustomElementDescriptor&, PassRefPt
r<Element>); |
51 | 53 |
52 protected: | 54 protected: |
53 friend class CustomElementCallbackDispatcher; | 55 friend class CustomElementCallbackDispatcher; |
54 static void clearElementCallbackQueueMap(); | 56 static void clearElementCallbackQueueMap(); |
55 | 57 |
56 private: | 58 private: |
57 CustomElementCallbackScheduler() { } | 59 CustomElementCallbackScheduler() { } |
58 | 60 |
59 static CustomElementCallbackScheduler& instance(); | 61 static CustomElementCallbackScheduler& instance(); |
60 | 62 |
61 CustomElementCallbackQueue* ensureCallbackQueue(PassRefPtr<Element>); | 63 CustomElementCallbackQueue* ensureCallbackQueue(PassRefPtr<Element>); |
62 CustomElementCallbackQueue* schedule(PassRefPtr<Element>); | 64 CustomElementCallbackQueue* schedule(PassRefPtr<Element>); |
63 CustomElementCallbackQueue* scheduleInCurrentElementQueue(PassRefPtr<Element
>); | 65 CustomElementCallbackQueue* scheduleInCurrentElementQueue(PassRefPtr<Element
>); |
64 | 66 |
65 typedef HashMap<Element*, OwnPtr<CustomElementCallbackQueue> > ElementCallba
ckQueueMap; | 67 typedef HashMap<Element*, OwnPtr<CustomElementCallbackQueue> > ElementCallba
ckQueueMap; |
66 ElementCallbackQueueMap m_elementCallbackQueueMap; | 68 ElementCallbackQueueMap m_elementCallbackQueueMap; |
67 }; | 69 }; |
68 | 70 |
69 } | 71 } |
70 | 72 |
71 #endif // CustomElementCallbackScheduler_h | 73 #endif // CustomElementCallbackScheduler_h |
OLD | NEW |