| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 // Implement the IDBKeyRange IDL | 62 // Implement the IDBKeyRange IDL |
| 63 IDBKey* lower() const { return m_lower.get(); } | 63 IDBKey* lower() const { return m_lower.get(); } |
| 64 IDBKey* upper() const { return m_upper.get(); } | 64 IDBKey* upper() const { return m_upper.get(); } |
| 65 | 65 |
| 66 ScriptValue lowerValue(ScriptState*) const; | 66 ScriptValue lowerValue(ScriptState*) const; |
| 67 ScriptValue upperValue(ScriptState*) const; | 67 ScriptValue upperValue(ScriptState*) const; |
| 68 bool lowerOpen() const { return m_lowerType == LowerBoundOpen; } | 68 bool lowerOpen() const { return m_lowerType == LowerBoundOpen; } |
| 69 bool upperOpen() const { return m_upperType == UpperBoundOpen; } | 69 bool upperOpen() const { return m_upperType == UpperBoundOpen; } |
| 70 | 70 |
| 71 static IDBKeyRange* only(ExecutionContext*, | 71 static IDBKeyRange* only(ScriptState*, |
| 72 const ScriptValue& key, | 72 const ScriptValue& key, |
| 73 ExceptionState&); | 73 ExceptionState&); |
| 74 static IDBKeyRange* lowerBound(ExecutionContext*, | 74 static IDBKeyRange* lowerBound(ScriptState*, |
| 75 const ScriptValue& bound, | 75 const ScriptValue& bound, |
| 76 bool open, | 76 bool open, |
| 77 ExceptionState&); | 77 ExceptionState&); |
| 78 static IDBKeyRange* upperBound(ExecutionContext*, | 78 static IDBKeyRange* upperBound(ScriptState*, |
| 79 const ScriptValue& bound, | 79 const ScriptValue& bound, |
| 80 bool open, | 80 bool open, |
| 81 ExceptionState&); | 81 ExceptionState&); |
| 82 static IDBKeyRange* bound(ExecutionContext*, | 82 static IDBKeyRange* bound(ScriptState*, |
| 83 const ScriptValue& lower, | 83 const ScriptValue& lower, |
| 84 const ScriptValue& upper, | 84 const ScriptValue& upper, |
| 85 bool lowerOpen, | 85 bool lowerOpen, |
| 86 bool upperOpen, | 86 bool upperOpen, |
| 87 ExceptionState&); | 87 ExceptionState&); |
| 88 | 88 |
| 89 static IDBKeyRange* only(IDBKey* value, ExceptionState&); | 89 static IDBKeyRange* only(IDBKey* value, ExceptionState&); |
| 90 | 90 |
| 91 bool includes(ExecutionContext*, const ScriptValue& key, ExceptionState&); | 91 bool includes(ScriptState*, const ScriptValue& key, ExceptionState&); |
| 92 | 92 |
| 93 private: | 93 private: |
| 94 IDBKeyRange(IDBKey* lower, | 94 IDBKeyRange(IDBKey* lower, |
| 95 IDBKey* upper, | 95 IDBKey* upper, |
| 96 LowerBoundType lowerType, | 96 LowerBoundType lowerType, |
| 97 UpperBoundType upperType); | 97 UpperBoundType upperType); |
| 98 | 98 |
| 99 Member<IDBKey> m_lower; | 99 Member<IDBKey> m_lower; |
| 100 Member<IDBKey> m_upper; | 100 Member<IDBKey> m_upper; |
| 101 const LowerBoundType m_lowerType; | 101 const LowerBoundType m_lowerType; |
| 102 const UpperBoundType m_upperType; | 102 const UpperBoundType m_upperType; |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 } // namespace blink | 105 } // namespace blink |
| 106 | 106 |
| 107 #endif // IDBKeyRange_h | 107 #endif // IDBKeyRange_h |
| OLD | NEW |