| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 */ | 27 */ |
| 28 #ifndef IDBFactoryBackendInterface_h | 28 #ifndef IDBFactoryBackendInterface_h |
| 29 #define IDBFactoryBackendInterface_h | 29 #define IDBFactoryBackendInterface_h |
| 30 | 30 |
| 31 #include "wtf/PassRefPtr.h" | 31 #include "wtf/PassRefPtr.h" |
| 32 #include "wtf/RefCounted.h" | 32 #include "wtf/RefCounted.h" |
| 33 #include "wtf/text/WTFString.h" | 33 #include "wtf/text/WTFString.h" |
| 34 | 34 |
| 35 namespace blink { class WebIDBDatabaseCallbacks; } | |
| 36 | |
| 37 namespace WebCore { | 35 namespace WebCore { |
| 38 | 36 |
| 39 class IDBRequest; | |
| 40 class IDBDatabase; | |
| 41 class IDBDatabaseCallbacks; | |
| 42 class ExecutionContext; | 37 class ExecutionContext; |
| 43 | 38 |
| 44 // This class is shared by IDBFactory (async) and IDBFactorySync (sync). | 39 // FIXME: This is just a permission client at this point. Rename/refactor. |
| 45 // This is implemented by IDBFactoryBackendImpl and optionally others (in order
to proxy | |
| 46 // calls across process barriers). All calls to these classes should be non-bloc
king and | |
| 47 // trigger work on a background thread if necessary. | |
| 48 class IDBFactoryBackendInterface : public RefCounted<IDBFactoryBackendInterface>
{ | 40 class IDBFactoryBackendInterface : public RefCounted<IDBFactoryBackendInterface>
{ |
| 49 public: | 41 public: |
| 50 static PassRefPtr<IDBFactoryBackendInterface> create(); | 42 static PassRefPtr<IDBFactoryBackendInterface> create(); |
| 51 virtual ~IDBFactoryBackendInterface() { } | 43 virtual ~IDBFactoryBackendInterface() { } |
| 52 | 44 |
| 53 virtual void getDatabaseNames(PassRefPtr<IDBRequest>, const String& database
Identifier, ExecutionContext*) = 0; | 45 virtual bool allowIndexedDB(WebCore::ExecutionContext*, const String& name)
= 0; |
| 54 virtual void open(const String& name, int64_t version, int64_t transactionId
, PassRefPtr<IDBRequest>, PassOwnPtr<blink::WebIDBDatabaseCallbacks>, const Stri
ng& databaseIdentifier, ExecutionContext*) = 0; | |
| 55 virtual void deleteDatabase(const String& name, PassRefPtr<IDBRequest>, cons
t String& databaseIdentifier, ExecutionContext*) = 0; | |
| 56 }; | 46 }; |
| 57 | 47 |
| 58 } // namespace WebCore | 48 } // namespace WebCore |
| 59 | 49 |
| 60 #endif // IDBFactoryBackendInterface_h | 50 #endif // IDBFactoryBackendInterface_h |
| OLD | NEW |