From 00a5ab6d8d6ac2deb35b7c843aab7497de029753 Mon Sep 17 00:00:00 2001 From: "jochen@chromium.org" Date: Mon, 10 May 2010 15:21:07 +0000 Subject: Stub implementation for allowDatabase callback for workers. BUG=40095 TEST=none Review URL: http://codereview.chromium.org/2002011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46815 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/worker/webworkerclient_proxy.h | 10 ++++++++++ webkit/tools/test_shell/test_web_worker.h | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/chrome/worker/webworkerclient_proxy.h b/chrome/worker/webworkerclient_proxy.h index d498895..4e25c7c 100644 --- a/chrome/worker/webworkerclient_proxy.h +++ b/chrome/worker/webworkerclient_proxy.h @@ -15,6 +15,7 @@ namespace WebKit { class WebApplicationCacheHost; class WebApplicationCacheHostClient; +class WebFrame; class WebWorker; } @@ -73,6 +74,15 @@ class WebWorkerClientProxy : public WebKit::WebWorkerClient { virtual WebKit::WebApplicationCacheHost* createApplicationCacheHost( WebKit::WebApplicationCacheHostClient* client); + virtual bool allowDatabase(WebKit::WebFrame* frame, + const WebKit::WebString& name, + const WebKit::WebString& display_name, + unsigned long estimated_size) { + // TODO(jochen): Check content settings whether access to web databases is + // allowed. + return true; + } + void EnsureWorkerContextTerminates(); private: diff --git a/webkit/tools/test_shell/test_web_worker.h b/webkit/tools/test_shell/test_web_worker.h index 7db70ac..ab378ee 100644 --- a/webkit/tools/test_shell/test_web_worker.h +++ b/webkit/tools/test_shell/test_web_worker.h @@ -14,6 +14,7 @@ namespace WebKit { class WebApplicationCacheHost; class WebApplicationCacheHostClient; +class WebFrame; class WebNotificationPresenter; class WebString; class WebURL; @@ -82,6 +83,12 @@ class TestWebWorker : public WebKit::WebWorker, WebKit::WebApplicationCacheHostClient*) { return NULL; } + virtual bool allowDatabase(WebKit::WebFrame* frame, + const WebKit::WebString& name, + const WebKit::WebString& display_name, + unsigned long estimated_size) { + return true; + } private: friend class base::RefCounted; -- cgit v1.1