OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 11 matching lines...) Expand all Loading... |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef IDBKeyPath_h | 26 #ifndef IDBKeyPath_h |
27 #define IDBKeyPath_h | 27 #define IDBKeyPath_h |
28 | 28 |
29 #include "bindings/modules/v8/UnionTypesModules.h" | 29 #include "bindings/modules/v8/UnionTypesModules.h" |
30 #include "modules/ModulesExport.h" | 30 #include "modules/ModulesExport.h" |
31 #include "public/platform/modules/indexeddb/WebIDBKeyPath.h" | 31 #include "public/platform/modules/indexeddb/WebIDBKeyPath.h" |
| 32 #include "wtf/Allocator.h" |
32 #include "wtf/Vector.h" | 33 #include "wtf/Vector.h" |
33 #include "wtf/text/WTFString.h" | 34 #include "wtf/text/WTFString.h" |
34 | 35 |
35 namespace blink { | 36 namespace blink { |
36 | 37 |
37 enum IDBKeyPathParseError { | 38 enum IDBKeyPathParseError { |
38 IDBKeyPathParseErrorNone, | 39 IDBKeyPathParseErrorNone, |
39 IDBKeyPathParseErrorIdentifier, | 40 IDBKeyPathParseErrorIdentifier, |
40 }; | 41 }; |
41 | 42 |
42 MODULES_EXPORT void IDBParseKeyPath(const String&, Vector<String>&, IDBKeyPathPa
rseError&); | 43 MODULES_EXPORT void IDBParseKeyPath(const String&, Vector<String>&, IDBKeyPathPa
rseError&); |
43 | 44 |
44 class MODULES_EXPORT IDBKeyPath { | 45 class MODULES_EXPORT IDBKeyPath { |
| 46 DISALLOW_ALLOCATION(); |
45 public: | 47 public: |
46 IDBKeyPath() : m_type(NullType) { } | 48 IDBKeyPath() : m_type(NullType) { } |
47 explicit IDBKeyPath(const String&); | 49 explicit IDBKeyPath(const String&); |
48 explicit IDBKeyPath(const Vector<String>& array); | 50 explicit IDBKeyPath(const Vector<String>& array); |
49 explicit IDBKeyPath(const StringOrStringSequence& keyPath); | 51 explicit IDBKeyPath(const StringOrStringSequence& keyPath); |
50 IDBKeyPath(const WebIDBKeyPath&); | 52 IDBKeyPath(const WebIDBKeyPath&); |
51 | 53 |
52 operator WebIDBKeyPath() const; | 54 operator WebIDBKeyPath() const; |
53 | 55 |
54 enum Type { | 56 enum Type { |
(...skipping 22 matching lines...) Expand all Loading... |
77 | 79 |
78 private: | 80 private: |
79 Type m_type; | 81 Type m_type; |
80 String m_string; | 82 String m_string; |
81 Vector<String> m_array; | 83 Vector<String> m_array; |
82 }; | 84 }; |
83 | 85 |
84 } // namespace blink | 86 } // namespace blink |
85 | 87 |
86 #endif // IDBKeyPath_h | 88 #endif // IDBKeyPath_h |
OLD | NEW |