| 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 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 class CustomElementLifecycleCallbacks; | 42 class CustomElementLifecycleCallbacks; |
| 43 class Element; | 43 class Element; |
| 44 | 44 |
| 45 class CustomElementCallbackScheduler { | 45 class CustomElementCallbackScheduler { |
| 46 public: | 46 public: |
| 47 static void scheduleAttributeChangedCallback(PassRefPtr<CustomElementLifecyc
leCallbacks>, PassRefPtr<Element>, const AtomicString& name, const AtomicString&
oldValue, const AtomicString& newValue); | 47 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>); | 48 static void scheduleCreatedCallback(PassRefPtr<CustomElementLifecycleCallbac
ks>, PassRefPtr<Element>); |
| 49 static void scheduleEnteredViewCallback(PassRefPtr<CustomElementLifecycleCal
lbacks>, PassRefPtr<Element>); | 49 static void scheduleAttachedCallback(PassRefPtr<CustomElementLifecycleCallba
cks>, PassRefPtr<Element>); |
| 50 static void scheduleLeftViewCallback(PassRefPtr<CustomElementLifecycleCallba
cks>, PassRefPtr<Element>); | 50 static void scheduleDetachedCallback(PassRefPtr<CustomElementLifecycleCallba
cks>, PassRefPtr<Element>); |
| 51 | 51 |
| 52 protected: | 52 protected: |
| 53 friend class CustomElementCallbackDispatcher; | 53 friend class CustomElementCallbackDispatcher; |
| 54 static void clearElementCallbackQueueMap(); | 54 static void clearElementCallbackQueueMap(); |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 CustomElementCallbackScheduler() { } | 57 CustomElementCallbackScheduler() { } |
| 58 | 58 |
| 59 static CustomElementCallbackScheduler& instance(); | 59 static CustomElementCallbackScheduler& instance(); |
| 60 | 60 |
| 61 CustomElementCallbackQueue* ensureCallbackQueue(PassRefPtr<Element>); | 61 CustomElementCallbackQueue* ensureCallbackQueue(PassRefPtr<Element>); |
| 62 CustomElementCallbackQueue* schedule(PassRefPtr<Element>); | 62 CustomElementCallbackQueue* schedule(PassRefPtr<Element>); |
| 63 CustomElementCallbackQueue* scheduleInCurrentElementQueue(PassRefPtr<Element
>); | 63 CustomElementCallbackQueue* scheduleInCurrentElementQueue(PassRefPtr<Element
>); |
| 64 | 64 |
| 65 typedef HashMap<Element*, OwnPtr<CustomElementCallbackQueue> > ElementCallba
ckQueueMap; | 65 typedef HashMap<Element*, OwnPtr<CustomElementCallbackQueue> > ElementCallba
ckQueueMap; |
| 66 ElementCallbackQueueMap m_elementCallbackQueueMap; | 66 ElementCallbackQueueMap m_elementCallbackQueueMap; |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } | 69 } |
| 70 | 70 |
| 71 #endif // CustomElementCallbackScheduler_h | 71 #endif // CustomElementCallbackScheduler_h |
| OLD | NEW |