| Index: device/wake_lock/public/interfaces/wake_lock_param_traits.h
|
| diff --git a/device/wake_lock/public/interfaces/wake_lock_param_traits.h b/device/wake_lock/public/interfaces/wake_lock_param_traits.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..862fdc1d2342726edb9a1e2015d1ce0502086542
|
| --- /dev/null
|
| +++ b/device/wake_lock/public/interfaces/wake_lock_param_traits.h
|
| @@ -0,0 +1,34 @@
|
| +// 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 DEVICE_WAKE_LOCK_PUBLIC_INTERFACES_WAKE_LOCK_PARAM_TRAITS_H_
|
| +#define DEVICE_WAKE_LOCK_PUBLIC_INTERFACES_WAKE_LOCK_PARAM_TRAITS_H_
|
| +
|
| +#include <stddef.h>
|
| +
|
| +#include "device/wake_lock/public/interfaces/wake_lock_context.mojom.h"
|
| +
|
| +namespace mojo {
|
| +
|
| +template <>
|
| +struct EnumTraits<device::mojom::WakeLockType,
|
| + device::PowerSaveBlocker::PowerSaveBlockerType> {
|
| + static device::mojom::WakeLockType ToMojom(
|
| + device::PowerSaveBlocker::PowerSaveBlockerType input);
|
| + static bool FromMojom(device::mojom::WakeLockType input,
|
| + device::PowerSaveBlocker::PowerSaveBlockerType* output);
|
| +};
|
| +
|
| +template <>
|
| +struct EnumTraits<device::mojom::WakeLockReason,
|
| + device::PowerSaveBlocker::Reason> {
|
| + static device::mojom::WakeLockReason ToMojom(
|
| + device::PowerSaveBlocker::Reason input);
|
| + static bool FromMojom(device::mojom::WakeLockReason input,
|
| + device::PowerSaveBlocker::Reason* output);
|
| +};
|
| +
|
| +} // namespace mojo
|
| +
|
| +#endif // DEVICE_WAKE_LOCK_PUBLIC_INTERFACES_WAKE_LOCK_PARAM_TRAITS_H_
|
|
|