diff options
author | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-14 12:59:11 +0000 |
---|---|---|
committer | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-14 12:59:11 +0000 |
commit | 70c19a930beddde0e382777cb8799e7c8ebb1625 (patch) | |
tree | 887ab4d3962e19a5d114f205c0871ba2f9cf1e98 /chrome/browser/renderer_host | |
parent | 7d754b0c3f04087aad0931141cdbdfbf1a82ba41 (diff) | |
download | chromium_src-70c19a930beddde0e382777cb8799e7c8ebb1625.zip chromium_src-70c19a930beddde0e382777cb8799e7c8ebb1625.tar.gz chromium_src-70c19a930beddde0e382777cb8799e7c8ebb1625.tar.bz2 |
Implement IndexedDatabase::open up until re-entrance into WebKit. That (and the
rest of IndexedDB) will be done in subsequent patches. Included in this patch
is a lot of other infrastructure for making IndexedDB work. Included is a
conversion from the DOMStorageDispatcherHost into a dispatcher host for all APIs
that have a backend in WebKit.
I named it WebKitAPIDispatcherHost. Since it's in browser/in_process_webkit and
it is for APIs that connect up to the WebKit API and it's used for APIs whose
backend is implemented in WebKit I thought the name was decent and not _too_
confusing, but if you have better ideas, please let me know.
This includes some code that you've already reviewed (darin), but a lot has
changed so please take a look at all of it.
TEST=Not much to test yet + behind a flag.
BUG=none
Review URL: http://codereview.chromium.org/1599009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47268 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r-- | chrome/browser/renderer_host/resource_message_filter.cc | 11 | ||||
-rw-r--r-- | chrome/browser/renderer_host/resource_message_filter.h | 4 |
2 files changed, 13 insertions, 2 deletions
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index 6cb3362..d27ec21 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -26,6 +26,7 @@ #include "chrome/browser/gpu_process_host.h" #include "chrome/browser/host_zoom_map.h" #include "chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h" +#include "chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h" #include "chrome/browser/metrics/histogram_synchronizer.h" #include "chrome/browser/nacl_host/nacl_process_host.h" #include "chrome/browser/net/chrome_url_request_context.h" @@ -308,8 +309,9 @@ ResourceMessageFilter::ResourceMessageFilter( appcache_dispatcher_host_( new AppCacheDispatcherHost(profile->GetRequestContext())), ALLOW_THIS_IN_INITIALIZER_LIST(dom_storage_dispatcher_host_( - new DOMStorageDispatcherHost(this, profile->GetWebKitContext(), - resource_dispatcher_host->webkit_thread()))), + new DOMStorageDispatcherHost(this, profile->GetWebKitContext()))), + ALLOW_THIS_IN_INITIALIZER_LIST(indexed_db_dispatcher_host_( + new IndexedDBDispatcherHost(this, profile->GetWebKitContext()))), ALLOW_THIS_IN_INITIALIZER_LIST(db_dispatcher_host_( new DatabaseDispatcherHost(profile->GetDatabaseTracker(), this, profile->GetHostContentSettingsMap()))), @@ -340,6 +342,9 @@ ResourceMessageFilter::~ResourceMessageFilter() { // Tell the DOM Storage dispatcher host to stop sending messages via us. dom_storage_dispatcher_host_->Shutdown(); + // Tell the Indexed DB dispatcher host to stop sending messages via us. + indexed_db_dispatcher_host_->Shutdown(); + // Shut down the database dispatcher host. db_dispatcher_host_->Shutdown(); @@ -380,6 +385,7 @@ void ResourceMessageFilter::OnChannelConnected(int32 peer_pid) { WorkerService::GetInstance()->Initialize(resource_dispatcher_host_); appcache_dispatcher_host_->Initialize(this, id(), handle()); dom_storage_dispatcher_host_->Init(id(), handle()); + indexed_db_dispatcher_host_->Init(id(), handle()); db_dispatcher_host_->Init(handle()); } @@ -410,6 +416,7 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& msg) { resource_dispatcher_host_->OnMessageReceived(msg, this, &msg_is_ok) || appcache_dispatcher_host_->OnMessageReceived(msg, &msg_is_ok) || dom_storage_dispatcher_host_->OnMessageReceived(msg, &msg_is_ok) || + indexed_db_dispatcher_host_->OnMessageReceived(msg, &msg_is_ok) || audio_renderer_host_->OnMessageReceived(msg, &msg_is_ok) || db_dispatcher_host_->OnMessageReceived(msg, &msg_is_ok) || mp_dispatcher->OnMessageReceived( diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h index 88642cd..e3e9ef6 100644 --- a/chrome/browser/renderer_host/resource_message_filter.h +++ b/chrome/browser/renderer_host/resource_message_filter.h @@ -41,6 +41,7 @@ class DOMStorageDispatcherHost; class ExtensionMessageService; class GeolocationDispatcherHost; class HostZoomMap; +class IndexedDBDispatcherHost; class NotificationsPrefsCache; class Profile; class RenderWidgetHelper; @@ -403,6 +404,9 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, // Handles DOM Storage related messages. scoped_refptr<DOMStorageDispatcherHost> dom_storage_dispatcher_host_; + // Handles Indexed Database related messages. + scoped_refptr<IndexedDBDispatcherHost> indexed_db_dispatcher_host_; + // Handles HTML5 DB related messages scoped_refptr<DatabaseDispatcherHost> db_dispatcher_host_; |