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

Side by Side Diff: content/common/service_worker/service_worker_provider_host_info.cc

Issue 2653493009: Add two interfaces for ServiceWorkerProviderContext/ProviderHost (Closed)
Patch Set: Rebased 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 #include "content/common/service_worker/service_worker_provider_host_info.h" 5 #include "content/common/service_worker/service_worker_provider_host_info.h"
6 6
7 #include "ipc/ipc_message.h" 7 #include "ipc/ipc_message.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo() 11 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo()
12 : provider_id(kInvalidServiceWorkerProviderId), 12 : provider_id(kInvalidServiceWorkerProviderId),
13 route_id(MSG_ROUTING_NONE), 13 route_id(MSG_ROUTING_NONE),
14 type(SERVICE_WORKER_PROVIDER_UNKNOWN), 14 type(SERVICE_WORKER_PROVIDER_UNKNOWN),
15 is_parent_frame_secure(false) {} 15 is_parent_frame_secure(false) {}
16 16
17 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo( 17 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo(
18 ServiceWorkerProviderHostInfo&& other) 18 ServiceWorkerProviderHostInfo&& other)
19 : provider_id(other.provider_id), 19 : provider_id(other.provider_id),
20 route_id(other.route_id), 20 route_id(other.route_id),
21 type(other.type), 21 type(other.type),
22 is_parent_frame_secure(other.is_parent_frame_secure) { 22 is_parent_frame_secure(other.is_parent_frame_secure),
23 host_request(std::move(other.host_request)),
24 client_ptr_info(std::move(other.client_ptr_info)) {
23 other.provider_id = kInvalidServiceWorkerProviderId; 25 other.provider_id = kInvalidServiceWorkerProviderId;
24 other.route_id = MSG_ROUTING_NONE; 26 other.route_id = MSG_ROUTING_NONE;
25 other.type = SERVICE_WORKER_PROVIDER_UNKNOWN; 27 other.type = SERVICE_WORKER_PROVIDER_UNKNOWN;
28 other.is_parent_frame_secure = false;
29 }
30
31 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo(
32 ServiceWorkerProviderHostInfo&& other,
33 mojom::ServiceWorkerProviderHostAssociatedRequest host_request,
34 mojom::ServiceWorkerProviderAssociatedPtrInfo client_ptr_info)
35 : provider_id(other.provider_id),
36 route_id(other.route_id),
37 type(other.type),
38 is_parent_frame_secure(other.is_parent_frame_secure),
39 host_request(std::move(host_request)),
40 client_ptr_info(std::move(client_ptr_info)) {
41 DCHECK(!other.host_request.is_pending());
42 DCHECK(!other.client_ptr_info.is_valid());
43 other.provider_id = kInvalidServiceWorkerProviderId;
44 other.route_id = MSG_ROUTING_NONE;
45 other.type = SERVICE_WORKER_PROVIDER_UNKNOWN;
26 other.is_parent_frame_secure = false; 46 other.is_parent_frame_secure = false;
27 } 47 }
28 48
29 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo( 49 ServiceWorkerProviderHostInfo::ServiceWorkerProviderHostInfo(
30 int provider_id, 50 int provider_id,
31 int route_id, 51 int route_id,
32 ServiceWorkerProviderType type, 52 ServiceWorkerProviderType type,
33 bool is_parent_frame_secure) 53 bool is_parent_frame_secure)
34 : provider_id(provider_id), 54 : provider_id(provider_id),
35 route_id(route_id), 55 route_id(route_id),
36 type(type), 56 type(type),
37 is_parent_frame_secure(is_parent_frame_secure) {} 57 is_parent_frame_secure(is_parent_frame_secure) {}
38 58
39 ServiceWorkerProviderHostInfo::~ServiceWorkerProviderHostInfo() {} 59 ServiceWorkerProviderHostInfo::~ServiceWorkerProviderHostInfo() {}
40 60
41 } // namespace content 61 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698