summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/public/WebIDBCallbacks.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium/public/WebIDBCallbacks.h')
-rw-r--r--WebKit/chromium/public/WebIDBCallbacks.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/WebKit/chromium/public/WebIDBCallbacks.h b/WebKit/chromium/public/WebIDBCallbacks.h
index 9e85aa8..610f7d4 100644
--- a/WebKit/chromium/public/WebIDBCallbacks.h
+++ b/WebKit/chromium/public/WebIDBCallbacks.h
@@ -33,22 +33,19 @@
namespace WebKit {
+class WebIDBDatabase;
class WebIDBDatabaseError;
+class WebSerializedScriptValue;
-// Every IndexedDB method takes in a pair of callbacks for error/success which
-// implement this class. Either 0 or 1 of these methods will be called and the
-// callback class may be deleted any time after the callback is called.
-template <typename ResultType>
class WebIDBCallbacks {
public:
virtual ~WebIDBCallbacks() { }
- // If the method was a success, this method is called with the result. The
- // result is a pointer that the callback takes ownership of.
- virtual void onSuccess(ResultType*) = 0;
-
- // Called in the event of an error.
+ // For classes that follow the PImpl pattern, pass a const reference.
+ // For the rest, pass ownership to the callee via a pointer.
virtual void onError(const WebIDBDatabaseError&) = 0;
+ virtual void onSuccess(WebIDBDatabase*) = 0;
+ virtual void onSuccess(const WebSerializedScriptValue&) = 0;
};
} // namespace WebKit