| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 static const AtomicString& directionNext(); | 49 static const AtomicString& directionNext(); |
| 50 static const AtomicString& directionNextUnique(); | 50 static const AtomicString& directionNextUnique(); |
| 51 static const AtomicString& directionPrev(); | 51 static const AtomicString& directionPrev(); |
| 52 static const AtomicString& directionPrevUnique(); | 52 static const AtomicString& directionPrevUnique(); |
| 53 | 53 |
| 54 static blink::WebIDBCursor::Direction stringToDirection(const String& modeSt
ring, ExceptionState&); | 54 static blink::WebIDBCursor::Direction stringToDirection(const String& modeSt
ring, ExceptionState&); |
| 55 static const AtomicString& directionToString(unsigned short mode); | 55 static const AtomicString& directionToString(unsigned short mode); |
| 56 | 56 |
| 57 static PassRefPtr<IDBCursor> create(PassOwnPtr<blink::WebIDBCursor>, blink::
WebIDBCursor::Direction, IDBRequest*, IDBAny* source, IDBTransaction*); | 57 static PassRefPtr<IDBCursor> create(PassOwnPtr<blink::WebIDBCursor>, blink::
WebIDBCursor::Direction, IDBRequest*, IDBAny* source, IDBTransaction*); |
| 58 virtual ~IDBCursor(); | 58 virtual ~IDBCursor(); |
| 59 void contextWillBeDestroyed() { m_backend.clear(); } |
| 59 | 60 |
| 60 // Implement the IDL | 61 // Implement the IDL |
| 61 const String& direction() const { return directionToString(m_direction); } | 62 const String& direction() const { return directionToString(m_direction); } |
| 62 ScriptValue key(NewScriptState*); | 63 ScriptValue key(NewScriptState*); |
| 63 ScriptValue primaryKey(NewScriptState*); | 64 ScriptValue primaryKey(NewScriptState*); |
| 64 ScriptValue value(NewScriptState*); | 65 ScriptValue value(NewScriptState*); |
| 65 ScriptValue source(NewScriptState*) const; | 66 ScriptValue source(NewScriptState*) const; |
| 66 | 67 |
| 67 PassRefPtr<IDBRequest> update(ExecutionContext*, ScriptValue&, ExceptionStat
e&); | 68 PassRefPtr<IDBRequest> update(ExecutionContext*, ScriptValue&, ExceptionStat
e&); |
| 68 void advance(unsigned long, ExceptionState&); | 69 void advance(unsigned long, ExceptionState&); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 bool m_primaryKeyDirty; | 111 bool m_primaryKeyDirty; |
| 111 bool m_valueDirty; | 112 bool m_valueDirty; |
| 112 RefPtr<IDBKey> m_key; | 113 RefPtr<IDBKey> m_key; |
| 113 RefPtr<IDBKey> m_primaryKey; | 114 RefPtr<IDBKey> m_primaryKey; |
| 114 RefPtr<SharedBuffer> m_value; | 115 RefPtr<SharedBuffer> m_value; |
| 115 }; | 116 }; |
| 116 | 117 |
| 117 } // namespace WebCore | 118 } // namespace WebCore |
| 118 | 119 |
| 119 #endif // IDBCursor_h | 120 #endif // IDBCursor_h |
| OLD | NEW |