| OLD | NEW | 
|    1 // Copyright 2013 The Chromium Authors. All rights reserved. |    1 // Copyright 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 #ifndef CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ |    5 #ifndef CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ | 
|    6 #define CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ |    6 #define CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ | 
|    7  |    7  | 
|    8 #include <stddef.h> |    8 #include <stddef.h> | 
|    9 #include <stdint.h> |    9 #include <stdint.h> | 
|   10  |   10  | 
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  122       blink::WebIDBDatabaseCallbacks* callback_state); |  122       blink::WebIDBDatabaseCallbacks* callback_state); | 
|  123   void UnregisterMojoOwnedDatabaseCallbacks( |  123   void UnregisterMojoOwnedDatabaseCallbacks( | 
|  124       blink::WebIDBDatabaseCallbacks* callback_state); |  124       blink::WebIDBDatabaseCallbacks* callback_state); | 
|  125  |  125  | 
|  126  private: |  126  private: | 
|  127   FRIEND_TEST_ALL_PREFIXES(IndexedDBDispatcherTest, CursorReset); |  127   FRIEND_TEST_ALL_PREFIXES(IndexedDBDispatcherTest, CursorReset); | 
|  128   FRIEND_TEST_ALL_PREFIXES(IndexedDBDispatcherTest, CursorTransactionId); |  128   FRIEND_TEST_ALL_PREFIXES(IndexedDBDispatcherTest, CursorTransactionId); | 
|  129  |  129  | 
|  130   static int32_t CurrentWorkerId() { return WorkerThread::GetCurrentId(); } |  130   static int32_t CurrentWorkerId() { return WorkerThread::GetCurrentId(); } | 
|  131  |  131  | 
|  132   template <typename T> |  | 
|  133   void init_params(T* params, blink::WebIDBCallbacks* callbacks_ptr) { |  | 
|  134     std::unique_ptr<blink::WebIDBCallbacks> callbacks(callbacks_ptr); |  | 
|  135     params->ipc_thread_id = CurrentWorkerId(); |  | 
|  136     params->ipc_callbacks_id = pending_callbacks_.Add(callbacks.release()); |  | 
|  137   } |  | 
|  138  |  | 
|  139   // IDBCallback message handlers. |  132   // IDBCallback message handlers. | 
|  140   void OnSuccessCursorContinue( |  133   void OnSuccessCursorContinue( | 
|  141       const IndexedDBMsg_CallbacksSuccessCursorContinue_Params& p); |  134       const IndexedDBMsg_CallbacksSuccessCursorContinue_Params& p); | 
|  142   void OnSuccessCursorPrefetch( |  135   void OnSuccessCursorPrefetch( | 
|  143       const IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params& p); |  136       const IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params& p); | 
|  144   void OnSuccessValue(const IndexedDBMsg_CallbacksSuccessValue_Params& p); |  137   void OnSuccessValue(const IndexedDBMsg_CallbacksSuccessValue_Params& p); | 
|  145   void OnSuccessInteger(int32_t ipc_thread_id, |  138   void OnSuccessInteger(int32_t ipc_thread_id, | 
|  146                         int32_t ipc_callbacks_id, |  139                         int32_t ipc_callbacks_id, | 
|  147                         int64_t value); |  140                         int64_t value); | 
|  148   void OnError(int32_t ipc_thread_id, |  141   void OnError(int32_t ipc_thread_id, | 
| (...skipping 27 matching lines...) Expand all  Loading... | 
|  176  |  169  | 
|  177   // Map from cursor id to WebIDBCursorImpl. |  170   // Map from cursor id to WebIDBCursorImpl. | 
|  178   std::map<int32_t, WebIDBCursorImpl*> cursors_; |  171   std::map<int32_t, WebIDBCursorImpl*> cursors_; | 
|  179  |  172  | 
|  180   DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); |  173   DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); | 
|  181 }; |  174 }; | 
|  182  |  175  | 
|  183 }  // namespace content |  176 }  // namespace content | 
|  184  |  177  | 
|  185 #endif  // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ |  178 #endif  // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ | 
| OLD | NEW |