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

Side by Side Diff: content/common/service_worker/service_worker_provider_struct_traits.h

Issue 2638313002: Manage ServiceWorkerDispatcherHost in ServiceWorkerContextCore (Closed)
Patch Set: Rebase Created 3 years, 10 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
(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_STRUCT_TRAITS_H_
6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_STRUCT_TRAITS_H_
7
8 #include "content/common/service_worker/service_worker_provider.mojom.h"
9
10 namespace mojo {
11
12 template <>
13 struct StructTraits<content::mojom::ServiceWorkerProviderHostInfoDataView,
14 content::ServiceWorkerProviderHostInfo> {
15 static int32_t provider_id(
16 const content::ServiceWorkerProviderHostInfo& info) {
17 return info.provider_id;
18 }
19
20 static int32_t route_id(const content::ServiceWorkerProviderHostInfo& info) {
21 return info.route_id;
22 }
23
24 static content::ServiceWorkerProviderType type(
25 const content::ServiceWorkerProviderHostInfo& info) {
26 return info.type;
27 }
28
29 static bool is_parent_frame_secure(
30 const content::ServiceWorkerProviderHostInfo& info) {
31 return info.is_parent_frame_secure;
32 }
33
34 static bool Read(content::mojom::ServiceWorkerProviderHostInfoDataView in,
35 content::ServiceWorkerProviderHostInfo* out);
36 };
37
38 } // namespace mojo
39
40 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_STRUCT_TRAITS_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698