| Index: extensions/browser/api/media_perception_private/conversion_utils.h
|
| diff --git a/extensions/browser/api/media_perception_private/conversion_utils.h b/extensions/browser/api/media_perception_private/conversion_utils.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..24108ab9344cbb2b618fb3601ccb462145ce563c
|
| --- /dev/null
|
| +++ b/extensions/browser/api/media_perception_private/conversion_utils.h
|
| @@ -0,0 +1,38 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef EXTENSIONS_BROWSER_API_MEDIA_PERCEPTION_PRIVATE_CONVERSION_UTILS_H_
|
| +#define EXTENSIONS_BROWSER_API_MEDIA_PERCEPTION_PRIVATE_CONVERSION_UTILS_H_
|
| +
|
| +#include "chromeos/media_perception/media_perception.pb.h"
|
| +#include "extensions/common/api/media_perception_private.h"
|
| +
|
| +namespace media_perception = extensions::api::media_perception_private;
|
| +
|
| +namespace extensions {
|
| +
|
| +// Converts State proto messages to State objects (generated by the
|
| +// media_perception_private.idl) to be returned to the JavaScript frontend.
|
| +media_perception::State StateProtoToIdl(const mri::State& state);
|
| +
|
| +// Converts State objects (generated by the media_perception_private.idl) to
|
| +// State proto messages to be sent over D-Bus.
|
| +mri::State StateIdlToProto(const media_perception::State& state);
|
| +
|
| +// Converts incoming (over D-Bus channel) MediaPerception proto messages
|
| +// to MediaPerception objects (generated by the
|
| +// media_perception_private.idl) to be broadcasted as events to the
|
| +// JavaScript frontend.
|
| +media_perception::MediaPerception MediaPerceptionProtoToIdl(
|
| + const mri::MediaPerception& media_perception);
|
| +
|
| +// Converts Diagnostics proto messages to Diagnostics objects (generated by the
|
| +// media_perception_private.idl) to be returned to the JavaScript frontend as a
|
| +// callback.
|
| +media_perception::Diagnostics DiagnosticsProtoToIdl(
|
| + const mri::Diagnostics& diagnostics);
|
| +
|
| +} // namespace extensions
|
| +
|
| +#endif // EXTENSIONS_BROWSER_API_MEDIA_PERCEPTION_PRIVATE_CONVERSION_UTILS_H_
|
|
|