Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: third_party/WebKit/public/platform/WebWorkerFetchContext.h

Issue 2804843005: Implement the infrastructure of creating WorkerFetchContext in worker global scope. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698