Chromium Code Reviews| Index: content/browser/in_process_webkit/indexed_db_callbacks.h |
| diff --git a/content/browser/in_process_webkit/indexed_db_callbacks.h b/content/browser/in_process_webkit/indexed_db_callbacks.h |
| index e80862a259e60f1a54e86ab39ddbc67e22e9e117..1aa8f6f557a5972a82b1bc31ebc72eea46f15630 100644 |
| --- a/content/browser/in_process_webkit/indexed_db_callbacks.h |
| +++ b/content/browser/in_process_webkit/indexed_db_callbacks.h |
| @@ -9,6 +9,7 @@ |
| #include "base/memory/ref_counted.h" |
| #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" |
| #include "googleurl/src/gurl.h" |
| +#include "third_party/WebKit/Source/Platform/chromium/public/WebData.h" |
| #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCallbacks.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCursor.h" |
| @@ -106,6 +107,19 @@ class IndexedDBCallbacks<WebKit::WebIDBCursor> |
| const WebKit::WebVector<WebKit::WebIDBKey>& primaryKeys, |
| const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values); |
| + virtual void onSuccess(WebKit::WebIDBCursor* idb_object, |
| + const WebKit::WebIDBKey& key, |
| + const WebKit::WebIDBKey& primaryKey, |
| + const WebKit::WebData& value); |
| + virtual void onSuccess(const WebKit::WebIDBKey& key, |
|
jsbell
2013/02/20 23:52:08
While you're in the guts here... what do you think
alecflett
2013/02/21 00:14:16
Talked about this briefly - we'll tackle this if/w
|
| + const WebKit::WebIDBKey& primaryKey, |
| + const WebKit::WebData& value); |
| + virtual void onSuccess(const WebKit::WebData& value); |
| + virtual void onSuccessWithPrefetch( |
| + const WebKit::WebVector<WebKit::WebIDBKey>& keys, |
| + const WebKit::WebVector<WebKit::WebIDBKey>& primaryKeys, |
| + const WebKit::WebVector<WebKit::WebData>& values); |
| + |
| private: |
| // The id of the cursor this callback concerns, or -1 if the cursor |
| // does not exist yet. |
| @@ -178,6 +192,31 @@ class IndexedDBCallbacks<WebKit::WebSerializedScriptValue> |
| DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBCallbacks); |
| }; |
| +// WebData is implemented in WebKit as opposed to being an interface |
| +// Chromium implements. Thus we pass a const ___& version and thus we |
| +// need this specialization. |
| +template <> |
| +class IndexedDBCallbacks<WebKit::WebData> |
| + : public IndexedDBCallbacksBase { |
| + public: |
| + IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host, |
| + int32 ipc_thread_id, |
| + int32 ipc_response_id) |
| + : IndexedDBCallbacksBase(dispatcher_host, ipc_thread_id, |
| + ipc_response_id) { } |
| + |
| + virtual void onSuccess(const WebKit::WebData& value); |
| + virtual void onSuccess(const WebKit::WebData& value, |
| + const WebKit::WebIDBKey& key, |
| + const WebKit::WebIDBKeyPath& keyPath); |
| + virtual void onSuccess(long long value); |
| + virtual void onSuccess(); |
| + virtual void onSuccess(const WebKit::WebIDBKey& value); |
| + |
| + private: |
| + DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBCallbacks); |
| +}; |
| + |
| } // namespace content |
| #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CALLBACKS_H_ |