| 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 class ExceptionState; | 41 class ExceptionState; |
| 42 class IDBAny; | 42 class IDBAny; |
| 43 class IDBTransaction; | 43 class IDBTransaction; |
| 44 class ExecutionContext; | 44 class ExecutionContext; |
| 45 class SharedBuffer; | 45 class SharedBuffer; |
| 46 class WebBlobInfo; | 46 class WebBlobInfo; |
| 47 | 47 |
| 48 class IDBCursor : public GarbageCollectedFinalized<IDBCursor>, public ScriptWrap
pable { | 48 class IDBCursor : public GarbageCollectedFinalized<IDBCursor>, public ScriptWrap
pable { |
| 49 public: | 49 public: |
| 50 static const AtomicString& directionNext(); | |
| 51 static const AtomicString& directionNextUnique(); | |
| 52 static const AtomicString& directionPrev(); | |
| 53 static const AtomicString& directionPrevUnique(); | |
| 54 | |
| 55 static WebIDBCursorDirection stringToDirection(const String& modeString, Exc
eptionState&); | 50 static WebIDBCursorDirection stringToDirection(const String& modeString, Exc
eptionState&); |
| 56 static const AtomicString& directionToString(unsigned short mode); | |
| 57 | 51 |
| 58 static IDBCursor* create(PassOwnPtr<WebIDBCursor>, WebIDBCursorDirection, ID
BRequest*, IDBAny* source, IDBTransaction*); | 52 static IDBCursor* create(PassOwnPtr<WebIDBCursor>, WebIDBCursorDirection, ID
BRequest*, IDBAny* source, IDBTransaction*); |
| 59 virtual ~IDBCursor(); | 53 virtual ~IDBCursor(); |
| 60 void trace(Visitor*); | 54 void trace(Visitor*); |
| 61 void contextWillBeDestroyed() { m_backend.clear(); } | 55 void contextWillBeDestroyed() { m_backend.clear(); } |
| 62 | 56 |
| 63 // Implement the IDL | 57 // Implement the IDL |
| 64 const String& direction() const { return directionToString(m_direction); } | 58 const String& direction() const; |
| 65 ScriptValue key(ScriptState*); | 59 ScriptValue key(ScriptState*); |
| 66 ScriptValue primaryKey(ScriptState*); | 60 ScriptValue primaryKey(ScriptState*); |
| 67 ScriptValue value(ScriptState*); | 61 ScriptValue value(ScriptState*); |
| 68 ScriptValue source(ScriptState*) const; | 62 ScriptValue source(ScriptState*) const; |
| 69 | 63 |
| 70 IDBRequest* update(ScriptState*, ScriptValue&, ExceptionState&); | 64 IDBRequest* update(ScriptState*, ScriptValue&, ExceptionState&); |
| 71 void advance(unsigned long, ExceptionState&); | 65 void advance(unsigned long, ExceptionState&); |
| 72 void continueFunction(ScriptState*, const ScriptValue& key, ExceptionState&)
; | 66 void continueFunction(ScriptState*, const ScriptValue& key, ExceptionState&)
; |
| 73 void continuePrimaryKey(ScriptState*, const ScriptValue& key, const ScriptVa
lue& primaryKey, ExceptionState&); | 67 void continuePrimaryKey(ScriptState*, const ScriptValue& key, const ScriptVa
lue& primaryKey, ExceptionState&); |
| 74 IDBRequest* deleteFunction(ScriptState*, ExceptionState&); | 68 IDBRequest* deleteFunction(ScriptState*, ExceptionState&); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 105 bool m_valueDirty; | 99 bool m_valueDirty; |
| 106 Member<IDBKey> m_key; | 100 Member<IDBKey> m_key; |
| 107 Member<IDBKey> m_primaryKey; | 101 Member<IDBKey> m_primaryKey; |
| 108 RefPtr<SharedBuffer> m_value; | 102 RefPtr<SharedBuffer> m_value; |
| 109 OwnPtr<Vector<WebBlobInfo> > m_blobInfo; | 103 OwnPtr<Vector<WebBlobInfo> > m_blobInfo; |
| 110 }; | 104 }; |
| 111 | 105 |
| 112 } // namespace blink | 106 } // namespace blink |
| 113 | 107 |
| 114 #endif // IDBCursor_h | 108 #endif // IDBCursor_h |
| OLD | NEW |