Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: Source/core/dom/custom/CustomElementMicrotaskQueue.h

Issue 238923009: HTML Imports: No more BlockingDocumentCreation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased to ToT. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef CustomElementMicrotaskQueue_h 31 #ifndef CustomElementMicrotaskQueue_h
32 #define CustomElementMicrotaskQueue_h 32 #define CustomElementMicrotaskQueue_h
33 33
34 #include "core/dom/custom/CustomElementMicrotaskStep.h" 34 #include "core/dom/custom/CustomElementMicrotaskStep.h"
35 #include "wtf/OwnPtr.h" 35 #include "wtf/OwnPtr.h"
36 #include "wtf/PassOwnPtr.h" 36 #include "wtf/PassOwnPtr.h"
37 #include "wtf/PassRefPtr.h"
38 #include "wtf/RefCounted.h"
39 #include "wtf/RefPtr.h"
37 #include "wtf/Vector.h" 40 #include "wtf/Vector.h"
38 41
39 namespace WebCore { 42 namespace WebCore {
40 43
41 class CustomElementMicrotaskQueue { 44 class CustomElementMicrotaskQueue : public RefCounted<CustomElementMicrotaskQueu e> {
42 WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskQueue); 45 WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskQueue);
43 public: 46 public:
44 CustomElementMicrotaskQueue() { } 47 static PassRefPtr<CustomElementMicrotaskQueue> create() { return adoptRef(ne w CustomElementMicrotaskQueue()); }
45 48
46 bool isEmpty() { return m_queue.isEmpty(); } 49
50 bool isEmpty() const { return m_queue.isEmpty(); }
47 void enqueue(PassOwnPtr<CustomElementMicrotaskStep>); 51 void enqueue(PassOwnPtr<CustomElementMicrotaskStep>);
48 52
49 typedef CustomElementMicrotaskStep::Result Result; 53 typedef CustomElementMicrotaskStep::Result Result;
50 Result dispatch(); 54 Result dispatch();
51 55
52 private: 56 private:
57 CustomElementMicrotaskQueue() { }
58
53 Vector<OwnPtr<CustomElementMicrotaskStep> > m_queue; 59 Vector<OwnPtr<CustomElementMicrotaskStep> > m_queue;
54 }; 60 };
55 61
56 } 62 }
57 63
58 #endif // CustomElementMicrotaskQueue_h 64 #endif // CustomElementMicrotaskQueue_h
OLDNEW
« no previous file with comments | « Source/core/dom/custom/CustomElementMicrotaskImportStep.cpp ('k') | Source/core/dom/custom/CustomElementMicrotaskQueue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698