OLD | NEW |
(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
_ |
OLD | NEW |