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 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 virtual void showThis() OVERRIDE; | 81 virtual void showThis() OVERRIDE; |
82 #endif | 82 #endif |
83 | 83 |
84 void setClient(HTMLImportChildClient*); | 84 void setClient(HTMLImportChildClient*); |
85 void clearClient(); | 85 void clearClient(); |
86 bool loaderHasError() const; | 86 bool loaderHasError() const; |
87 | 87 |
88 void didFinishLoading(); | 88 void didFinishLoading(); |
89 void didFinishUpgradingCustomElements(); | 89 void didFinishUpgradingCustomElements(); |
90 bool isLoaded() const; | 90 bool isLoaded() const; |
| 91 bool isFirst() const; |
91 void normalize(); | 92 void normalize(); |
92 | 93 |
93 private: | 94 private: |
94 // RawResourceOwner doing nothing. | 95 // RawResourceOwner doing nothing. |
95 // HTMLImportChild owns the resource so that the contents of prefetched Reso
urce doesn't go away. | 96 // HTMLImportChild owns the resource so that the contents of prefetched Reso
urce doesn't go away. |
96 virtual void responseReceived(Resource*, const ResourceResponse&) OVERRIDE {
} | 97 virtual void responseReceived(Resource*, const ResourceResponse&) OVERRIDE {
} |
97 virtual void dataReceived(Resource*, const char*, int) OVERRIDE { } | 98 virtual void dataReceived(Resource*, const char*, int) OVERRIDE { } |
98 virtual void notifyFinished(Resource*) OVERRIDE { } | 99 virtual void notifyFinished(Resource*) OVERRIDE { } |
99 | 100 |
100 void didFinish(); | 101 void didFinish(); |
101 void createLoader(); | 102 void createLoader(); |
102 void shareLoader(HTMLImportChild*); | 103 void shareLoader(HTMLImportChild*); |
103 void ensureLoader(); | 104 void ensureLoader(); |
| 105 void createCustomElementMicrotaskStepIfNeeded(); |
104 | 106 |
105 #if ENABLE(OILPAN) | 107 #if ENABLE(OILPAN) |
106 Persistent<Document> m_master; | 108 Persistent<Document> m_master; |
107 #else | 109 #else |
108 Document& m_master; | 110 Document& m_master; |
109 #endif | 111 #endif |
110 KURL m_url; | 112 KURL m_url; |
111 WeakPtrFactory<HTMLImportChild> m_weakFactory; | 113 WeakPtrFactory<HTMLImportChild> m_weakFactory; |
112 WeakPtr<CustomElementMicrotaskImportStep> m_customElementMicrotaskStep; | 114 WeakPtr<CustomElementMicrotaskImportStep> m_customElementMicrotaskStep; |
113 HTMLImportLoader* m_loader; | 115 HTMLImportLoader* m_loader; |
114 HTMLImportChildClient* m_client; | 116 HTMLImportChildClient* m_client; |
115 }; | 117 }; |
116 | 118 |
117 inline HTMLImportChild* toHTMLImportChild(HTMLImport* import) | 119 inline HTMLImportChild* toHTMLImportChild(HTMLImport* import) |
118 { | 120 { |
119 ASSERT(!import || import->isChild()); | 121 ASSERT(!import || import->isChild()); |
120 return static_cast<HTMLImportChild*>(import); | 122 return static_cast<HTMLImportChild*>(import); |
121 } | 123 } |
122 | 124 |
123 } // namespace WebCore | 125 } // namespace WebCore |
124 | 126 |
125 #endif // HTMLImportChild_h | 127 #endif // HTMLImportChild_h |
OLD | NEW |