Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: Source/modules/indexeddb/IDBCallbacks.h

Issue 14267029: Prepare to eliminate WebDOMStringList (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix names duplication in conversion Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 19 matching lines...) Expand all
30 #define IDBCallbacks_h 30 #define IDBCallbacks_h
31 31
32 #include "IDBDatabaseBackendInterface.h" 32 #include "IDBDatabaseBackendInterface.h"
33 #include "IDBDatabaseError.h" 33 #include "IDBDatabaseError.h"
34 #include "IDBKey.h" 34 #include "IDBKey.h"
35 #include "IDBKeyPath.h" 35 #include "IDBKeyPath.h"
36 #include "SharedBuffer.h" 36 #include "SharedBuffer.h"
37 #include <wtf/RefCounted.h> 37 #include <wtf/RefCounted.h>
38 38
39 namespace WebCore { 39 namespace WebCore {
40 class DOMStringList;
41 class IDBCursorBackendInterface; 40 class IDBCursorBackendInterface;
42 41
43 class IDBCallbacks : public RefCounted<IDBCallbacks> { 42 class IDBCallbacks : public RefCounted<IDBCallbacks> {
44 public: 43 public:
45 virtual ~IDBCallbacks() { } 44 virtual ~IDBCallbacks() { }
46 45
47 virtual void onError(PassRefPtr<IDBDatabaseError>) = 0; 46 virtual void onError(PassRefPtr<IDBDatabaseError>) = 0;
48 // From IDBFactory.webkitGetDatabaseNames() 47 // From IDBFactory.webkitGetDatabaseNames()
49 virtual void onSuccess(PassRefPtr<DOMStringList>) = 0; 48 virtual void onSuccess(const Vector<String>&) = 0;
50 // From IDBObjectStore/IDBIndex.openCursor(), IDBIndex.openKeyCursor() 49 // From IDBObjectStore/IDBIndex.openCursor(), IDBIndex.openKeyCursor()
51 virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>, PassRefPtr<IDB Key>, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SharedBuffer>) = 0; 50 virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>, PassRefPtr<IDB Key>, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SharedBuffer>) = 0;
52 // From IDBObjectStore.add()/put(), IDBIndex.getKey() 51 // From IDBObjectStore.add()/put(), IDBIndex.getKey()
53 virtual void onSuccess(PassRefPtr<IDBKey>) = 0; 52 virtual void onSuccess(PassRefPtr<IDBKey>) = 0;
54 // From IDBObjectStore/IDBIndex.get()/count(), and various methods that yiel d null/undefined. 53 // From IDBObjectStore/IDBIndex.get()/count(), and various methods that yiel d null/undefined.
55 virtual void onSuccess(PassRefPtr<SharedBuffer>) = 0; 54 virtual void onSuccess(PassRefPtr<SharedBuffer>) = 0;
56 // From IDBObjectStore/IDBIndex.get() (with key injection) 55 // From IDBObjectStore/IDBIndex.get() (with key injection)
57 virtual void onSuccess(PassRefPtr<SharedBuffer>, PassRefPtr<IDBKey>, const I DBKeyPath&) = 0; 56 virtual void onSuccess(PassRefPtr<SharedBuffer>, PassRefPtr<IDBKey>, const I DBKeyPath&) = 0;
58 // From IDBObjectStore/IDBIndex.count() 57 // From IDBObjectStore/IDBIndex.count()
59 virtual void onSuccess(int64_t value) = 0; 58 virtual void onSuccess(int64_t value) = 0;
60 59
61 // From IDBFactor.deleteDatabase(), IDBObjectStore/IDBIndex.get(), IDBObject Store.delete(), IDBObjectStore.clear() 60 // From IDBFactor.deleteDatabase(), IDBObjectStore/IDBIndex.get(), IDBObject Store.delete(), IDBObjectStore.clear()
62 virtual void onSuccess() = 0; 61 virtual void onSuccess() = 0;
63 62
64 // From IDBCursor.advance()/continue() 63 // From IDBCursor.advance()/continue()
65 virtual void onSuccess(PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, Pa ssRefPtr<SharedBuffer>) = 0; 64 virtual void onSuccess(PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, Pa ssRefPtr<SharedBuffer>) = 0;
66 // From IDBCursor.advance()/continue() 65 // From IDBCursor.advance()/continue()
67 virtual void onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >& keys, cons t Vector<RefPtr<IDBKey> >& primaryKeys, const Vector<RefPtr<SharedBuffer> >& val ues) = 0; 66 virtual void onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >& keys, cons t Vector<RefPtr<IDBKey> >& primaryKeys, const Vector<RefPtr<SharedBuffer> >& val ues) = 0;
68 // From IDBFactory.open()/deleteDatabase() 67 // From IDBFactory.open()/deleteDatabase()
69 virtual void onBlocked(int64_t /* existingVersion */) { ASSERT_NOT_REACHED() ; } 68 virtual void onBlocked(int64_t /* existingVersion */) { ASSERT_NOT_REACHED() ; }
70 // From IDBFactory.open() 69 // From IDBFactory.open()
71 virtual void onUpgradeNeeded(int64_t /* oldVersion */, PassRefPtr<IDBDatabas eBackendInterface>, const IDBDatabaseMetadata&) { ASSERT_NOT_REACHED(); } 70 virtual void onUpgradeNeeded(int64_t /* oldVersion */, PassRefPtr<IDBDatabas eBackendInterface>, const IDBDatabaseMetadata&) { ASSERT_NOT_REACHED(); }
72 virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>, const IDBDat abaseMetadata&) { ASSERT_NOT_REACHED(); } 71 virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>, const IDBDat abaseMetadata&) { ASSERT_NOT_REACHED(); }
73 }; 72 };
74 73
75 } // namespace WebCore 74 } // namespace WebCore
76 75
77 #endif // IDBCallbacks_h 76 #endif // IDBCallbacks_h
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/tests/IDBRequestTest.cpp ('k') | Source/modules/indexeddb/IDBFactoryBackendImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698