Index: Source/bindings/v8/custom/V8PromiseCustom.h |
diff --git a/Source/modules/webaudio/AudioBufferCallback.h b/Source/bindings/v8/custom/V8PromiseCustom.h |
similarity index 71% |
copy from Source/modules/webaudio/AudioBufferCallback.h |
copy to Source/bindings/v8/custom/V8PromiseCustom.h |
index 8a6c8c606f72750447a9a033d5c8560fcddcbe31..47b64a45ee42e9367b979e579008b06193acb5ec 100644 |
--- a/Source/modules/webaudio/AudioBufferCallback.h |
+++ b/Source/bindings/v8/custom/V8PromiseCustom.h |
@@ -1,5 +1,5 @@ |
/* |
- * Copyright (C) 2011, Google Inc. All rights reserved. |
+ * Copyright (C) 2013, Google Inc. All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
@@ -22,25 +22,30 @@ |
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef AudioBufferCallback_h |
-#define AudioBufferCallback_h |
+#ifndef V8PromiseCustom_h |
+#define V8PromiseCustom_h |
-#if ENABLE(WEB_AUDIO) |
- |
-#include "wtf/RefCounted.h" |
+#include <v8.h> |
namespace WebCore { |
-class AudioBuffer; |
- |
-class AudioBufferCallback : public RefCounted<AudioBufferCallback> { |
+class V8PromiseCustom { |
public: |
- virtual ~AudioBufferCallback() { } |
- virtual bool handleEvent(AudioBuffer*) = 0; |
+ enum InternalFieldIndex { |
+ InternalStateIndex, |
+ InternalResultIndex, |
+ InternalFulfillCallbackIndex, |
+ InternalRejectCallbackIndex, |
+ InternalFieldCount, // This entry must always be at the bottom. |
+ }; |
+ |
+ enum PromiseStatus { |
+ Pending, |
+ Fulfilled, |
+ Rejected, |
+ }; |
}; |
-} // namespace |
- |
-#endif // ENABLE(WEB_AUDIO) |
+} // namespace WebCore |
-#endif // AudioBufferCallback_h |
+#endif // V8PromiseCustom_h |