| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
| 18 #include "content/browser/indexed_db/indexed_db_database_error.h" | |
| 19 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 18 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
| 19 #include "content/common/indexed_db/indexed_db_database_error.h" |
| 20 #include "content/common/indexed_db/indexed_db_key.h" | 20 #include "content/common/indexed_db/indexed_db_key.h" |
| 21 #include "content/common/indexed_db/indexed_db_key_path.h" | 21 #include "content/common/indexed_db/indexed_db_key_path.h" |
| 22 #include "url/origin.h" | 22 #include "url/origin.h" |
| 23 | 23 |
| 24 namespace content { | 24 namespace content { |
| 25 class IndexedDBBlobInfo; | 25 class IndexedDBBlobInfo; |
| 26 class IndexedDBConnection; | 26 class IndexedDBConnection; |
| 27 class IndexedDBCursor; | 27 class IndexedDBCursor; |
| 28 class IndexedDBDatabase; | 28 class IndexedDBDatabase; |
| 29 class IndexedDBDatabaseCallbacks; | 29 class IndexedDBDatabaseCallbacks; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 43 // IndexedDBCursor responses | 43 // IndexedDBCursor responses |
| 44 IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host, | 44 IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host, |
| 45 int32_t ipc_thread_id, | 45 int32_t ipc_thread_id, |
| 46 int32_t ipc_callbacks_id, | 46 int32_t ipc_callbacks_id, |
| 47 int32_t ipc_cursor_id); | 47 int32_t ipc_cursor_id); |
| 48 | 48 |
| 49 // IndexedDBDatabase responses | 49 // IndexedDBDatabase responses |
| 50 IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host, | 50 IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host, |
| 51 int32_t ipc_thread_id, | 51 int32_t ipc_thread_id, |
| 52 int32_t ipc_callbacks_id, | 52 int32_t ipc_callbacks_id, |
| 53 int32_t ipc_database_callbacks_id, | |
| 54 int64_t host_transaction_id, | 53 int64_t host_transaction_id, |
| 55 const url::Origin& origin); | 54 const url::Origin& origin); |
| 56 | 55 |
| 57 virtual void OnError(const IndexedDBDatabaseError& error); | 56 virtual void OnError(const IndexedDBDatabaseError& error); |
| 58 | 57 |
| 59 // IndexedDBFactory::GetDatabaseNames | 58 // IndexedDBFactory::GetDatabaseNames |
| 60 virtual void OnSuccess(const std::vector<base::string16>& string); | 59 virtual void OnSuccess(const std::vector<base::string16>& string); |
| 61 | 60 |
| 62 // IndexedDBFactory::Open / DeleteDatabase | 61 // IndexedDBFactory::Open / DeleteDatabase |
| 63 virtual void OnBlocked(int64_t existing_version); | 62 virtual void OnBlocked(int64_t existing_version); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 int32_t ipc_callbacks_id_; | 122 int32_t ipc_callbacks_id_; |
| 124 int32_t ipc_thread_id_; | 123 int32_t ipc_thread_id_; |
| 125 | 124 |
| 126 // IndexedDBCursor callbacks ------------------------ | 125 // IndexedDBCursor callbacks ------------------------ |
| 127 int32_t ipc_cursor_id_; | 126 int32_t ipc_cursor_id_; |
| 128 | 127 |
| 129 // IndexedDBDatabase callbacks ------------------------ | 128 // IndexedDBDatabase callbacks ------------------------ |
| 130 int64_t host_transaction_id_; | 129 int64_t host_transaction_id_; |
| 131 url::Origin origin_; | 130 url::Origin origin_; |
| 132 int32_t ipc_database_id_; | 131 int32_t ipc_database_id_; |
| 133 int32_t ipc_database_callbacks_id_; | |
| 134 | 132 |
| 135 // Used to assert that OnSuccess is only called if there was no data loss. | 133 // Used to assert that OnSuccess is only called if there was no data loss. |
| 136 blink::WebIDBDataLoss data_loss_; | 134 blink::WebIDBDataLoss data_loss_; |
| 137 | 135 |
| 138 // The "blocked" event should be sent at most once per request. | 136 // The "blocked" event should be sent at most once per request. |
| 139 bool sent_blocked_; | 137 bool sent_blocked_; |
| 140 base::TimeTicks connection_open_start_time_; | 138 base::TimeTicks connection_open_start_time_; |
| 141 DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks); | 139 DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks); |
| 142 }; | 140 }; |
| 143 | 141 |
| 144 } // namespace content | 142 } // namespace content |
| 145 | 143 |
| 146 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ | 144 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ |
| OLD | NEW |