| Index: device/device_sensors/type_converters.h
|
| diff --git a/device/device_sensors/type_converters.h b/device/device_sensors/type_converters.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fdecec14b8255946966f2890422443f87b773ff8
|
| --- /dev/null
|
| +++ b/device/device_sensors/type_converters.h
|
| @@ -0,0 +1,27 @@
|
| +// Copyright 2015 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 DEVICE_DEVICE_SENSORS_TYPE_CONVERTERS_H_
|
| +#define DEVICE_DEVICE_SENSORS_TYPE_CONVERTERS_H_
|
| +
|
| +#include "base/memory/shared_memory.h"
|
| +#include "device/device_sensors/device_sensors.mojom.h"
|
| +
|
| +namespace mojo {
|
| +
|
| +template <>
|
| +struct TypeConverter<base::SharedMemoryHandle, device::SharedMemoryPtr> {
|
| + static base::SharedMemoryHandle Convert(
|
| + const device::SharedMemoryPtr& mojo_mem_ptr);
|
| +};
|
| +
|
| +template <>
|
| +struct TypeConverter<device::SharedMemoryPtr, base::SharedMemoryHandle> {
|
| + static device::SharedMemoryPtr Convert(
|
| + const base::SharedMemoryHandle& handle);
|
| +};
|
| +
|
| +} // namespace mojo
|
| +
|
| +#endif // DEVICE_DEVICE_SENSORS_TYPE_CONVERTERS_H_
|
|
|