OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 namespace blink { | 57 namespace blink { |
58 | 58 |
59 class ApplicationCacheHost; | 59 class ApplicationCacheHost; |
60 class SubresourceFilter; | 60 class SubresourceFilter; |
61 class ResourceFetcher; | 61 class ResourceFetcher; |
62 class DocumentInit; | 62 class DocumentInit; |
63 class LocalFrame; | 63 class LocalFrame; |
64 class LocalFrameClient; | 64 class LocalFrameClient; |
65 class FrameLoader; | 65 class FrameLoader; |
66 class ResourceTimingInfo; | 66 class ResourceTimingInfo; |
67 class WebServiceWorkerNetworkProvider; | |
67 struct ViewportDescriptionWrapper; | 68 struct ViewportDescriptionWrapper; |
68 | 69 |
69 class CORE_EXPORT DocumentLoader | 70 class CORE_EXPORT DocumentLoader |
70 : public GarbageCollectedFinalized<DocumentLoader>, | 71 : public GarbageCollectedFinalized<DocumentLoader>, |
71 private RawResourceClient { | 72 private RawResourceClient { |
72 USING_GARBAGE_COLLECTED_MIXIN(DocumentLoader); | 73 USING_GARBAGE_COLLECTED_MIXIN(DocumentLoader); |
73 | 74 |
74 public: | 75 public: |
75 static DocumentLoader* create(LocalFrame* frame, | 76 static DocumentLoader* create(LocalFrame* frame, |
76 const ResourceRequest& request, | 77 const ResourceRequest& request, |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
182 InitialScrollState& initialScrollState() { return m_initialScrollState; } | 183 InitialScrollState& initialScrollState() { return m_initialScrollState; } |
183 | 184 |
184 void setWasBlockedAfterCSP() { m_wasBlockedAfterCSP = true; } | 185 void setWasBlockedAfterCSP() { m_wasBlockedAfterCSP = true; } |
185 bool wasBlockedAfterCSP() { return m_wasBlockedAfterCSP; } | 186 bool wasBlockedAfterCSP() { return m_wasBlockedAfterCSP; } |
186 | 187 |
187 void dispatchLinkHeaderPreloads(ViewportDescriptionWrapper*, | 188 void dispatchLinkHeaderPreloads(ViewportDescriptionWrapper*, |
188 LinkLoader::MediaPreloadPolicy); | 189 LinkLoader::MediaPreloadPolicy); |
189 | 190 |
190 Resource* startPreload(Resource::Type, FetchRequest&); | 191 Resource* startPreload(Resource::Type, FetchRequest&); |
191 | 192 |
193 void setServiceWorkerNetworkProvider( | |
194 std::unique_ptr<WebServiceWorkerNetworkProvider>); | |
195 WebServiceWorkerNetworkProvider* getServiceWorkerNetworkProvider() { | |
falken
2017/03/10 04:26:00
It seems worth documenting that this can be null.
kinuko
2017/03/10 05:52:29
Done. Also removed some null checks that seem unn
| |
196 return m_serviceWorkerNetworkProvider.get(); | |
197 } | |
198 | |
192 DECLARE_VIRTUAL_TRACE(); | 199 DECLARE_VIRTUAL_TRACE(); |
193 | 200 |
194 protected: | 201 protected: |
195 DocumentLoader(LocalFrame*, | 202 DocumentLoader(LocalFrame*, |
196 const ResourceRequest&, | 203 const ResourceRequest&, |
197 const SubstituteData&, | 204 const SubstituteData&, |
198 ClientRedirectPolicy); | 205 ClientRedirectPolicy); |
199 | 206 |
200 Vector<KURL> m_redirectChain; | 207 Vector<KURL> m_redirectChain; |
201 | 208 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
276 bool m_dataReceived; | 283 bool m_dataReceived; |
277 | 284 |
278 NavigationType m_navigationType; | 285 NavigationType m_navigationType; |
279 | 286 |
280 DocumentLoadTiming m_documentLoadTiming; | 287 DocumentLoadTiming m_documentLoadTiming; |
281 | 288 |
282 double m_timeOfLastDataReceived; | 289 double m_timeOfLastDataReceived; |
283 | 290 |
284 Member<ApplicationCacheHost> m_applicationCacheHost; | 291 Member<ApplicationCacheHost> m_applicationCacheHost; |
285 | 292 |
293 std::unique_ptr<WebServiceWorkerNetworkProvider> | |
294 m_serviceWorkerNetworkProvider; | |
kinuko
2017/03/09 16:23:03
This change exposes ServiceWorker to DocumentLoade
| |
295 | |
286 Member<ContentSecurityPolicy> m_contentSecurityPolicy; | 296 Member<ContentSecurityPolicy> m_contentSecurityPolicy; |
287 ClientHintsPreferences m_clientHintsPreferences; | 297 ClientHintsPreferences m_clientHintsPreferences; |
288 InitialScrollState m_initialScrollState; | 298 InitialScrollState m_initialScrollState; |
289 | 299 |
290 bool m_wasBlockedAfterCSP; | 300 bool m_wasBlockedAfterCSP; |
291 | 301 |
292 enum State { | 302 enum State { |
293 NotStarted, | 303 NotStarted, |
294 Provisional, | 304 Provisional, |
295 Committed, | 305 Committed, |
296 SentDidFinishLoad | 306 SentDidFinishLoad |
297 }; | 307 }; |
298 State m_state; | 308 State m_state; |
299 | 309 |
300 // Used to protect against reentrancy into dataReceived(). | 310 // Used to protect against reentrancy into dataReceived(). |
301 bool m_inDataReceived; | 311 bool m_inDataReceived; |
302 RefPtr<SharedBuffer> m_dataBuffer; | 312 RefPtr<SharedBuffer> m_dataBuffer; |
303 }; | 313 }; |
304 | 314 |
305 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 315 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
306 | 316 |
307 } // namespace blink | 317 } // namespace blink |
308 | 318 |
309 #endif // DocumentLoader_h | 319 #endif // DocumentLoader_h |
OLD | NEW |