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: content/common/service_worker/service_worker_provider_host_info.h

Issue 2653493009: Add two interfaces for ServiceWorkerProviderContext/ProviderHost (Closed)
Patch Set: Rebased/Fixed unittests when BrowserSideNavigation is enabled Created 3 years, 7 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
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
13 // Container object to create a ServiceWorkerProviderHost.
12 struct CONTENT_EXPORT ServiceWorkerProviderHostInfo { 14 struct CONTENT_EXPORT ServiceWorkerProviderHostInfo {
13 ServiceWorkerProviderHostInfo(); 15 ServiceWorkerProviderHostInfo();
14 ServiceWorkerProviderHostInfo(ServiceWorkerProviderHostInfo&& other); 16 ServiceWorkerProviderHostInfo(ServiceWorkerProviderHostInfo&& other);
17 ServiceWorkerProviderHostInfo(
18 ServiceWorkerProviderHostInfo&& other,
19 mojom::ServiceWorkerProviderHostAssociatedRequest host_request,
20 mojom::ServiceWorkerProviderAssociatedPtrInfo client_ptr_info);
15 ServiceWorkerProviderHostInfo(int provider_id, 21 ServiceWorkerProviderHostInfo(int provider_id,
16 int route_id, 22 int route_id,
17 ServiceWorkerProviderType type, 23 ServiceWorkerProviderType type,
18 bool is_parent_frame_secure); 24 bool is_parent_frame_secure);
19 ~ServiceWorkerProviderHostInfo(); 25 ~ServiceWorkerProviderHostInfo();
20 26
21 // This is unique within its child process except for PlzNavigate. When 27 // 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 28 // PlzNavigate is on, |provider_id| is managed on the browser process and it
23 // will be unique among all of providers. 29 // will be unique among all of providers.
24 int provider_id; 30 int provider_id;
(...skipping 12 matching lines...) Expand all
37 // 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;
38 // that is, blink::WebFrame::canHaveSecureChild() returns false. This doesn't 44 // that is, blink::WebFrame::canHaveSecureChild() returns false. This doesn't
39 // mean the document is necessarily an insecure context, because the document 45 // 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 46 // may have a URL whose scheme is granted an exception that allows bypassing
41 // the ancestor secure context check. See the comment in 47 // the ancestor secure context check. See the comment in
42 // blink::Document::isSecureContextImpl for more details. If the provider is 48 // 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, 49 // not created for a document, or the document does not have a parent frame,
44 // is_parent_frame_secure| is true. 50 // is_parent_frame_secure| is true.
45 bool is_parent_frame_secure; 51 bool is_parent_frame_secure;
46 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.
falken 2017/05/18 04:13:10 Mojo
shimazu 2017/05/19 08:31:07 Done.
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
falken 2017/05/18 04:13:10 Mojo
shimazu 2017/05/19 08:31:07 Done.
62 // methods.
63 // After used to create the ServiceWorkerProviderHost, this will be invalid.
64 mojom::ServiceWorkerProviderAssociatedPtrInfo client_ptr_info;
65
47 private: 66 private:
48 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHostInfo); 67 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHostInfo);
49 }; 68 };
50 69
51 } // namespace content 70 } // namespace content
52 71
53 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_INFO_H_ 72 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698