Chromium Code Reviews| 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 EXTENSIONS_BROWSER_API_MEDIA_PERCEPTION_PRIVATE_CONVERSION_UTILS_H_ | |
|
tbarzic
2017/05/11 00:38:27
s/utils/util/
Luke Sorenson
2017/05/11 23:57:59
The file is conversion_utils.h I don't think there
| |
| 6 #define EXTENSIONS_BROWSER_API_MEDIA_PERCEPTION_PRIVATE_CONVERSION_UTILS_H_ | |
| 7 | |
| 8 #include "chromeos/media_perception/media_perception.pb.h" | |
| 9 #include "extensions/common/api/media_perception_private.h" | |
| 10 | |
| 11 namespace media_perception = extensions::api::media_perception_private; | |
| 12 | |
| 13 namespace extensions { | |
| 14 | |
| 15 // Converts State proto messages to State objects (generated by the | |
| 16 // media_perception_private.idl) to be returned to the JavaScript frontend. | |
| 17 media_perception::State StateProtoToIdl(const mri::State& state); | |
| 18 | |
| 19 // Converts State objects (generated by the media_perception_private.idl) to | |
| 20 // State proto messages to be sent over D-Bus. | |
| 21 mri::State StateIdlToProto(const media_perception::State& state); | |
| 22 | |
| 23 // Converts incoming (over D-Bus channel) MediaPerception proto messages | |
| 24 // to MediaPerception objects (generated by the | |
| 25 // media_perception_private.idl) to be broadcasted as events to the | |
| 26 // JavaScript frontend. | |
| 27 media_perception::MediaPerception MediaPerceptionProtoToIdl( | |
| 28 const mri::MediaPerception& media_perception); | |
| 29 | |
| 30 // Converts Diagnostics proto messages to Diagnostics objects (generated by the | |
| 31 // media_perception_private.idl) to be returned to the JavaScript frontend as a | |
| 32 // callback. | |
| 33 media_perception::Diagnostics DiagnosticsProtoToIdl( | |
| 34 const mri::Diagnostics& diagnostics); | |
| 35 | |
| 36 } // namespace extensions | |
| 37 | |
| 38 #endif // EXTENSIONS_BROWSER_API_MEDIA_PERCEPTION_PRIVATE_CONVERSION_UTILS_H_ | |
| OLD | NEW |