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

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

Issue 10533057: IPC plumbing for IndexedDB to snapshot metadata to the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use IPC macros rather than introducing new classes Created 8 years, 6 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 | Annotate | Revision Log
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_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/id_map.h" 12 #include "base/id_map.h"
13 #include "content/public/browser/browser_message_filter.h" 13 #include "content/public/browser/browser_message_filter.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h"
15 15
16 class GURL; 16 class GURL;
17 class IndexedDBContextImpl; 17 class IndexedDBContextImpl;
18 struct IndexedDBDatabaseMetadata;
18 struct IndexedDBHostMsg_DatabaseCreateObjectStore_Params; 19 struct IndexedDBHostMsg_DatabaseCreateObjectStore_Params;
19 struct IndexedDBHostMsg_FactoryDeleteDatabase_Params; 20 struct IndexedDBHostMsg_FactoryDeleteDatabase_Params;
20 struct IndexedDBHostMsg_FactoryGetDatabaseNames_Params; 21 struct IndexedDBHostMsg_FactoryGetDatabaseNames_Params;
21 struct IndexedDBHostMsg_FactoryOpen_Params; 22 struct IndexedDBHostMsg_FactoryOpen_Params;
22 struct IndexedDBHostMsg_IndexCount_Params; 23 struct IndexedDBHostMsg_IndexCount_Params;
23 struct IndexedDBHostMsg_IndexOpenCursor_Params; 24 struct IndexedDBHostMsg_IndexOpenCursor_Params;
24 struct IndexedDBHostMsg_ObjectStoreCount_Params; 25 struct IndexedDBHostMsg_ObjectStoreCount_Params;
25 struct IndexedDBHostMsg_ObjectStoreCreateIndex_Params; 26 struct IndexedDBHostMsg_ObjectStoreCreateIndex_Params;
26 struct IndexedDBHostMsg_ObjectStoreOpenCursor_Params; 27 struct IndexedDBHostMsg_ObjectStoreOpenCursor_Params;
27 struct IndexedDBHostMsg_ObjectStorePut_Params; 28 struct IndexedDBHostMsg_ObjectStorePut_Params;
28 29
29 namespace WebKit { 30 namespace WebKit {
30 class WebDOMStringList; 31 class WebDOMStringList;
31 class WebIDBCursor; 32 class WebIDBCursor;
32 class WebIDBDatabase; 33 class WebIDBDatabase;
33 class WebIDBIndex; 34 class WebIDBIndex;
34 class WebIDBObjectStore; 35 class WebIDBObjectStore;
35 class WebIDBTransaction; 36 class WebIDBTransaction;
37 struct WebIDBDatabaseMetadata;
38 struct WebIDBIndexMetadata;
39 struct WebIDBObjectStoreMetadata;
36 } 40 }
37 41
38 namespace content { 42 namespace content {
39 class IndexedDBKey; 43 class IndexedDBKey;
40 class IndexedDBKeyPath; 44 class IndexedDBKeyPath;
41 class IndexedDBKeyRange; 45 class IndexedDBKeyRange;
42 class SerializedScriptValue; 46 class SerializedScriptValue;
43 } 47 }
44 48
45 // Handles all IndexedDB related messages from a particular renderer process. 49 // Handles all IndexedDB related messages from a particular renderer process.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 typedef std::map<int32, int64> WebIDBTransactionIDToSizeMap; 112 typedef std::map<int32, int64> WebIDBTransactionIDToSizeMap;
109 113
110 class DatabaseDispatcherHost { 114 class DatabaseDispatcherHost {
111 public: 115 public:
112 explicit DatabaseDispatcherHost(IndexedDBDispatcherHost* parent); 116 explicit DatabaseDispatcherHost(IndexedDBDispatcherHost* parent);
113 ~DatabaseDispatcherHost(); 117 ~DatabaseDispatcherHost();
114 118
115 bool OnMessageReceived(const IPC::Message& message, bool *msg_is_ok); 119 bool OnMessageReceived(const IPC::Message& message, bool *msg_is_ok);
116 void Send(IPC::Message* message); 120 void Send(IPC::Message* message);
117 121
122 void OnMetadata(int32 idb_database_id,
123 IndexedDBDatabaseMetadata* metadata);
118 void OnName(int32 idb_database_id, string16* name); 124 void OnName(int32 idb_database_id, string16* name);
119 void OnVersion(int32 idb_database_id, string16* version); 125 void OnVersion(int32 idb_database_id, string16* version);
120 void OnObjectStoreNames(int32 idb_database_id, 126 void OnObjectStoreNames(int32 idb_database_id,
121 std::vector<string16>* object_stores); 127 std::vector<string16>* object_stores);
122 void OnCreateObjectStore( 128 void OnCreateObjectStore(
123 const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params, 129 const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params,
124 int32* object_store_id, WebKit::WebExceptionCode* ec); 130 int32* object_store_id, WebKit::WebExceptionCode* ec);
125 void OnDeleteObjectStore(int32 idb_database_id, 131 void OnDeleteObjectStore(int32 idb_database_id,
126 const string16& name, 132 const string16& name,
127 int32 transaction_id, 133 int32 transaction_id,
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; 332 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_;
327 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; 333 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_;
328 334
329 // Used to dispatch messages to the correct view host. 335 // Used to dispatch messages to the correct view host.
330 int process_id_; 336 int process_id_;
331 337
332 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); 338 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost);
333 }; 339 };
334 340
335 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ 341 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698