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 26 matching lines...) Expand all Loading... |
37 | 37 |
38 namespace WebKit { | 38 namespace WebKit { |
39 | 39 |
40 class WebIDBDatabaseCallbacks; | 40 class WebIDBDatabaseCallbacks; |
41 class WebIDBDatabaseError; | 41 class WebIDBDatabaseError; |
42 class WebIDBDatabaseMetadata; | 42 class WebIDBDatabaseMetadata; |
43 | 43 |
44 // See comment in WebIDBFactory for a high level overview these classes. | 44 // See comment in WebIDBFactory for a high level overview these classes. |
45 class WebIDBDatabaseImpl : public WebIDBDatabase { | 45 class WebIDBDatabaseImpl : public WebIDBDatabase { |
46 public: | 46 public: |
47 WebIDBDatabaseImpl(WTF::PassRefPtr<WebCore::IDBDatabaseBackendInterface>, WT
F::PassRefPtr<IDBDatabaseCallbacksProxy>); | 47 WebIDBDatabaseImpl(WebCore::IDBDatabaseBackendInterface*, IDBDatabaseCallbac
ksProxy*); |
48 virtual ~WebIDBDatabaseImpl(); | 48 virtual ~WebIDBDatabaseImpl(); |
49 | 49 |
50 virtual void createObjectStore(long long transactionId, long long objectStor
eId, const WebString& name, const WebIDBKeyPath&, bool autoIncrement); | 50 virtual void createObjectStore(long long transactionId, long long objectStor
eId, const WebString& name, const WebIDBKeyPath&, bool autoIncrement); |
51 virtual void deleteObjectStore(long long objectStoreId, long long transactio
nId); | 51 virtual void deleteObjectStore(long long objectStoreId, long long transactio
nId); |
52 virtual void createTransaction(long long id, WebIDBDatabaseCallbacks*, const
WebVector<long long>&, unsigned short mode); | 52 virtual void createTransaction(long long id, WebIDBDatabaseCallbacks*, const
WebVector<long long>&, unsigned short mode); |
53 virtual void forceClose(); | 53 virtual void forceClose(); |
54 virtual void close(); | 54 virtual void close(); |
55 virtual void abort(long long transactionId); | 55 virtual void abort(long long transactionId); |
56 virtual void abort(long long transactionId, const WebIDBDatabaseError&); | 56 virtual void abort(long long transactionId, const WebIDBDatabaseError&); |
57 virtual void commit(long long transactionId); | 57 virtual void commit(long long transactionId); |
58 | 58 |
59 virtual void get(long long transactionId, long long objectStoreId, long long
indexId, const WebIDBKeyRange&, bool keyOnly, WebIDBCallbacks*) OVERRIDE; | 59 virtual void get(long long transactionId, long long objectStoreId, long long
indexId, const WebIDBKeyRange&, bool keyOnly, WebIDBCallbacks*) OVERRIDE; |
60 virtual void put(long long transactionId, long long objectStoreId, const Web
Data& value, const WebIDBKey&, PutMode, WebIDBCallbacks*, const WebVector<long l
ong>& indexIds, const WebVector<WebIndexKeys>&) OVERRIDE; | 60 virtual void put(long long transactionId, long long objectStoreId, const Web
Data& value, const WebIDBKey&, PutMode, WebIDBCallbacks*, const WebVector<long l
ong>& indexIds, const WebVector<WebIndexKeys>&) OVERRIDE; |
61 virtual void setIndexKeys(long long transactionId, long long objectStoreId,
const WebIDBKey&, const WebVector<long long>& indexIds, const WebVector<WebIndex
Keys>&) OVERRIDE; | 61 virtual void setIndexKeys(long long transactionId, long long objectStoreId,
const WebIDBKey&, const WebVector<long long>& indexIds, const WebVector<WebIndex
Keys>&) OVERRIDE; |
62 virtual void setIndexesReady(long long transactionId, long long objectStoreI
d, const WebVector<long long>& indexIds) OVERRIDE; | 62 virtual void setIndexesReady(long long transactionId, long long objectStoreI
d, const WebVector<long long>& indexIds) OVERRIDE; |
63 virtual void openCursor(long long transactionId, long long objectStoreId, lo
ng long indexId, const WebIDBKeyRange&, unsigned short direction, bool keyOnly,
TaskType, WebIDBCallbacks*) OVERRIDE; | 63 virtual void openCursor(long long transactionId, long long objectStoreId, lo
ng long indexId, const WebIDBKeyRange&, unsigned short direction, bool keyOnly,
TaskType, WebIDBCallbacks*) OVERRIDE; |
64 virtual void count(long long transactionId, long long objectStoreId, long lo
ng indexId, const WebIDBKeyRange&, WebIDBCallbacks*) OVERRIDE; | 64 virtual void count(long long transactionId, long long objectStoreId, long lo
ng indexId, const WebIDBKeyRange&, WebIDBCallbacks*) OVERRIDE; |
65 virtual void deleteRange(long long transactionId, long long objectStoreId, c
onst WebIDBKeyRange&, WebIDBCallbacks*) OVERRIDE; | 65 virtual void deleteRange(long long transactionId, long long objectStoreId, c
onst WebIDBKeyRange&, WebIDBCallbacks*) OVERRIDE; |
66 virtual void clear(long long transactionId, long long objectStoreId, WebIDBC
allbacks*) OVERRIDE; | 66 virtual void clear(long long transactionId, long long objectStoreId, WebIDBC
allbacks*) OVERRIDE; |
67 | 67 |
68 virtual void createIndex(long long transactionId, long long objectStoreId, l
ong long indexId, const WebString& name, const WebIDBKeyPath&, bool unique, bool
multiEntry); | 68 virtual void createIndex(long long transactionId, long long objectStoreId, l
ong long indexId, const WebString& name, const WebIDBKeyPath&, bool unique, bool
multiEntry); |
69 virtual void deleteIndex(long long transactionId, long long objectStoreId, l
ong long indexId); | 69 virtual void deleteIndex(long long transactionId, long long objectStoreId, l
ong long indexId); |
70 private: | 70 private: |
71 WTF::RefPtr<WebCore::IDBDatabaseBackendInterface> m_databaseBackend; | 71 WebCore::Persistent<WebCore::IDBDatabaseBackendInterface> m_databaseBackend; |
72 WTF::RefPtr<IDBDatabaseCallbacksProxy> m_databaseCallbacks; | 72 WebCore::Persistent<IDBDatabaseCallbacksProxy> m_databaseCallbacks; |
73 }; | 73 }; |
74 | 74 |
75 } // namespace WebKit | 75 } // namespace WebKit |
76 | 76 |
77 #endif // WebIDBDatabaseImpl_h | 77 #endif // WebIDBDatabaseImpl_h |
OLD | NEW |