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 CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_INFO_H_ | |
6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_INFO_H_ | |
7 | |
8 #include "content/common/service_worker/service_worker_types.h" | |
9 | |
10 namespace content { | |
11 | |
12 struct CONTENT_EXPORT ServiceWorkerProviderHostInfo { | |
13 ServiceWorkerProviderHostInfo(); | |
14 ServiceWorkerProviderHostInfo(ServiceWorkerProviderHostInfo&& other); | |
dcheng
2017/02/14 08:47:46
Is it necessary to make this move-only? The struct
shimazu
2017/02/15 02:24:19
I'm planning to add AssociatedInterfacePtr in this
dcheng
2017/02/15 04:29:35
Ah, OK. Let's just leave it as-is to avoid churn t
| |
15 ServiceWorkerProviderHostInfo(int provider_id, | |
16 int route_id, | |
17 ServiceWorkerProviderType type, | |
18 bool is_parent_frame_secure); | |
19 ~ServiceWorkerProviderHostInfo(); | |
20 | |
21 // This is unique within its child process except for PlzNavigate. When | |
22 // PlzNavigate is on, |provider_id| is managed on the browser process and it | |
23 // will be unique among all of providers. | |
24 int provider_id; | |
25 | |
26 // When this provider is created for a document, |route_id| is the frame ID of | |
27 // it. When this provider is created for a Shared Worker, |route_id| is the | |
28 // Shared Worker route ID. When this provider is created for a Service Worker, | |
29 // |route_id| is MSG_ROUTING_NONE. | |
30 int route_id; | |
31 | |
32 // This identifies whether this provider is for Service Worker controllees | |
33 // (documents and Shared Workers) or for controllers (Service Workers). | |
34 ServiceWorkerProviderType type; | |
35 | |
36 // |is_parent_frame_secure| is false if the provider is created for a document | |
37 // whose parent frame is not secure from the point of view of the document; | |
38 // that is, blink::WebFrame::canHaveSecureChild() returns false. This doesn't | |
39 // mean the document is necessarily an insecure context, because the document | |
40 // may have a URL whose scheme is granted an exception that allows bypassing | |
41 // the ancestor secure context check. See the comment in | |
42 // blink::Document::isSecureContextImpl for more details. If the provider is | |
43 // not created for a document, or the document does not have a parent frame, | |
44 // is_parent_frame_secure| is true. | |
45 bool is_parent_frame_secure; | |
dcheng
2017/02/14 08:47:46
Out of curiosity, is this something we can eventua
shimazu
2017/02/15 02:24:19
falken: do you know why? IIRC falken implemented t
| |
46 | |
47 private: | |
48 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHostInfo); | |
49 }; | |
50 | |
51 } // namespace content | |
52 | |
53 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_INFO_H_ | |
OLD | NEW |