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

Side by Side Diff: Source/core/html/imports/HTMLImportLoader.h

Issue 334253005: Custom Elements: Encapsulates Async and Sync Queues into one class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years, 6 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 22 matching lines...) Expand all
33 33
34 #include "core/fetch/RawResource.h" 34 #include "core/fetch/RawResource.h"
35 #include "core/fetch/ResourceOwner.h" 35 #include "core/fetch/ResourceOwner.h"
36 #include "platform/heap/Handle.h" 36 #include "platform/heap/Handle.h"
37 #include "wtf/OwnPtr.h" 37 #include "wtf/OwnPtr.h"
38 #include "wtf/PassOwnPtr.h" 38 #include "wtf/PassOwnPtr.h"
39 #include "wtf/Vector.h" 39 #include "wtf/Vector.h"
40 40
41 namespace WebCore { 41 namespace WebCore {
42 42
43 class CustomElementMicrotaskQueue; 43 class CustomElementSyncMicrotaskQueue;
44 class Document; 44 class Document;
45 class DocumentWriter; 45 class DocumentWriter;
46 class HTMLImportChild; 46 class HTMLImportChild;
47 class HTMLImportsController; 47 class HTMLImportsController;
48 48
49 49
50 // 50 //
51 // Owning imported Document lifetime. It also implements ResourceClient through ResourceOwner 51 // Owning imported Document lifetime. It also implements ResourceClient through ResourceOwner
52 // to feed fetched bytes to the DocumentWriter of the imported document. 52 // to feed fetched bytes to the DocumentWriter of the imported document.
53 // HTMLImportLoader is owned by HTMLImportsController. 53 // HTMLImportLoader is owned by HTMLImportsController.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 void startLoading(const ResourcePtr<RawResource>&); 89 void startLoading(const ResourcePtr<RawResource>&);
90 90
91 // Tells the loader that the parser is done with this import. 91 // Tells the loader that the parser is done with this import.
92 // Called by Document::finishedParsing, after DOMContentLoaded was dispatche d. 92 // Called by Document::finishedParsing, after DOMContentLoaded was dispatche d.
93 void didFinishParsing(); 93 void didFinishParsing();
94 // Tells the loader that all of the import's stylesheets finished 94 // Tells the loader that all of the import's stylesheets finished
95 // loading. 95 // loading.
96 // Called by Document::didRemoveAllPendingStylesheet. 96 // Called by Document::didRemoveAllPendingStylesheet.
97 void didRemoveAllPendingStylesheet(); 97 void didRemoveAllPendingStylesheet();
98 98
99 PassRefPtrWillBeRawPtr<CustomElementMicrotaskQueue> microtaskQueue() const; 99 PassRefPtrWillBeRawPtr<CustomElementSyncMicrotaskQueue> microtaskQueue() con st;
100 100
101 virtual void trace(Visitor*); 101 virtual void trace(Visitor*);
102 102
103 private: 103 private:
104 HTMLImportLoader(HTMLImportsController*); 104 HTMLImportLoader(HTMLImportsController*);
105 105
106 // RawResourceClient 106 // RawResourceClient
107 virtual void responseReceived(Resource*, const ResourceResponse&) OVERRIDE; 107 virtual void responseReceived(Resource*, const ResourceResponse&) OVERRIDE;
108 virtual void dataReceived(Resource*, const char* data, int length) OVERRIDE; 108 virtual void dataReceived(Resource*, const char* data, int length) OVERRIDE;
109 virtual void notifyFinished(Resource*) OVERRIDE; 109 virtual void notifyFinished(Resource*) OVERRIDE;
110 110
111 State startWritingAndParsing(const ResourceResponse&); 111 State startWritingAndParsing(const ResourceResponse&);
112 State finishWriting(); 112 State finishWriting();
113 State finishParsing(); 113 State finishParsing();
114 State finishLoading(); 114 State finishLoading();
115 115
116 void setState(State); 116 void setState(State);
117 void didFinishLoading(); 117 void didFinishLoading();
118 bool hasPendingResources() const; 118 bool hasPendingResources() const;
119 #if !ENABLE(OILPAN) 119 #if !ENABLE(OILPAN)
120 void clear(); 120 void clear();
121 #endif 121 #endif
122 122
123 RawPtrWillBeMember<HTMLImportsController> m_controller; 123 RawPtrWillBeMember<HTMLImportsController> m_controller;
124 WillBeHeapVector<RawPtrWillBeMember<HTMLImportChild> > m_imports; 124 WillBeHeapVector<RawPtrWillBeMember<HTMLImportChild> > m_imports;
125 State m_state; 125 State m_state;
126 RefPtrWillBeMember<Document> m_document; 126 RefPtrWillBeMember<Document> m_document;
127 RefPtrWillBeMember<DocumentWriter> m_writer; 127 RefPtrWillBeMember<DocumentWriter> m_writer;
128 RefPtrWillBeMember<CustomElementMicrotaskQueue> m_microtaskQueue; 128 RefPtrWillBeMember<CustomElementSyncMicrotaskQueue> m_microtaskQueue;
129 }; 129 };
130 130
131 } // namespace WebCore 131 } // namespace WebCore
132 132
133 #endif // HTMLImportLoader_h 133 #endif // HTMLImportLoader_h
OLDNEW
« no previous file with comments | « Source/core/html/imports/HTMLImportChild.cpp ('k') | Source/core/html/imports/HTMLImportLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698