Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(785)

Side by Side Diff: content/browser/indexed_db/indexed_db_dispatcher_host.h

Issue 2125213002: [IndexedDB] Propogating changes to observers : Renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lifetime
Patch Set: Post cmumford review Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 20 matching lines...) Expand all
31 struct IndexedDBHostMsg_DatabaseCreateTransaction_Params; 31 struct IndexedDBHostMsg_DatabaseCreateTransaction_Params;
32 struct IndexedDBHostMsg_DatabaseDeleteRange_Params; 32 struct IndexedDBHostMsg_DatabaseDeleteRange_Params;
33 struct IndexedDBHostMsg_DatabaseGet_Params; 33 struct IndexedDBHostMsg_DatabaseGet_Params;
34 struct IndexedDBHostMsg_DatabaseGetAll_Params; 34 struct IndexedDBHostMsg_DatabaseGetAll_Params;
35 struct IndexedDBHostMsg_DatabaseOpenCursor_Params; 35 struct IndexedDBHostMsg_DatabaseOpenCursor_Params;
36 struct IndexedDBHostMsg_DatabasePut_Params; 36 struct IndexedDBHostMsg_DatabasePut_Params;
37 struct IndexedDBHostMsg_DatabaseSetIndexKeys_Params; 37 struct IndexedDBHostMsg_DatabaseSetIndexKeys_Params;
38 struct IndexedDBHostMsg_FactoryDeleteDatabase_Params; 38 struct IndexedDBHostMsg_FactoryDeleteDatabase_Params;
39 struct IndexedDBHostMsg_FactoryGetDatabaseNames_Params; 39 struct IndexedDBHostMsg_FactoryGetDatabaseNames_Params;
40 struct IndexedDBHostMsg_FactoryOpen_Params; 40 struct IndexedDBHostMsg_FactoryOpen_Params;
41 struct IndexedDBObservation;
42 struct IndexedDBObserverChanges;
41 43
42 namespace url { 44 namespace url {
43 class Origin; 45 class Origin;
44 } 46 }
45 47
46 namespace content { 48 namespace content {
47 class IndexedDBBlobInfo; 49 class IndexedDBBlobInfo;
48 class IndexedDBConnection; 50 class IndexedDBConnection;
49 class IndexedDBContextImpl; 51 class IndexedDBContextImpl;
50 class IndexedDBCursor; 52 class IndexedDBCursor;
51 class IndexedDBKey; 53 class IndexedDBKey;
52 class IndexedDBKeyPath; 54 class IndexedDBKeyPath;
53 class IndexedDBKeyRange; 55 class IndexedDBKeyRange;
56 class IndexedDBObservation;
57 class IndexedDBObserverChanges;
54 struct IndexedDBDatabaseMetadata; 58 struct IndexedDBDatabaseMetadata;
55 59
56 // Handles all IndexedDB related messages from a particular renderer process. 60 // Handles all IndexedDB related messages from a particular renderer process.
57 class IndexedDBDispatcherHost : public BrowserMessageFilter { 61 class IndexedDBDispatcherHost : public BrowserMessageFilter {
58 public: 62 public:
59 // Only call the constructor from the UI thread. 63 // Only call the constructor from the UI thread.
60 IndexedDBDispatcherHost(int ipc_process_id, 64 IndexedDBDispatcherHost(int ipc_process_id,
61 net::URLRequestContextGetter* request_context_getter, 65 net::URLRequestContextGetter* request_context_getter,
62 IndexedDBContextImpl* indexed_db_context, 66 IndexedDBContextImpl* indexed_db_context,
63 ChromeBlobStorageContext* blob_storage_context); 67 ChromeBlobStorageContext* blob_storage_context);
64 IndexedDBDispatcherHost(int ipc_process_id, 68 IndexedDBDispatcherHost(int ipc_process_id,
65 net::URLRequestContext* request_context, 69 net::URLRequestContext* request_context,
66 IndexedDBContextImpl* indexed_db_context, 70 IndexedDBContextImpl* indexed_db_context,
67 ChromeBlobStorageContext* blob_storage_context); 71 ChromeBlobStorageContext* blob_storage_context);
68 72
69 static ::IndexedDBDatabaseMetadata ConvertMetadata( 73 static ::IndexedDBDatabaseMetadata ConvertMetadata(
70 const content::IndexedDBDatabaseMetadata& metadata); 74 const content::IndexedDBDatabaseMetadata& metadata);
75 static ::IndexedDBObserverChanges ConvertObserverChanges(
76 content::IndexedDBObserverChanges* changes);
77 static ::IndexedDBObservation ConvertObservation(
78 std::unique_ptr<content::IndexedDBObservation> observation);
71 79
72 // BrowserMessageFilter implementation. 80 // BrowserMessageFilter implementation.
73 void OnChannelConnected(int32_t peer_pid) override; 81 void OnChannelConnected(int32_t peer_pid) override;
74 void OnChannelClosing() override; 82 void OnChannelClosing() override;
75 void OnDestruct() const override; 83 void OnDestruct() const override;
76 base::TaskRunner* OverrideTaskRunnerForMessage( 84 base::TaskRunner* OverrideTaskRunnerForMessage(
77 const IPC::Message& message) override; 85 const IPC::Message& message) override;
78 bool OnMessageReceived(const IPC::Message& message) override; 86 bool OnMessageReceived(const IPC::Message& message) override;
79 87
80 void FinishTransaction(int64_t host_transaction_id, bool committed); 88 void FinishTransaction(int64_t host_transaction_id, bool committed);
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 316
309 // Used to set file permissions for blob storage. 317 // Used to set file permissions for blob storage.
310 int ipc_process_id_; 318 int ipc_process_id_;
311 319
312 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); 320 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost);
313 }; 321 };
314 322
315 } // namespace content 323 } // namespace content
316 324
317 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_ 325 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698