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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 enum class RedirectType { kForRedirect, kNotForRedirect }; | 96 enum class RedirectType { kForRedirect, kNotForRedirect }; |
97 virtual void prepareRequest(ResourceRequest&, RedirectType); | 97 virtual void prepareRequest(ResourceRequest&, RedirectType); |
98 | 98 |
99 // The last callback before a request is actually sent to the browser process. | 99 // The last callback before a request is actually sent to the browser process. |
100 // TODO(https://crbug.com/632580): make this take const ResourceRequest&. | 100 // TODO(https://crbug.com/632580): make this take const ResourceRequest&. |
101 virtual void dispatchWillSendRequest( | 101 virtual void dispatchWillSendRequest( |
102 unsigned long identifier, | 102 unsigned long identifier, |
103 ResourceRequest&, | 103 ResourceRequest&, |
104 const ResourceResponse& redirectResponse, | 104 const ResourceResponse& redirectResponse, |
105 const FetchInitiatorInfo& = FetchInitiatorInfo()); | 105 const FetchInitiatorInfo& = FetchInitiatorInfo()); |
106 | 106 virtual void dispatchDidLoadResourceFromMemoryCache(unsigned long identifier, |
107 virtual void dispatchDidLoadResourceFromMemoryCache( | 107 const ResourceRequest&, |
108 unsigned long identifier, | 108 const ResourceResponse&); |
109 Resource*, | 109 enum class ResourceResponseType { kNotFromMemoryCache, kFromMemoryCache }; |
110 WebURLRequest::FrameType, | |
111 WebURLRequest::RequestContext); | |
112 virtual void dispatchDidReceiveResponse(unsigned long identifier, | 110 virtual void dispatchDidReceiveResponse(unsigned long identifier, |
113 const ResourceResponse&, | 111 const ResourceResponse&, |
114 WebURLRequest::FrameType, | 112 WebURLRequest::FrameType, |
115 WebURLRequest::RequestContext, | 113 WebURLRequest::RequestContext, |
116 Resource*); | 114 Resource*, |
| 115 ResourceResponseType); |
117 virtual void dispatchDidReceiveData(unsigned long identifier, | 116 virtual void dispatchDidReceiveData(unsigned long identifier, |
118 const char* data, | 117 const char* data, |
119 int dataLength); | 118 int dataLength); |
120 virtual void dispatchDidReceiveEncodedData(unsigned long identifier, | 119 virtual void dispatchDidReceiveEncodedData(unsigned long identifier, |
121 int encodedDataLength); | 120 int encodedDataLength); |
122 virtual void dispatchDidDownloadData(unsigned long identifier, | 121 virtual void dispatchDidDownloadData(unsigned long identifier, |
123 int dataLength, | 122 int dataLength, |
124 int encodedDataLength); | 123 int encodedDataLength); |
125 virtual void dispatchDidFinishLoading(unsigned long identifier, | 124 virtual void dispatchDidFinishLoading(unsigned long identifier, |
126 double finishTime, | 125 double finishTime, |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 | 195 |
197 virtual RefPtr<WebTaskRunner> loadingTaskRunner() const { return nullptr; } | 196 virtual RefPtr<WebTaskRunner> loadingTaskRunner() const { return nullptr; } |
198 | 197 |
199 protected: | 198 protected: |
200 FetchContext() {} | 199 FetchContext() {} |
201 }; | 200 }; |
202 | 201 |
203 } // namespace blink | 202 } // namespace blink |
204 | 203 |
205 #endif | 204 #endif |
OLD | NEW |