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

Side by Side Diff: chrome/common/media_router/dial_device_description_parser_struct_traits.h

Issue 2745653008: [Media Router] Parse device description xml in utility process (Closed)
Patch Set: resolve code review comments from Mark Created 3 years, 9 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 CHROME_COMMON_MEDIA_ROUTER_DIAL_DEVICE_DESCRIPTION_PARSER_STRUCT_TRAITS_ H_
6 #define CHROME_COMMON_MEDIA_ROUTER_DIAL_DEVICE_DESCRIPTION_PARSER_STRUCT_TRAITS_ H_
7
8 #include <string>
9
10 #include "chrome/common/media_router/dial_device_description.h"
11 #include "chrome/common/media_router/dial_device_description_parser.mojom.h"
12
13 namespace mojo {
14
15 template <>
16 struct StructTraits<chrome::mojom::DialDeviceDescriptionDataView,
17 media_router::DialDeviceDescription> {
18 static const std::string& unique_id(
19 const media_router::DialDeviceDescription& description) {
20 return description.unique_id;
21 }
22
23 static const std::string& friendly_name(
24 const media_router::DialDeviceDescription& description) {
25 return description.friendly_name;
26 }
27
28 static const std::string& model_name(
29 const media_router::DialDeviceDescription& description) {
30 return description.model_name;
31 }
32
33 static const std::string& device_type(
34 const media_router::DialDeviceDescription& description) {
35 return description.device_type;
36 }
37
38 static bool Read(chrome::mojom::DialDeviceDescriptionDataView data,
39 media_router::DialDeviceDescription* out);
40 };
41
42 } // namespace mojo
43
44 #endif // CHROME_COMMON_MEDIA_ROUTER_DIAL_DEVICE_DESCRIPTION_PARSER_STRUCT_TRAI TS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698