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 30 matching lines...) Expand all Loading... |
41 | 41 |
42 namespace WebCore { | 42 namespace WebCore { |
43 | 43 |
44 class CustomElementMicrotaskQueue : public RefCounted<CustomElementMicrotaskQueu
e> { | 44 class CustomElementMicrotaskQueue : public RefCounted<CustomElementMicrotaskQueu
e> { |
45 WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskQueue); | 45 WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskQueue); |
46 public: | 46 public: |
47 static PassRefPtr<CustomElementMicrotaskQueue> create() { return adoptRef(ne
w CustomElementMicrotaskQueue()); } | 47 static PassRefPtr<CustomElementMicrotaskQueue> create() { return adoptRef(ne
w CustomElementMicrotaskQueue()); } |
48 | 48 |
49 | 49 |
50 bool isEmpty() const { return m_queue.isEmpty(); } | 50 bool isEmpty() const { return m_queue.isEmpty(); } |
| 51 size_t size() const { return m_queue.size(); } |
51 void enqueue(PassOwnPtr<CustomElementMicrotaskStep>); | 52 void enqueue(PassOwnPtr<CustomElementMicrotaskStep>); |
52 | 53 |
53 typedef CustomElementMicrotaskStep::Result Result; | 54 typedef CustomElementMicrotaskStep::Result Result; |
54 Result dispatch(); | 55 Result dispatch(); |
55 bool needsProcessOrStop() const; | |
56 | 56 |
57 #if !defined(NDEBUG) | 57 #if !defined(NDEBUG) |
58 void show(unsigned indent); | 58 void show(unsigned indent); |
59 #endif | 59 #endif |
60 private: | 60 private: |
61 CustomElementMicrotaskQueue() { } | 61 CustomElementMicrotaskQueue() { } |
62 | 62 |
63 Vector<OwnPtr<CustomElementMicrotaskStep> > m_queue; | 63 Vector<OwnPtr<CustomElementMicrotaskStep> > m_queue; |
64 }; | 64 }; |
65 | 65 |
66 } | 66 } |
67 | 67 |
68 #endif // CustomElementMicrotaskQueue_h | 68 #endif // CustomElementMicrotaskQueue_h |
OLD | NEW |