| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_INFO_H_ | 5 #ifndef CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_INFO_H_ |
| 6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_INFO_H_ | 6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_INFO_H_ |
| 7 | 7 |
| 8 #include "content/common/service_worker/service_worker_provider_interfaces.mojom
.h" |
| 8 #include "content/common/service_worker/service_worker_types.h" | 9 #include "content/common/service_worker/service_worker_types.h" |
| 9 | 10 |
| 10 namespace content { | 11 namespace content { |
| 11 | 12 |
| 12 // Container object to create a ServiceWorkerProviderHost. | 13 // Container object to create a ServiceWorkerProviderHost. |
| 13 struct CONTENT_EXPORT ServiceWorkerProviderHostInfo { | 14 struct CONTENT_EXPORT ServiceWorkerProviderHostInfo { |
| 14 ServiceWorkerProviderHostInfo(); | 15 ServiceWorkerProviderHostInfo(); |
| 15 ServiceWorkerProviderHostInfo(ServiceWorkerProviderHostInfo&& other); | 16 ServiceWorkerProviderHostInfo(ServiceWorkerProviderHostInfo&& other); |
| 17 ServiceWorkerProviderHostInfo( |
| 18 ServiceWorkerProviderHostInfo&& other, |
| 19 mojom::ServiceWorkerProviderHostAssociatedRequest host_request, |
| 20 mojom::ServiceWorkerProviderAssociatedPtrInfo client_ptr_info); |
| 16 ServiceWorkerProviderHostInfo(int provider_id, | 21 ServiceWorkerProviderHostInfo(int provider_id, |
| 17 int route_id, | 22 int route_id, |
| 18 ServiceWorkerProviderType type, | 23 ServiceWorkerProviderType type, |
| 19 bool is_parent_frame_secure); | 24 bool is_parent_frame_secure); |
| 20 ~ServiceWorkerProviderHostInfo(); | 25 ~ServiceWorkerProviderHostInfo(); |
| 21 | 26 |
| 22 // This is unique within its child process except for PlzNavigate. When | 27 // This is unique within its child process except for PlzNavigate. When |
| 23 // PlzNavigate is on, |provider_id| is managed on the browser process and it | 28 // PlzNavigate is on, |provider_id| is managed on the browser process and it |
| 24 // will be unique among all of providers. | 29 // will be unique among all of providers. |
| 25 int provider_id; | 30 int provider_id; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 38 // whose parent frame is not secure from the point of view of the document; | 43 // whose parent frame is not secure from the point of view of the document; |
| 39 // that is, blink::WebFrame::canHaveSecureChild() returns false. This doesn't | 44 // that is, blink::WebFrame::canHaveSecureChild() returns false. This doesn't |
| 40 // mean the document is necessarily an insecure context, because the document | 45 // mean the document is necessarily an insecure context, because the document |
| 41 // may have a URL whose scheme is granted an exception that allows bypassing | 46 // may have a URL whose scheme is granted an exception that allows bypassing |
| 42 // the ancestor secure context check. See the comment in | 47 // the ancestor secure context check. See the comment in |
| 43 // blink::Document::isSecureContextImpl for more details. If the provider is | 48 // blink::Document::isSecureContextImpl for more details. If the provider is |
| 44 // not created for a document, or the document does not have a parent frame, | 49 // not created for a document, or the document does not have a parent frame, |
| 45 // is_parent_frame_secure| is true. | 50 // is_parent_frame_secure| is true. |
| 46 bool is_parent_frame_secure; | 51 bool is_parent_frame_secure; |
| 47 | 52 |
| 53 // Mojo endpoint to send a message from the renderer to the browser. This |
| 54 // will be associated with ServiceWorkerDisptacherHost. |host_request| should |
| 55 // be valid when ServiceWorkerProviderHostInfo is passed to any Mojo methods. |
| 56 // After used to create the ServiceWorkerProviderHost, this will be invalid. |
| 57 mojom::ServiceWorkerProviderHostAssociatedRequest host_request; |
| 58 |
| 59 // Mojo endpoint to send a message from the browser to the renderer. This |
| 60 // will be associated with ServiceWorkerDisptacherHost. |client_ptr_info| |
| 61 // should be valid when ServiceWorkerProviderHostInfo is passed to any Mojo |
| 62 // methods. |
| 63 // After used to create the ServiceWorkerProviderHost, this will be invalid. |
| 64 mojom::ServiceWorkerProviderAssociatedPtrInfo client_ptr_info; |
| 65 |
| 48 private: | 66 private: |
| 49 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHostInfo); | 67 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHostInfo); |
| 50 }; | 68 }; |
| 51 | 69 |
| 52 } // namespace content | 70 } // namespace content |
| 53 | 71 |
| 54 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_INFO_H_ | 72 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_INFO_H_ |
| OLD | NEW |