Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Side by Side Diff: content/common/indexed_db/indexed_db_enum_traits.h

Issue 2507233002: Define EnumTraits for many IndexedDB enums. (Closed)
Patch Set: GCC doesn't trust exhaustive switch statements. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW
« no previous file with comments | « content/common/indexed_db/indexed_db.typemap ('k') | content/common/indexed_db/indexed_db_enum_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698