Chromium Code Reviews| Index: content/common/service_worker/service_worker_provider_host_info.h |
| diff --git a/content/common/service_worker/service_worker_provider_host_info.h b/content/common/service_worker/service_worker_provider_host_info.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..106fb620ab3339552b1ea0a010d951d8a26106f6 |
| --- /dev/null |
| +++ b/content/common/service_worker/service_worker_provider_host_info.h |
| @@ -0,0 +1,53 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_INFO_H_ |
| +#define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_INFO_H_ |
| + |
| +#include "content/common/service_worker/service_worker_types.h" |
| + |
| +namespace content { |
| + |
| +struct CONTENT_EXPORT ServiceWorkerProviderHostInfo { |
| + ServiceWorkerProviderHostInfo(); |
| + 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
|
| + ServiceWorkerProviderHostInfo(int provider_id, |
| + int route_id, |
| + ServiceWorkerProviderType type, |
| + bool is_parent_frame_secure); |
| + ~ServiceWorkerProviderHostInfo(); |
| + |
| + // This is unique within its child process except for PlzNavigate. When |
| + // PlzNavigate is on, |provider_id| is managed on the browser process and it |
| + // will be unique among all of providers. |
| + int provider_id; |
| + |
| + // When this provider is created for a document, |route_id| is the frame ID of |
| + // it. When this provider is created for a Shared Worker, |route_id| is the |
| + // Shared Worker route ID. When this provider is created for a Service Worker, |
| + // |route_id| is MSG_ROUTING_NONE. |
| + int route_id; |
| + |
| + // This identifies whether this provider is for Service Worker controllees |
| + // (documents and Shared Workers) or for controllers (Service Workers). |
| + ServiceWorkerProviderType type; |
| + |
| + // |is_parent_frame_secure| is false if the provider is created for a document |
| + // whose parent frame is not secure from the point of view of the document; |
| + // that is, blink::WebFrame::canHaveSecureChild() returns false. This doesn't |
| + // mean the document is necessarily an insecure context, because the document |
| + // may have a URL whose scheme is granted an exception that allows bypassing |
| + // the ancestor secure context check. See the comment in |
| + // blink::Document::isSecureContextImpl for more details. If the provider is |
| + // not created for a document, or the document does not have a parent frame, |
| + // is_parent_frame_secure| is true. |
| + 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
|
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHostInfo); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_INFO_H_ |