OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 <wtf/OwnPtr.h> | 30 #include <wtf/OwnPtr.h> |
31 #include <wtf/PassOwnPtr.h> | 31 #include <wtf/PassOwnPtr.h> |
32 #include <wtf/PassRefPtr.h> | 32 #include <wtf/PassRefPtr.h> |
33 | 33 |
34 namespace WebKit { | 34 namespace WebKit { |
35 | 35 |
36 class WebIDBDatabase; | 36 class WebIDBDatabase; |
37 | 37 |
38 class IDBDatabaseBackendProxy : public WebCore::IDBDatabaseBackendInterface { | 38 class IDBDatabaseBackendProxy : public WebCore::IDBDatabaseBackendInterface { |
39 public: | 39 public: |
40 static PassRefPtr<WebCore::IDBDatabaseBackendInterface> create(PassOwnPtr<We
bIDBDatabase>); | 40 static WebCore::IDBDatabaseBackendInterface* create(PassOwnPtr<WebIDBDatabas
e>); |
41 virtual ~IDBDatabaseBackendProxy(); | 41 virtual ~IDBDatabaseBackendProxy(); |
42 | 42 |
43 virtual void createObjectStore(int64_t transactionId, int64_t objectStoreId,
const String& name, const WebCore::IDBKeyPath&, bool autoIncrement); | 43 virtual void createObjectStore(int64_t transactionId, int64_t objectStoreId,
const String& name, const WebCore::IDBKeyPath&, bool autoIncrement); |
44 virtual void deleteObjectStore(int64_t transactionId, int64_t objectStoreId)
; | 44 virtual void deleteObjectStore(int64_t transactionId, int64_t objectStoreId)
; |
45 virtual void createTransaction(int64_t, PassRefPtr<WebCore::IDBDatabaseCallb
acks>, const Vector<int64_t>&, unsigned short mode); | 45 virtual void createTransaction(int64_t, WebCore::IDBDatabaseCallbacks*, cons
t Vector<int64_t>&, unsigned short mode); |
46 virtual void close(PassRefPtr<WebCore::IDBDatabaseCallbacks>); | 46 virtual void close(WebCore::IDBDatabaseCallbacks*); |
47 | 47 |
48 virtual void commit(int64_t); | 48 virtual void commit(int64_t); |
49 virtual void abort(int64_t); | 49 virtual void abort(int64_t); |
50 virtual void abort(int64_t, PassRefPtr<WebCore::IDBDatabaseError>); | 50 virtual void abort(int64_t, PassRefPtr<WebCore::IDBDatabaseError>); |
51 | 51 |
52 virtual void get(int64_t transactionId, int64_t objectStoreId, int64_t index
Id, PassRefPtr<WebCore::IDBKeyRange>, bool keyOnly, PassRefPtr<WebCore::IDBCallb
acks>) OVERRIDE; | 52 virtual void get(int64_t transactionId, int64_t objectStoreId, int64_t index
Id, PassRefPtr<WebCore::IDBKeyRange>, bool keyOnly, WebCore::IDBCallbacks*) OVER
RIDE; |
53 virtual void put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<We
bCore::SharedBuffer> value, PassRefPtr<WebCore::IDBKey>, PutMode, PassRefPtr<Web
Core::IDBCallbacks>, const Vector<int64_t>& indexIds, const Vector<IndexKeys>&)
OVERRIDE; | 53 virtual void put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<We
bCore::SharedBuffer> value, PassRefPtr<WebCore::IDBKey>, PutMode, WebCore::IDBCa
llbacks*, const Vector<int64_t>& indexIds, const Vector<IndexKeys>&) OVERRIDE; |
54 virtual void setIndexKeys(int64_t transactionId, int64_t objectStoreId, Pass
RefPtr<WebCore::IDBKey> prpPrimaryKey, const Vector<int64_t>& indexIds, const Ve
ctor<IndexKeys>&) OVERRIDE; | 54 virtual void setIndexKeys(int64_t transactionId, int64_t objectStoreId, Pass
RefPtr<WebCore::IDBKey> prpPrimaryKey, const Vector<int64_t>& indexIds, const Ve
ctor<IndexKeys>&) OVERRIDE; |
55 virtual void setIndexesReady(int64_t transactionId, int64_t objectStoreId, c
onst Vector<int64_t>& indexIds) OVERRIDE; | 55 virtual void setIndexesReady(int64_t transactionId, int64_t objectStoreId, c
onst Vector<int64_t>& indexIds) OVERRIDE; |
56 virtual void openCursor(int64_t transactionId, int64_t objectStoreId, int64_
t indexId, PassRefPtr<WebCore::IDBKeyRange>, WebCore::IndexedDB::CursorDirection
, bool keyOnly, TaskType, PassRefPtr<WebCore::IDBCallbacks>) OVERRIDE; | 56 virtual void openCursor(int64_t transactionId, int64_t objectStoreId, int64_
t indexId, PassRefPtr<WebCore::IDBKeyRange>, WebCore::IndexedDB::CursorDirection
, bool keyOnly, TaskType, WebCore::IDBCallbacks*) OVERRIDE; |
57 virtual void count(int64_t transactionId, int64_t objectStoreId, int64_t ind
exId, PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>) OVERR
IDE; | 57 virtual void count(int64_t transactionId, int64_t objectStoreId, int64_t ind
exId, PassRefPtr<WebCore::IDBKeyRange>, WebCore::IDBCallbacks*) OVERRIDE; |
58 virtual void deleteRange(int64_t transactionId, int64_t objectStoreId, PassR
efPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>) OVERRIDE; | 58 virtual void deleteRange(int64_t transactionId, int64_t objectStoreId, PassR
efPtr<WebCore::IDBKeyRange>, WebCore::IDBCallbacks*) OVERRIDE; |
59 virtual void clear(int64_t transactionId, int64_t objectStoreId, PassRefPtr<
WebCore::IDBCallbacks>) OVERRIDE; | 59 virtual void clear(int64_t transactionId, int64_t objectStoreId, WebCore::ID
BCallbacks*) OVERRIDE; |
60 | 60 |
61 virtual void createIndex(int64_t transactionId, int64_t objectStoreId, int64
_t indexId, const String& name, const WebCore::IDBKeyPath&, bool unique, bool mu
ltiEntry) OVERRIDE; | 61 virtual void createIndex(int64_t transactionId, int64_t objectStoreId, int64
_t indexId, const String& name, const WebCore::IDBKeyPath&, bool unique, bool mu
ltiEntry) OVERRIDE; |
62 virtual void deleteIndex(int64_t transactionId, int64_t objectStoreId, int64
_t indexId) OVERRIDE; | 62 virtual void deleteIndex(int64_t transactionId, int64_t objectStoreId, int64
_t indexId) OVERRIDE; |
63 | 63 |
| 64 virtual void trace(WebCore::Visitor*) OVERRIDE { } |
| 65 |
64 private: | 66 private: |
65 IDBDatabaseBackendProxy(PassOwnPtr<WebIDBDatabase>); | 67 IDBDatabaseBackendProxy(PassOwnPtr<WebIDBDatabase>); |
66 | 68 |
67 OwnPtr<WebIDBDatabase> m_webIDBDatabase; | 69 OwnPtr<WebIDBDatabase> m_webIDBDatabase; |
68 }; | 70 }; |
69 | 71 |
70 } // namespace WebKit | 72 } // namespace WebKit |
71 | 73 |
72 #endif // IDBDatabaseBackendProxy_h | 74 #endif // IDBDatabaseBackendProxy_h |
OLD | NEW |