| Index: public/web/WebWorkerPermissionClientProxy.h
|
| diff --git a/public/web/WebScriptBindings.h b/public/web/WebWorkerPermissionClientProxy.h
|
| similarity index 67%
|
| copy from public/web/WebScriptBindings.h
|
| copy to public/web/WebWorkerPermissionClientProxy.h
|
| index 12b9d43003da2406336fe284ccc181d7847605fd..c68cd362b5e93ea994c10ff768feeaa812e9257a 100644
|
| --- a/public/web/WebScriptBindings.h
|
| +++ b/public/web/WebWorkerPermissionClientProxy.h
|
| @@ -28,32 +28,37 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef WebScriptBindings_h
|
| -#define WebScriptBindings_h
|
| -
|
| -#include "../platform/WebCommon.h"
|
| -
|
| -namespace v8 {
|
| -class Isolate;
|
| -class String;
|
| -template <class T> class Handle;
|
| -template <class T> class Local;
|
| -}
|
| +#ifndef WebWorkerPermissionClientProxy_h
|
| +#define WebWorkerPermissionClientProxy_h
|
|
|
| namespace WebKit {
|
|
|
| class WebString;
|
|
|
| -class WebScriptBindings {
|
| +// Proxy interface to talk to the document's PermissionClient implementation.
|
| +// This proxy is created by the embedder and is passed to the worker's
|
| +// WorkerGlobalScope in blink. Each allow method is called on the worker thread
|
| +// and may destructed on the worker thread.
|
| +class WebWorkerPermissionClientProxy {
|
| public:
|
| - // Efficiently converts a WebString to a v8::String. The caller must have
|
| - // a HandleScope to guard the result's lifetime.
|
| - BLINK_EXPORT static v8::Local<v8::String> toV8String(const WebString&, v8::Isolate*);
|
| + virtual ~WebWorkerPermissionClientProxy() { }
|
| +
|
| + virtual bool allowDatabase(const WebString& name, const WebString& displayName, unsigned long estimatedSize)
|
| + {
|
| + return true;
|
| + }
|
| +
|
| + virtual bool allowFileSystem()
|
| + {
|
| + return true;
|
| + }
|
|
|
| - // You can use v8::Value::toString() to get a v8::String, but remember to wrap that in a v8::TryCatch.
|
| - BLINK_EXPORT static WebString toWebString(v8::Handle<v8::String>);
|
| + virtual bool allowIndexedDB(const WebString& name)
|
| + {
|
| + return true;
|
| + }
|
| };
|
|
|
| } // namespace WebKit
|
|
|
| -#endif
|
| +#endif // WebWorkerPermissionClientProxy_h
|
|
|