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 DEVICE_WAKE_LOCK_PUBLIC_INTERFACES_WAKE_LOCK_PARAM_TRAITS_H_ |
| 6 #define DEVICE_WAKE_LOCK_PUBLIC_INTERFACES_WAKE_LOCK_PARAM_TRAITS_H_ |
| 7 |
| 8 #include <stddef.h> |
| 9 |
| 10 #include "device/wake_lock/public/interfaces/wake_lock_context.mojom.h" |
| 11 |
| 12 namespace mojo { |
| 13 |
| 14 template <> |
| 15 struct EnumTraits<device::mojom::WakeLockType, |
| 16 device::PowerSaveBlocker::PowerSaveBlockerType> { |
| 17 static device::mojom::WakeLockType ToMojom( |
| 18 device::PowerSaveBlocker::PowerSaveBlockerType input); |
| 19 static bool FromMojom(device::mojom::WakeLockType input, |
| 20 device::PowerSaveBlocker::PowerSaveBlockerType* output); |
| 21 }; |
| 22 |
| 23 template <> |
| 24 struct EnumTraits<device::mojom::WakeLockReason, |
| 25 device::PowerSaveBlocker::Reason> { |
| 26 static device::mojom::WakeLockReason ToMojom( |
| 27 device::PowerSaveBlocker::Reason input); |
| 28 static bool FromMojom(device::mojom::WakeLockReason input, |
| 29 device::PowerSaveBlocker::Reason* output); |
| 30 }; |
| 31 |
| 32 } // namespace mojo |
| 33 |
| 34 #endif // DEVICE_WAKE_LOCK_PUBLIC_INTERFACES_WAKE_LOCK_PARAM_TRAITS_H_ |
OLD | NEW |