| 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 DEFINE_WRAPPERTYPEINFO(); | 49 DEFINE_WRAPPERTYPEINFO(); |
| 50 USING_PRE_FINALIZATION_CALLBACK(IDBCursor, dispose); |
| 50 public: | 51 public: |
| 51 static WebIDBCursorDirection stringToDirection(const String& modeString, Exc
eptionState&); | 52 static WebIDBCursorDirection stringToDirection(const String& modeString, Exc
eptionState&); |
| 52 | 53 |
| 53 static IDBCursor* create(PassOwnPtr<WebIDBCursor>, WebIDBCursorDirection, ID
BRequest*, IDBAny* source, IDBTransaction*); | 54 static IDBCursor* create(PassOwnPtr<WebIDBCursor>, WebIDBCursorDirection, ID
BRequest*, IDBAny* source, IDBTransaction*); |
| 54 virtual ~IDBCursor(); | 55 virtual ~IDBCursor(); |
| 55 void dispose(); | |
| 56 void trace(Visitor*); | 56 void trace(Visitor*); |
| 57 void contextWillBeDestroyed() { m_backend.clear(); } | 57 void contextWillBeDestroyed() { m_backend.clear(); } |
| 58 | 58 |
| 59 // Implement the IDL | 59 // Implement the IDL |
| 60 const String& direction() const; | 60 const String& direction() const; |
| 61 ScriptValue key(ScriptState*); | 61 ScriptValue key(ScriptState*); |
| 62 ScriptValue primaryKey(ScriptState*); | 62 ScriptValue primaryKey(ScriptState*); |
| 63 ScriptValue value(ScriptState*); | 63 ScriptValue value(ScriptState*); |
| 64 ScriptValue source(ScriptState*) const; | 64 ScriptValue source(ScriptState*) const; |
| 65 | 65 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 bool m_valueDirty; | 101 bool m_valueDirty; |
| 102 Member<IDBKey> m_key; | 102 Member<IDBKey> m_key; |
| 103 Member<IDBKey> m_primaryKey; | 103 Member<IDBKey> m_primaryKey; |
| 104 RefPtr<SharedBuffer> m_value; | 104 RefPtr<SharedBuffer> m_value; |
| 105 OwnPtr<Vector<WebBlobInfo> > m_blobInfo; | 105 OwnPtr<Vector<WebBlobInfo> > m_blobInfo; |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 } // namespace blink | 108 } // namespace blink |
| 109 | 109 |
| 110 #endif // IDBCursor_h | 110 #endif // IDBCursor_h |
| OLD | NEW |