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 { |
| 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 request correctly in the loading stack later. (Example: service |
| 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 |