| 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" | 18 #include "content/browser/indexed_db/indexed_db_database_error.h" |
| 19 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 19 #include "content/browser/indexed_db/indexed_db_dispatcher_host.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/gurl.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; |
| 30 struct IndexedDBDatabaseMetadata; | 30 struct IndexedDBDatabaseMetadata; |
| 31 struct IndexedDBReturnValue; | 31 struct IndexedDBReturnValue; |
| 32 struct IndexedDBValue; | 32 struct IndexedDBValue; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 44 int32_t ipc_thread_id, | 44 int32_t ipc_thread_id, |
| 45 int32_t ipc_callbacks_id, | 45 int32_t ipc_callbacks_id, |
| 46 int32_t ipc_cursor_id); | 46 int32_t ipc_cursor_id); |
| 47 | 47 |
| 48 // IndexedDBDatabase responses | 48 // IndexedDBDatabase responses |
| 49 IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host, | 49 IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host, |
| 50 int32_t ipc_thread_id, | 50 int32_t ipc_thread_id, |
| 51 int32_t ipc_callbacks_id, | 51 int32_t ipc_callbacks_id, |
| 52 int32_t ipc_database_callbacks_id, | 52 int32_t ipc_database_callbacks_id, |
| 53 int64_t host_transaction_id, | 53 int64_t host_transaction_id, |
| 54 const GURL& origin_url); | 54 const url::Origin& origin); |
| 55 | 55 |
| 56 virtual void OnError(const IndexedDBDatabaseError& error); | 56 virtual void OnError(const IndexedDBDatabaseError& error); |
| 57 | 57 |
| 58 // IndexedDBFactory::GetDatabaseNames | 58 // IndexedDBFactory::GetDatabaseNames |
| 59 virtual void OnSuccess(const std::vector<base::string16>& string); | 59 virtual void OnSuccess(const std::vector<base::string16>& string); |
| 60 | 60 |
| 61 // IndexedDBFactory::Open / DeleteDatabase | 61 // IndexedDBFactory::Open / DeleteDatabase |
| 62 virtual void OnBlocked(int64_t existing_version); | 62 virtual void OnBlocked(int64_t existing_version); |
| 63 | 63 |
| 64 // IndexedDBFactory::Open | 64 // IndexedDBFactory::Open |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // Originally from IndexedDBCallbacks: | 123 // Originally from IndexedDBCallbacks: |
| 124 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_; | 124 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_; |
| 125 int32_t ipc_callbacks_id_; | 125 int32_t ipc_callbacks_id_; |
| 126 int32_t ipc_thread_id_; | 126 int32_t ipc_thread_id_; |
| 127 | 127 |
| 128 // IndexedDBCursor callbacks ------------------------ | 128 // IndexedDBCursor callbacks ------------------------ |
| 129 int32_t ipc_cursor_id_; | 129 int32_t ipc_cursor_id_; |
| 130 | 130 |
| 131 // IndexedDBDatabase callbacks ------------------------ | 131 // IndexedDBDatabase callbacks ------------------------ |
| 132 int64_t host_transaction_id_; | 132 int64_t host_transaction_id_; |
| 133 GURL origin_url_; | 133 url::Origin origin_; |
| 134 int32_t ipc_database_id_; | 134 int32_t ipc_database_id_; |
| 135 int32_t ipc_database_callbacks_id_; | 135 int32_t ipc_database_callbacks_id_; |
| 136 | 136 |
| 137 // Stored in OnDataLoss, merged with OnUpgradeNeeded response. | 137 // Stored in OnDataLoss, merged with OnUpgradeNeeded response. |
| 138 blink::WebIDBDataLoss data_loss_; | 138 blink::WebIDBDataLoss data_loss_; |
| 139 std::string data_loss_message_; | 139 std::string data_loss_message_; |
| 140 | 140 |
| 141 // The "blocked" event should be sent at most once per request. | 141 // The "blocked" event should be sent at most once per request. |
| 142 bool sent_blocked_; | 142 bool sent_blocked_; |
| 143 base::TimeTicks connection_open_start_time_; | 143 base::TimeTicks connection_open_start_time_; |
| 144 DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks); | 144 DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks); |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 } // namespace content | 147 } // namespace content |
| 148 | 148 |
| 149 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ | 149 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ |
| OLD | NEW |