Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WebWorkerFetchContext_h | |
| 6 #define WebWorkerFetchContext_h | |
| 7 | |
| 8 namespace blink { | |
| 9 | |
| 10 class WebURLLoader; | |
| 11 class WebURLRequest; | |
| 12 | |
| 13 // WebWorkerFetchContext is crated from WebWorkerFetchContextInfo to create a | |
| 14 // new WebURLLoader instance in the worker thread. | |
| 15 class WebWorkerFetchContext { | |
|
kinuko
2017/04/14 02:27:02
I wonder if this could be implemented using WebSer
kinuko
2017/04/14 05:38:12
This part could be probably cleaned up a bit but w
| |
| 16 public: | |
| 17 virtual ~WebWorkerFetchContext() {} | |
| 18 | |
| 19 // Returns a new WebURLLoader instance which is associated with the worker | |
| 20 // thread. | |
| 21 virtual WebURLLoader* CreateURLLoader() = 0; | |
| 22 | |
| 23 // Called when a request is about to be sent out to modify the request to | |
| 24 // handle the rquest correctly in the loading stack later. (Example: service | |
|
kinuko
2017/04/14 02:27:02
rquest -> request
horo
2017/04/14 07:22:45
Done.
| |
| 25 // worker) | |
| 26 virtual void WillSendRequest(WebURLRequest&) = 0; | |
| 27 | |
| 28 // Whether the fetch context is controlled by a service worker. | |
| 29 virtual bool IsControlledByServiceWorker() const = 0; | |
| 30 }; | |
| 31 | |
| 32 } // namespace blink | |
| 33 | |
| 34 #endif // WebWorkerFetchContext_h | |
| OLD | NEW |