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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 static CustomElementMicrotaskImportStep* scheduleImport(HTMLImportChild*); | 56 static CustomElementMicrotaskImportStep* scheduleImport(HTMLImportChild*); |
57 | 57 |
58 static void microtaskDispatcherDidFinish(); | 58 static void microtaskDispatcherDidFinish(); |
59 static void callbackDispatcherDidFinish(); | 59 static void callbackDispatcherDidFinish(); |
60 | 60 |
61 private: | 61 private: |
62 CustomElementScheduler() { } | 62 CustomElementScheduler() { } |
63 | 63 |
64 static CustomElementScheduler& instance(); | 64 static CustomElementScheduler& instance(); |
65 | 65 |
66 CustomElementCallbackQueue* ensureCallbackQueue(PassRefPtr<Element>); | 66 CustomElementCallbackQueue& ensureCallbackQueue(PassRefPtr<Element>); |
67 CustomElementCallbackQueue* schedule(PassRefPtr<Element>); | 67 CustomElementCallbackQueue& schedule(PassRefPtr<Element>); |
68 | 68 |
69 // FIXME: Consider moving the element's callback queue to | 69 // FIXME: Consider moving the element's callback queue to |
70 // ElementRareData. Then the scheduler can become completely | 70 // ElementRareData. Then the scheduler can become completely |
71 // static. | 71 // static. |
72 void clearElementCallbackQueueMap(); | 72 void clearElementCallbackQueueMap(); |
73 | 73 |
74 // The element -> callback queue map is populated by the scheduler | 74 // The element -> callback queue map is populated by the scheduler |
75 // and owns the lifetimes of the CustomElementCallbackQueues. | 75 // and owns the lifetimes of the CustomElementCallbackQueues. |
76 typedef HashMap<Element*, OwnPtr<CustomElementCallbackQueue> > ElementCallba
ckQueueMap; | 76 typedef HashMap<Element*, OwnPtr<CustomElementCallbackQueue> > ElementCallba
ckQueueMap; |
77 ElementCallbackQueueMap m_elementCallbackQueueMap; | 77 ElementCallbackQueueMap m_elementCallbackQueueMap; |
78 }; | 78 }; |
79 | 79 |
80 } | 80 } |
81 | 81 |
82 #endif // CustomElementScheduler_h | 82 #endif // CustomElementScheduler_h |
OLD | NEW |