| 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 21 matching lines...) Expand all Loading... |
| 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 WebCore { | 35 namespace WebCore { |
| 36 | 36 |
| 37 class IDBCallbacks; | 37 class IDBCallbacks; |
| 38 class IDBDatabase; | 38 class IDBDatabase; |
| 39 class IDBDatabaseCallbacks; | 39 class IDBDatabaseCallbacks; |
| 40 class ScriptExecutionContext; | 40 class ScriptExecutionContext; |
| 41 | 41 |
| 42 typedef int ExceptionCode; |
| 43 |
| 42 // This class is shared by IDBFactory (async) and IDBFactorySync (sync). | 44 // This class is shared by IDBFactory (async) and IDBFactorySync (sync). |
| 43 // This is implemented by IDBFactoryBackendImpl and optionally others (in order
to proxy | 45 // This is implemented by IDBFactoryBackendImpl and optionally others (in order
to proxy |
| 44 // calls across process barriers). All calls to these classes should be non-bloc
king and | 46 // calls across process barriers). All calls to these classes should be non-bloc
king and |
| 45 // trigger work on a background thread if necessary. | 47 // trigger work on a background thread if necessary. |
| 46 class IDBFactoryBackendInterface : public RefCounted<IDBFactoryBackendInterface>
{ | 48 class IDBFactoryBackendInterface : public RefCounted<IDBFactoryBackendInterface>
{ |
| 47 public: | 49 public: |
| 48 static PassRefPtr<IDBFactoryBackendInterface> create(); | 50 static PassRefPtr<IDBFactoryBackendInterface> create(); |
| 49 virtual ~IDBFactoryBackendInterface() { } | 51 virtual ~IDBFactoryBackendInterface() { } |
| 50 | 52 |
| 51 virtual void getDatabaseNames(PassRefPtr<IDBCallbacks>, const String& databa
seIdentifier, ScriptExecutionContext*) = 0; | 53 virtual void getDatabaseNames(PassRefPtr<IDBCallbacks>, const String& databa
seIdentifier, ScriptExecutionContext*) = 0; |
| 52 virtual void open(const String& name, int64_t version, int64_t transactionId
, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBDatabaseCallbacks>, const String& data
baseIdentifier, ScriptExecutionContext*) = 0; | 54 virtual void open(const String& name, int64_t version, int64_t transactionId
, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBDatabaseCallbacks>, const String& data
baseIdentifier, ScriptExecutionContext*) = 0; |
| 53 virtual void deleteDatabase(const String& name, PassRefPtr<IDBCallbacks>, co
nst String& databaseIdentifier, ScriptExecutionContext*) = 0; | 55 virtual void deleteDatabase(const String& name, PassRefPtr<IDBCallbacks>, co
nst String& databaseIdentifier, ScriptExecutionContext*) = 0; |
| 54 }; | 56 }; |
| 55 | 57 |
| 56 } // namespace WebCore | 58 } // namespace WebCore |
| 57 | 59 |
| 58 #endif // IDBFactoryBackendInterface_h | 60 #endif // IDBFactoryBackendInterface_h |
| OLD | NEW |