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

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

Issue 7889024: Implementation of IDBFactory::getDatabaseNames (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Remove unnecessary #includes Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/id_map.h" 10 #include "base/id_map.h"
11 #include "content/browser/browser_message_filter.h" 11 #include "content/browser/browser_message_filter.h"
12 #include "content/browser/in_process_webkit/webkit_context.h" 12 #include "content/browser/in_process_webkit/webkit_context.h"
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h" 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h"
14 14
15 class IndexedDBKey; 15 class IndexedDBKey;
16 class NullableString16; 16 class NullableString16;
17 class SerializedScriptValue; 17 class SerializedScriptValue;
18 struct IndexedDBHostMsg_DatabaseCreateObjectStore_Params; 18 struct IndexedDBHostMsg_DatabaseCreateObjectStore_Params;
19 struct IndexedDBHostMsg_FactoryGetDatabaseNames_Params;
19 struct IndexedDBHostMsg_FactoryDeleteDatabase_Params; 20 struct IndexedDBHostMsg_FactoryDeleteDatabase_Params;
20 struct IndexedDBHostMsg_FactoryOpen_Params; 21 struct IndexedDBHostMsg_FactoryOpen_Params;
21 struct IndexedDBHostMsg_IndexOpenCursor_Params; 22 struct IndexedDBHostMsg_IndexOpenCursor_Params;
22 struct IndexedDBHostMsg_ObjectStoreCreateIndex_Params; 23 struct IndexedDBHostMsg_ObjectStoreCreateIndex_Params;
23 struct IndexedDBHostMsg_ObjectStoreOpenCursor_Params; 24 struct IndexedDBHostMsg_ObjectStoreOpenCursor_Params;
24 struct IndexedDBHostMsg_ObjectStorePut_Params; 25 struct IndexedDBHostMsg_ObjectStorePut_Params;
25 26
26 namespace WebKit { 27 namespace WebKit {
28 class WebDOMStringList;
27 class WebIDBCursor; 29 class WebIDBCursor;
28 class WebIDBDatabase; 30 class WebIDBDatabase;
29 class WebIDBIndex; 31 class WebIDBIndex;
30 class WebIDBObjectStore; 32 class WebIDBObjectStore;
31 class WebIDBTransaction; 33 class WebIDBTransaction;
32 } 34 }
33 35
34 // Handles all IndexedDB related messages from a particular renderer process. 36 // Handles all IndexedDB related messages from a particular renderer process.
35 class IndexedDBDispatcherHost : public BrowserMessageFilter { 37 class IndexedDBDispatcherHost : public BrowserMessageFilter {
36 public: 38 public:
(...skipping 14 matching lines...) Expand all
51 return webkit_context_->indexed_db_context(); 53 return webkit_context_->indexed_db_context();
52 } 54 }
53 55
54 // The various IndexedDBCallbacks children call these methods to add the 56 // The various IndexedDBCallbacks children call these methods to add the
55 // results into the applicable map. See below for more details. 57 // results into the applicable map. See below for more details.
56 int32 Add(WebKit::WebIDBCursor* idb_cursor); 58 int32 Add(WebKit::WebIDBCursor* idb_cursor);
57 int32 Add(WebKit::WebIDBDatabase* idb_database, const GURL& origin_url); 59 int32 Add(WebKit::WebIDBDatabase* idb_database, const GURL& origin_url);
58 int32 Add(WebKit::WebIDBIndex* idb_index); 60 int32 Add(WebKit::WebIDBIndex* idb_index);
59 int32 Add(WebKit::WebIDBObjectStore* idb_object_store); 61 int32 Add(WebKit::WebIDBObjectStore* idb_object_store);
60 int32 Add(WebKit::WebIDBTransaction* idb_transaction, const GURL& origin_url); 62 int32 Add(WebKit::WebIDBTransaction* idb_transaction, const GURL& origin_url);
63 int32 Add(WebKit::WebDOMStringList* domStringList);
61 64
62 private: 65 private:
63 virtual ~IndexedDBDispatcherHost(); 66 virtual ~IndexedDBDispatcherHost();
64 67
65 // Message processing. Most of the work is delegated to the dispatcher hosts 68 // Message processing. Most of the work is delegated to the dispatcher hosts
66 // below. 69 // below.
70 void OnIDBFactoryGetDatabaseNames(
71 const IndexedDBHostMsg_FactoryGetDatabaseNames_Params& p);
67 void OnIDBFactoryOpen(const IndexedDBHostMsg_FactoryOpen_Params& p); 72 void OnIDBFactoryOpen(const IndexedDBHostMsg_FactoryOpen_Params& p);
68 73
69 void OnIDBFactoryDeleteDatabase( 74 void OnIDBFactoryDeleteDatabase(
70 const IndexedDBHostMsg_FactoryDeleteDatabase_Params& p); 75 const IndexedDBHostMsg_FactoryDeleteDatabase_Params& p);
71 76
72 void ResetDispatcherHosts(); 77 void ResetDispatcherHosts();
73 78
74 // Helper templates. 79 // Helper templates.
75 template <class ReturnType> 80 template <class ReturnType>
76 ReturnType* GetOrTerminateProcess( 81 ReturnType* GetOrTerminateProcess(
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; 276 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_;
272 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; 277 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_;
273 278
274 // Used to dispatch messages to the correct view host. 279 // Used to dispatch messages to the correct view host.
275 int process_id_; 280 int process_id_;
276 281
277 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); 282 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost);
278 }; 283 };
279 284
280 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ 285 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698