| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/in_process_webkit/indexed_db_callbacks.h" |
| 5 #include "content/browser/indexed_db/indexed_db_callbacks_wrapper.h" | 6 #include "content/browser/indexed_db/indexed_db_callbacks_wrapper.h" |
| 6 | |
| 7 #include "content/browser/indexed_db/indexed_db_cursor.h" | 7 #include "content/browser/indexed_db/indexed_db_cursor.h" |
| 8 #include "content/browser/indexed_db/indexed_db_metadata.h" | 8 #include "content/browser/indexed_db/indexed_db_metadata.h" |
| 9 #include "content/browser/indexed_db/webidbcursor_impl.h" | 9 #include "content/browser/indexed_db/webidbcursor_impl.h" |
| 10 #include "content/browser/indexed_db/webidbdatabase_impl.h" | 10 #include "content/browser/indexed_db/webidbdatabase_impl.h" |
| 11 #include "third_party/WebKit/public/platform/WebData.h" | 11 #include "third_party/WebKit/public/platform/WebData.h" |
| 12 #include "third_party/WebKit/public/platform/WebIDBDatabaseError.h" | 12 #include "third_party/WebKit/public/platform/WebIDBDatabaseError.h" |
| 13 #include "third_party/WebKit/public/platform/WebIDBKey.h" | 13 #include "third_party/WebKit/public/platform/WebIDBKey.h" |
| 14 #include "third_party/WebKit/public/platform/WebIDBMetadata.h" | 14 #include "third_party/WebKit/public/platform/WebIDBMetadata.h" |
| 15 #include "third_party/WebKit/public/platform/WebString.h" | 15 #include "third_party/WebKit/public/platform/WebString.h" |
| 16 #include "third_party/WebKit/public/platform/WebVector.h" | 16 #include "third_party/WebKit/public/platform/WebVector.h" |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 | 19 |
| 20 using WebKit::WebData; | 20 using WebKit::WebData; |
| 21 using WebKit::WebIDBKey; | 21 using WebKit::WebIDBKey; |
| 22 using WebKit::WebIDBMetadata; | 22 using WebKit::WebIDBMetadata; |
| 23 using WebKit::WebString; | 23 using WebKit::WebString; |
| 24 using WebKit::WebVector; | 24 using WebKit::WebVector; |
| 25 | 25 |
| 26 IndexedDBCallbacksWrapper::IndexedDBCallbacksWrapper( | 26 IndexedDBCallbacksWrapper::IndexedDBCallbacksWrapper( |
| 27 WebKit::WebIDBCallbacks* callbacks) | 27 IndexedDBCallbacksBase* callbacks) |
| 28 : callbacks_(callbacks), did_complete_(false), did_create_proxy_(false) {} | 28 : callbacks_(callbacks), did_complete_(false), did_create_proxy_(false) {} |
| 29 | 29 |
| 30 IndexedDBCallbacksWrapper::~IndexedDBCallbacksWrapper() {} | 30 IndexedDBCallbacksWrapper::~IndexedDBCallbacksWrapper() {} |
| 31 | 31 |
| 32 void IndexedDBCallbacksWrapper::OnError(const IndexedDBDatabaseError& error) { | 32 void IndexedDBCallbacksWrapper::OnError(const IndexedDBDatabaseError& error) { |
| 33 DCHECK(callbacks_); | 33 DCHECK(callbacks_); |
| 34 callbacks_->onError( | 34 callbacks_->onError( |
| 35 WebKit::WebIDBDatabaseError(error.code(), error.message())); | 35 WebKit::WebIDBDatabaseError(error.code(), error.message())); |
| 36 callbacks_.reset(); | 36 callbacks_.reset(); |
| 37 } | 37 } |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 206 |
| 207 callbacks_->onSuccess(impl, web_metadata); | 207 callbacks_->onSuccess(impl, web_metadata); |
| 208 callbacks_.reset(); | 208 callbacks_.reset(); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void IndexedDBCallbacksWrapper::SetDatabaseCallbacks( | 211 void IndexedDBCallbacksWrapper::SetDatabaseCallbacks( |
| 212 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks) { | 212 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks) { |
| 213 database_callbacks_ = database_callbacks; | 213 database_callbacks_ = database_callbacks; |
| 214 } | 214 } |
| 215 } // namespace content | 215 } // namespace content |
| OLD | NEW |