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

Side by Side Diff: services/service_manager/public/cpp/service_info_struct_traits.h

Issue 2425563004: Support reading multiple InterfaceProviderSpecs from manifests (Closed)
Patch Set: . Created 4 years, 1 month 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 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_
OLDNEW
« no previous file with comments | « services/service_manager/public/cpp/service_info.typemap ('k') | services/service_manager/public/cpp/typemaps.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698