Chromium Code Reviews| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 | 55 |
| 56 static void scheduleCallback(PassRefPtr<CustomElementLifecycleCallbacks>, Pa ssRefPtrWillBeRawPtr<Element>, CustomElementLifecycleCallbacks::CallbackType); | 56 static void scheduleCallback(PassRefPtr<CustomElementLifecycleCallbacks>, Pa ssRefPtrWillBeRawPtr<Element>, CustomElementLifecycleCallbacks::CallbackType); |
| 57 static void scheduleAttributeChangedCallback(PassRefPtr<CustomElementLifecyc leCallbacks>, PassRefPtrWillBeRawPtr<Element>, const AtomicString& name, const A tomicString& oldValue, const AtomicString& newValue); | 57 static void scheduleAttributeChangedCallback(PassRefPtr<CustomElementLifecyc leCallbacks>, PassRefPtrWillBeRawPtr<Element>, const AtomicString& name, const A tomicString& oldValue, const AtomicString& newValue); |
| 58 | 58 |
| 59 static void resolveOrScheduleResolution(PassRefPtrWillBeRawPtr<CustomElement RegistrationContext>, PassRefPtrWillBeRawPtr<Element>, const CustomElementDescri ptor&); | 59 static void resolveOrScheduleResolution(PassRefPtrWillBeRawPtr<CustomElement RegistrationContext>, PassRefPtrWillBeRawPtr<Element>, const CustomElementDescri ptor&); |
| 60 static CustomElementMicrotaskImportStep* scheduleImport(HTMLImportChild*); | 60 static CustomElementMicrotaskImportStep* scheduleImport(HTMLImportChild*); |
| 61 | 61 |
| 62 static void microtaskDispatcherDidFinish(); | 62 static void microtaskDispatcherDidFinish(); |
| 63 static void callbackDispatcherDidFinish(); | 63 static void callbackDispatcherDidFinish(); |
| 64 | 64 |
| 65 void trace(Visitor*); | 65 static void trace(Visitor*); |
|
esprehn
2014/09/04 02:22:43
static trace doesn't make any sense, you also dele
| |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 CustomElementScheduler() { } | 68 CustomElementScheduler() { } |
| 69 | 69 |
| 70 static CustomElementScheduler& instance(); | |
| 71 static void enqueueMicrotaskStep(Document&, PassOwnPtrWillBeRawPtr<CustomEle mentMicrotaskStep>, bool importIsSync = true); | 70 static void enqueueMicrotaskStep(Document&, PassOwnPtrWillBeRawPtr<CustomEle mentMicrotaskStep>, bool importIsSync = true); |
| 72 | |
| 73 CustomElementCallbackQueue& ensureCallbackQueue(PassRefPtrWillBeRawPtr<Eleme nt>); | |
| 74 CustomElementCallbackQueue& schedule(PassRefPtrWillBeRawPtr<Element>); | |
| 75 | |
| 76 // FIXME: Consider moving the element's callback queue to | |
| 77 // ElementRareData. Then the scheduler can become completely | |
| 78 // static. | |
| 79 void clearElementCallbackQueueMap(); | |
| 80 | |
| 81 // The element -> callback queue map is populated by the scheduler | |
| 82 // and owns the lifetimes of the CustomElementCallbackQueues. | |
| 83 typedef WillBeHeapHashMap<RawPtrWillBeMember<Element>, OwnPtrWillBeMember<Cu stomElementCallbackQueue> > ElementCallbackQueueMap; | |
| 84 ElementCallbackQueueMap m_elementCallbackQueueMap; | |
| 85 }; | 71 }; |
| 86 | 72 |
| 87 } | 73 } |
| 88 | 74 |
| 89 #endif // CustomElementScheduler_h | 75 #endif // CustomElementScheduler_h |
| OLD | NEW |