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 CustomElementRegistrationContext; | |
dominicc (has gone to gerrit)
2013/12/18 08:46:41
Don't think this is needed any more.
Hajime Morrita
2013/12/19 05:06:59
Done.
| |
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>); | 50 static void scheduleCreatedCallback(PassRefPtr<CustomElementLifecycleCallbac ks>, PassRefPtr<Element>); |
49 static void scheduleEnteredViewCallback(PassRefPtr<CustomElementLifecycleCal lbacks>, PassRefPtr<Element>); | 51 static void scheduleEnteredViewCallback(PassRefPtr<CustomElementLifecycleCal lbacks>, PassRefPtr<Element>); |
50 static void scheduleLeftViewCallback(PassRefPtr<CustomElementLifecycleCallba cks>, PassRefPtr<Element>); | 52 static void scheduleLeftViewCallback(PassRefPtr<CustomElementLifecycleCallba cks>, PassRefPtr<Element>); |
53 static void scheduleResolutionStep(const CustomElementDescriptor&, PassRefPt r<Element>); | |
51 | 54 |
52 protected: | 55 protected: |
53 friend class CustomElementCallbackDispatcher; | 56 friend class CustomElementCallbackDispatcher; |
54 static void clearElementCallbackQueueMap(); | 57 static void clearElementCallbackQueueMap(); |
55 | 58 |
56 private: | 59 private: |
57 CustomElementCallbackScheduler() { } | 60 CustomElementCallbackScheduler() { } |
58 | 61 |
59 static CustomElementCallbackScheduler& instance(); | 62 static CustomElementCallbackScheduler& instance(); |
60 | 63 |
61 CustomElementCallbackQueue* ensureCallbackQueue(PassRefPtr<Element>); | 64 CustomElementCallbackQueue* ensureCallbackQueue(PassRefPtr<Element>); |
62 CustomElementCallbackQueue* schedule(PassRefPtr<Element>); | 65 CustomElementCallbackQueue* schedule(PassRefPtr<Element>); |
63 CustomElementCallbackQueue* scheduleInCurrentElementQueue(PassRefPtr<Element >); | 66 CustomElementCallbackQueue* scheduleInCurrentElementQueue(PassRefPtr<Element >); |
64 | 67 |
65 typedef HashMap<Element*, OwnPtr<CustomElementCallbackQueue> > ElementCallba ckQueueMap; | 68 typedef HashMap<Element*, OwnPtr<CustomElementCallbackQueue> > ElementCallba ckQueueMap; |
66 ElementCallbackQueueMap m_elementCallbackQueueMap; | 69 ElementCallbackQueueMap m_elementCallbackQueueMap; |
67 }; | 70 }; |
68 | 71 |
69 } | 72 } |
70 | 73 |
71 #endif // CustomElementCallbackScheduler_h | 74 #endif // CustomElementCallbackScheduler_h |
OLD | NEW |