Chromium Code Reviews| 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 19 matching lines...) Expand all Loading... | |
| 30 #include "public/platform/WebPrivatePtr.h" | 30 #include "public/platform/WebPrivatePtr.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 class IDBKeyRange; | 34 class IDBKeyRange; |
| 35 class WebIDBKey; | 35 class WebIDBKey; |
| 36 | 36 |
| 37 class WebIDBKeyRange { | 37 class WebIDBKeyRange { |
| 38 public: | 38 public: |
| 39 ~WebIDBKeyRange() { reset(); } | 39 ~WebIDBKeyRange() { reset(); } |
| 40 | 40 WebIDBKeyRange() {} |
|
jsbell
2016/07/11 18:25:33
Nit: leave a blank line.
palakj1
2016/07/11 22:25:40
Done.
| |
| 41 WebIDBKeyRange(const WebIDBKeyRange& keyRange) { assign(keyRange); } | 41 WebIDBKeyRange(const WebIDBKeyRange& keyRange) { assign(keyRange); } |
| 42 WebIDBKeyRange(const WebIDBKey& lower, const WebIDBKey& upper, bool lowerOpe n, bool upperOpen) { assign(lower, upper, lowerOpen, upperOpen); } | 42 WebIDBKeyRange(const WebIDBKey& lower, const WebIDBKey& upper, bool lowerOpe n, bool upperOpen) { assign(lower, upper, lowerOpen, upperOpen); } |
| 43 | 43 |
| 44 BLINK_EXPORT WebIDBKey lower() const; | 44 BLINK_EXPORT WebIDBKey lower() const; |
| 45 BLINK_EXPORT WebIDBKey upper() const; | 45 BLINK_EXPORT WebIDBKey upper() const; |
| 46 BLINK_EXPORT bool lowerOpen() const; | 46 BLINK_EXPORT bool lowerOpen() const; |
| 47 BLINK_EXPORT bool upperOpen() const; | 47 BLINK_EXPORT bool upperOpen() const; |
| 48 | 48 |
| 49 BLINK_EXPORT void assign(const WebIDBKeyRange&); | 49 BLINK_EXPORT void assign(const WebIDBKeyRange&); |
| 50 BLINK_EXPORT void assign(const WebIDBKey& lower, const WebIDBKey& upper, boo l lowerOpen, bool upperOpen); | 50 BLINK_EXPORT void assign(const WebIDBKey& lower, const WebIDBKey& upper, boo l lowerOpen, bool upperOpen); |
| 51 | |
| 52 WebIDBKeyRange& operator=(const WebIDBKeyRange& e) | |
| 53 { | |
| 54 assign(e); | |
| 55 return *this; | |
| 56 } | |
| 57 | |
| 51 // FIXME: when compiling core or modules, use inline for reset. | 58 // FIXME: when compiling core or modules, use inline for reset. |
| 52 // when compiling WebIDBKeyRange.cpp, don't use inline to avoid redefinition. | 59 // when compiling WebIDBKeyRange.cpp, don't use inline to avoid redefinition. |
| 53 #if !BLINK_WEB_IMPLEMENTATION && BLINK_IMPLEMENTATION && defined(COMPONENT_BUILD ) | 60 #if !BLINK_WEB_IMPLEMENTATION && BLINK_IMPLEMENTATION && defined(COMPONENT_BUILD ) |
| 54 BLINK_EXPORT void reset() | 61 BLINK_EXPORT void reset() |
| 55 { | 62 { |
| 56 m_private.reset(); | 63 m_private.reset(); |
| 57 } | 64 } |
| 58 #else | 65 #else |
| 59 BLINK_EXPORT void reset(); | 66 BLINK_EXPORT void reset(); |
| 60 #endif | 67 #endif |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 74 } | 81 } |
| 75 #endif | 82 #endif |
| 76 | 83 |
| 77 private: | 84 private: |
| 78 WebPrivatePtr<IDBKeyRange> m_private; | 85 WebPrivatePtr<IDBKeyRange> m_private; |
| 79 }; | 86 }; |
| 80 | 87 |
| 81 } // namespace blink | 88 } // namespace blink |
| 82 | 89 |
| 83 #endif // WebIDBKeyRange_h | 90 #endif // WebIDBKeyRange_h |
| OLD | NEW |