| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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 CONTENT_COMMON_INDEXED_DB_INDEXED_DB_ENUM_TRAITS_H_ |
| 6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_ENUM_TRAITS_H_ |
| 7 |
| 8 #include "content/common/indexed_db/indexed_db.mojom.h" |
| 9 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" |
| 10 |
| 11 namespace mojo { |
| 12 |
| 13 template <> |
| 14 struct EnumTraits<indexed_db::mojom::CursorDirection, |
| 15 blink::WebIDBCursorDirection> { |
| 16 static indexed_db::mojom::CursorDirection ToMojom( |
| 17 blink::WebIDBCursorDirection input); |
| 18 static bool FromMojom(indexed_db::mojom::CursorDirection input, |
| 19 blink::WebIDBCursorDirection* output); |
| 20 }; |
| 21 |
| 22 template <> |
| 23 struct EnumTraits<indexed_db::mojom::DataLoss, blink::WebIDBDataLoss> { |
| 24 static indexed_db::mojom::DataLoss ToMojom(blink::WebIDBDataLoss input); |
| 25 static bool FromMojom(indexed_db::mojom::DataLoss input, |
| 26 blink::WebIDBDataLoss* output); |
| 27 }; |
| 28 |
| 29 template <> |
| 30 struct EnumTraits<indexed_db::mojom::PutMode, blink::WebIDBPutMode> { |
| 31 static indexed_db::mojom::PutMode ToMojom(blink::WebIDBPutMode input); |
| 32 static bool FromMojom(indexed_db::mojom::PutMode input, |
| 33 blink::WebIDBPutMode* output); |
| 34 }; |
| 35 |
| 36 template <> |
| 37 struct EnumTraits<indexed_db::mojom::TaskType, blink::WebIDBTaskType> { |
| 38 static indexed_db::mojom::TaskType ToMojom(blink::WebIDBTaskType input); |
| 39 static bool FromMojom(indexed_db::mojom::TaskType input, |
| 40 blink::WebIDBTaskType* output); |
| 41 }; |
| 42 |
| 43 template <> |
| 44 struct EnumTraits<indexed_db::mojom::TransactionMode, |
| 45 blink::WebIDBTransactionMode> { |
| 46 static indexed_db::mojom::TransactionMode ToMojom( |
| 47 blink::WebIDBTransactionMode input); |
| 48 static bool FromMojom(indexed_db::mojom::TransactionMode input, |
| 49 blink::WebIDBTransactionMode* output); |
| 50 }; |
| 51 |
| 52 } // namespace mojo |
| 53 |
| 54 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_ENUM_TRAITS_H_ |
| OLD | NEW |