OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2011 Apple 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 27 matching lines...) Expand all Loading... |
38 #include "wtf/RefCounted.h" | 38 #include "wtf/RefCounted.h" |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 class Resource; | 42 class Resource; |
43 class KURL; | 43 class KURL; |
44 class ResourceError; | 44 class ResourceError; |
45 class ResourceFetcher; | 45 class ResourceFetcher; |
46 class ThreadedDataReceiver; | 46 class ThreadedDataReceiver; |
47 | 47 |
48 class CORE_EXPORT ResourceLoader final : public RefCountedWillBeGarbageCollected
Finalized<ResourceLoader>, protected WebURLLoaderClient { | 48 class CORE_EXPORT ResourceLoader final : public GarbageCollectedFinalized<Resour
ceLoader>, protected WebURLLoaderClient { |
49 public: | 49 public: |
50 static PassRefPtrWillBeRawPtr<ResourceLoader> create(ResourceFetcher*, Resou
rce*, const ResourceRequest&, const ResourceLoaderOptions&); | 50 static ResourceLoader* create(ResourceFetcher*, Resource*, const ResourceReq
uest&, const ResourceLoaderOptions&); |
51 virtual ~ResourceLoader(); | 51 virtual ~ResourceLoader(); |
52 DECLARE_TRACE(); | 52 DECLARE_TRACE(); |
53 | 53 |
54 void start(); | 54 void start(); |
55 void changeToSynchronous(); | 55 void changeToSynchronous(); |
56 | 56 |
57 void cancel(); | 57 void cancel(); |
58 void cancel(const ResourceError&); | 58 void cancel(const ResourceError&); |
59 void cancelIfNotFinishing(); | 59 void cancelIfNotFinishing(); |
60 | 60 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 void init(const ResourceRequest&); | 95 void init(const ResourceRequest&); |
96 void requestSynchronously(); | 96 void requestSynchronously(); |
97 | 97 |
98 void didFinishLoadingOnePart(double finishTime, int64_t encodedDataLength); | 98 void didFinishLoadingOnePart(double finishTime, int64_t encodedDataLength); |
99 | 99 |
100 bool responseNeedsAccessControlCheck() const; | 100 bool responseNeedsAccessControlCheck() const; |
101 | 101 |
102 ResourceRequest& applyOptions(ResourceRequest&) const; | 102 ResourceRequest& applyOptions(ResourceRequest&) const; |
103 | 103 |
104 OwnPtr<WebURLLoader> m_loader; | 104 OwnPtr<WebURLLoader> m_loader; |
105 RefPtrWillBeMember<ResourceFetcher> m_fetcher; | 105 Member<ResourceFetcher> m_fetcher; |
106 | 106 |
107 ResourceRequest m_request; | 107 ResourceRequest m_request; |
108 ResourceRequest m_originalRequest; // Before redirects. | 108 ResourceRequest m_originalRequest; // Before redirects. |
109 | 109 |
110 bool m_notifiedLoadComplete; | 110 bool m_notifiedLoadComplete; |
111 | 111 |
112 bool m_defersLoading; | 112 bool m_defersLoading; |
113 bool m_loadingMultipartContent; | 113 bool m_loadingMultipartContent; |
114 OwnPtr<ResourceRequest> m_fallbackRequestForServiceWorker; | 114 OwnPtr<ResourceRequest> m_fallbackRequestForServiceWorker; |
115 ResourceRequest m_deferredRequest; | 115 ResourceRequest m_deferredRequest; |
(...skipping 19 matching lines...) Expand all Loading... |
135 ResourceLoaderState m_state; | 135 ResourceLoaderState m_state; |
136 | 136 |
137 // Used for sanity checking to make sure we don't experience illegal state | 137 // Used for sanity checking to make sure we don't experience illegal state |
138 // transitions. | 138 // transitions. |
139 ConnectionState m_connectionState; | 139 ConnectionState m_connectionState; |
140 }; | 140 }; |
141 | 141 |
142 } | 142 } |
143 | 143 |
144 #endif | 144 #endif |
OLD | NEW |