| 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 23 matching lines...) Expand all Loading... |
| 34 #include "modules/indexeddb/IDBKey.h" | 34 #include "modules/indexeddb/IDBKey.h" |
| 35 #include "modules/indexeddb/IDBKeyPath.h" | 35 #include "modules/indexeddb/IDBKeyPath.h" |
| 36 #include "public/platform/WebIDBCallbacks.h" | 36 #include "public/platform/WebIDBCallbacks.h" |
| 37 #include "wtf/RefCounted.h" | 37 #include "wtf/RefCounted.h" |
| 38 | 38 |
| 39 namespace WebCore { | 39 namespace WebCore { |
| 40 | 40 |
| 41 class DOMError; | 41 class DOMError; |
| 42 class IDBCursorBackendInterface; | 42 class IDBCursorBackendInterface; |
| 43 | 43 |
| 44 class IDBCallbacks : public RefCounted<IDBCallbacks> { | 44 class IDBCallbacks : public WTF::RefCountedBase { |
| 45 public: | 45 public: |
| 46 virtual ~IDBCallbacks() { } | 46 virtual ~IDBCallbacks() { } |
| 47 virtual void deref() = 0; |
| 48 |
| 47 | 49 |
| 48 virtual void onError(PassRefPtr<DOMError>) = 0; | 50 virtual void onError(PassRefPtr<DOMError>) = 0; |
| 49 // From IDBFactory.webkitGetDatabaseNames() | 51 // From IDBFactory.webkitGetDatabaseNames() |
| 50 virtual void onSuccess(const Vector<String>&) = 0; | 52 virtual void onSuccess(const Vector<String>&) = 0; |
| 51 // From IDBObjectStore/IDBIndex.openCursor(), IDBIndex.openKeyCursor() | 53 // From IDBObjectStore/IDBIndex.openCursor(), IDBIndex.openKeyCursor() |
| 52 virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>, PassRefPtr<IDB
Key>, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SharedBuffer>) = 0; | 54 virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>, PassRefPtr<IDB
Key>, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SharedBuffer>) = 0; |
| 53 // From IDBObjectStore.add()/put(), IDBIndex.getKey() | 55 // From IDBObjectStore.add()/put(), IDBIndex.getKey() |
| 54 virtual void onSuccess(PassRefPtr<IDBKey>) = 0; | 56 virtual void onSuccess(PassRefPtr<IDBKey>) = 0; |
| 55 // From IDBObjectStore/IDBIndex.get()/count(), and various methods that yiel
d null/undefined. | 57 // From IDBObjectStore/IDBIndex.get()/count(), and various methods that yiel
d null/undefined. |
| 56 virtual void onSuccess(PassRefPtr<SharedBuffer>) = 0; | 58 virtual void onSuccess(PassRefPtr<SharedBuffer>) = 0; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 67 // From IDBFactory.open()/deleteDatabase() | 69 // From IDBFactory.open()/deleteDatabase() |
| 68 virtual void onBlocked(int64_t /* existingVersion */) { ASSERT_NOT_REACHED()
; } | 70 virtual void onBlocked(int64_t /* existingVersion */) { ASSERT_NOT_REACHED()
; } |
| 69 // From IDBFactory.open() | 71 // From IDBFactory.open() |
| 70 virtual void onUpgradeNeeded(int64_t /* oldVersion */, PassRefPtr<IDBDatabas
eBackendInterface>, const IDBDatabaseMetadata&, WebKit::WebIDBCallbacks::DataLos
s dataLoss) { ASSERT_NOT_REACHED(); } | 72 virtual void onUpgradeNeeded(int64_t /* oldVersion */, PassRefPtr<IDBDatabas
eBackendInterface>, const IDBDatabaseMetadata&, WebKit::WebIDBCallbacks::DataLos
s dataLoss) { ASSERT_NOT_REACHED(); } |
| 71 virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>, const IDBDat
abaseMetadata&) { ASSERT_NOT_REACHED(); } | 73 virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>, const IDBDat
abaseMetadata&) { ASSERT_NOT_REACHED(); } |
| 72 }; | 74 }; |
| 73 | 75 |
| 74 } // namespace WebCore | 76 } // namespace WebCore |
| 75 | 77 |
| 76 #endif // IDBCallbacks_h | 78 #endif // IDBCallbacks_h |
| OLD | NEW |