OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_RANGE_H_ | 5 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_RANGE_H_ |
6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_RANGE_H_ | 6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_RANGE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/common/indexed_db/indexed_db_key.h" | 10 #include "content/common/indexed_db/indexed_db_key.h" |
11 #include "third_party/WebKit/public/platform/WebIDBKeyRange.h" | |
12 | 11 |
13 namespace content { | 12 namespace content { |
14 | 13 |
15 class CONTENT_EXPORT IndexedDBKeyRange { | 14 class CONTENT_EXPORT IndexedDBKeyRange { |
16 public: | 15 public: |
17 IndexedDBKeyRange(); | 16 IndexedDBKeyRange(); |
18 explicit IndexedDBKeyRange(const WebKit::WebIDBKeyRange& key_range); | |
19 explicit IndexedDBKeyRange(const IndexedDBKey& onlyKey); | 17 explicit IndexedDBKeyRange(const IndexedDBKey& onlyKey); |
20 IndexedDBKeyRange(const IndexedDBKey& lower, | 18 IndexedDBKeyRange(const IndexedDBKey& lower, |
21 const IndexedDBKey& upper, | 19 const IndexedDBKey& upper, |
22 bool lower_open, | 20 bool lower_open, |
23 bool upper_open); | 21 bool upper_open); |
24 ~IndexedDBKeyRange(); | 22 ~IndexedDBKeyRange(); |
25 | 23 |
26 const IndexedDBKey& lower() const { return lower_; } | 24 const IndexedDBKey& lower() const { return lower_; } |
27 const IndexedDBKey& upper() const { return upper_; } | 25 const IndexedDBKey& upper() const { return upper_; } |
28 bool lowerOpen() const { return lower_open_; } | 26 bool lowerOpen() const { return lower_open_; } |
29 bool upperOpen() const { return upper_open_; } | 27 bool upperOpen() const { return upper_open_; } |
30 | 28 |
31 bool IsOnlyKey() const; | 29 bool IsOnlyKey() const; |
32 | 30 |
33 operator WebKit::WebIDBKeyRange() const; | |
34 | |
35 private: | 31 private: |
36 IndexedDBKey lower_; | 32 IndexedDBKey lower_; |
37 IndexedDBKey upper_; | 33 IndexedDBKey upper_; |
38 bool lower_open_; | 34 bool lower_open_; |
39 bool upper_open_; | 35 bool upper_open_; |
40 }; | 36 }; |
41 | 37 |
42 } // namespace content | 38 } // namespace content |
43 | 39 |
44 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_RANGE_H_ | 40 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_RANGE_H_ |
OLD | NEW |