1563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark/* 22daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch * Copyright (C) 2011 Google Inc. All rights reserved. 3563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * 4563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * Redistribution and use in source and binary forms, with or without 5563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * modification, are permitted provided that the following conditions 6563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * are met: 7563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * 8563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * 1. Redistributions of source code must retain the above copyright 9563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * notice, this list of conditions and the following disclaimer. 10563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * 2. Redistributions in binary form must reproduce the above copyright 11563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * notice, this list of conditions and the following disclaimer in the 12563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * documentation and/or other materials provided with the distribution. 13563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of 14563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * its contributors may be used to endorse or promote products derived 15563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * from this software without specific prior written permission. 16563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * 17563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 18563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 21563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark */ 28563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 29db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block#ifndef WebIDBFactory_h 30db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block#define WebIDBFactory_h 31563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 32dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block#include "WebCommon.h" 33db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block#include "WebDOMStringList.h" 34dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block#include "WebIDBCallbacks.h" 35e78cbe89e6f337f2f1fe40315be88f742b547151Steve Block#include "WebSecurityOrigin.h" 36e78cbe89e6f337f2f1fe40315be88f742b547151Steve Block#include "WebString.h" 37e8b154fd68f9b33be40a3590e58347f353835f5cSteve Block#include "WebVector.h" 38563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 39dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Blocknamespace WebKit { 40d0825bca7fe65beaee391d30da42e937db621564Steve Block 41dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Blockclass WebFrame; 42dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Blockclass WebIDBDatabase; 43e78cbe89e6f337f2f1fe40315be88f742b547151Steve Blockclass WebSecurityOrigin; 44d0825bca7fe65beaee391d30da42e937db621564Steve Block 45db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block// The entry point into the IndexedDatabase API. These classes match their Foo and 46db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block// FooSync counterparts in the spec, but operate only in an async manner. 47dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block// http://dev.w3.org/2006/webapi/WebSimpleDB/ 48db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Blockclass WebIDBFactory { 49dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Blockpublic: 50db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block WEBKIT_API static WebIDBFactory* create(); 51d0825bca7fe65beaee391d30da42e937db621564Steve Block 52db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block virtual ~WebIDBFactory() { } 53d0825bca7fe65beaee391d30da42e937db621564Steve Block 542bde8e466a4451c7319e3a072d118917957d6554Steve Block enum BackingStoreType { 552bde8e466a4451c7319e3a072d118917957d6554Steve Block DefaultBackingStore, 562bde8e466a4451c7319e3a072d118917957d6554Steve Block LevelDBBackingStore 572bde8e466a4451c7319e3a072d118917957d6554Steve Block }; 582bde8e466a4451c7319e3a072d118917957d6554Steve Block 594576aa36e9a9671459299c7963ac95aa94beaea9Shimeng (Simon) Wang // The WebKit implementation of open ignores the WebFrame* parameter. 602daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch virtual void open(const WebString& name, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, const WebString& dataDir, unsigned long long maximumSize, BackingStoreType) { WEBKIT_ASSERT_NOT_REACHED(); } 612bde8e466a4451c7319e3a072d118917957d6554Steve Block 6281bc750723a18f21cd17d1b173cd2a4dda9cea6eBen Murdoch virtual void deleteDatabase(const WebString& name, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, const WebString& dataDir) { WEBKIT_ASSERT_NOT_REACHED(); } 63dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block}; 64d0825bca7fe65beaee391d30da42e937db621564Steve Block 65dcc8cf2e65d1aa555cce12431a16547e66b469eeSteve Block} // namespace WebKit 660bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch 67db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block#endif // WebIDBFactory_h 68