| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 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 SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_INFO_STRUCT_TRAITS_H_ | |
| 6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_INFO_STRUCT_TRAITS_H_ | |
| 7 | |
| 8 #include "services/service_manager/public/cpp/service_info.h" | |
| 9 #include "services/service_manager/public/interfaces/service.mojom.h" | |
| 10 | |
| 11 namespace mojo { | |
| 12 | |
| 13 template <> | |
| 14 struct StructTraits<service_manager::mojom::ServiceInfo::DataView, | |
| 15 service_manager::ServiceInfo> { | |
| 16 static const service_manager::InterfaceProviderSpecMap& | |
| 17 interface_provider_specs(const service_manager::ServiceInfo& info) { | |
| 18 return info.interface_provider_specs; | |
| 19 } | |
| 20 static const service_manager::Identity& identity( | |
| 21 const service_manager::ServiceInfo& info) { | |
| 22 return info.identity; | |
| 23 } | |
| 24 static bool Read(service_manager::mojom::ServiceInfoDataView data, | |
| 25 service_manager::ServiceInfo* out) { | |
| 26 return data.ReadIdentity(&out->identity) && | |
| 27 data.ReadInterfaceProviderSpecs(&out->interface_provider_specs); | |
| 28 } | |
| 29 }; | |
| 30 | |
| 31 } // namespace mojo | |
| 32 | |
| 33 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_INFO_STRUCT_TRAITS_H_ | |
| OLD | NEW |