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

Unified Diff: Source/bindings/v8/custom/V8PromiseCustom.h

Issue 17505004: Introduce Promises. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/v8/custom/V8PromiseCustom.h
diff --git a/Source/modules/webaudio/OfflineAudioContext.h b/Source/bindings/v8/custom/V8PromiseCustom.h
similarity index 71%
copy from Source/modules/webaudio/OfflineAudioContext.h
copy to Source/bindings/v8/custom/V8PromiseCustom.h
index d8604e15b15237738eaa6bb0d83e824f5bbb0f4b..fb9db9041d9a02378d42b7e7483cff290ca109cc 100644
--- a/Source/modules/webaudio/OfflineAudioContext.h
+++ b/Source/bindings/v8/custom/V8PromiseCustom.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012, 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,23 +22,30 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef OfflineAudioContext_h
-#define OfflineAudioContext_h
+#ifndef V8PromiseCustom_h
+#define V8PromiseCustom_h
-#include "modules/webaudio/AudioContext.h"
+#include <v8.h>
namespace WebCore {
-class OfflineAudioContext : public AudioContext {
+class V8PromiseCustom {
public:
- static PassRefPtr<OfflineAudioContext> create(ScriptExecutionContext*, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate, ExceptionCode&);
-
- virtual ~OfflineAudioContext();
-
-private:
- OfflineAudioContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate);
+ enum AssociatedInformationInternalFieldIndex {
+ AssociatedStatusIndex,
+ AssociatedResultIndex,
+ AssociatedFulfillCallbackIndex,
+ AssociatedRejectCallbackIndex,
+ AssociatedInternalFieldCount, // This entry must always be at the bottom.
+ };
+
+ enum PromiseStatus {
+ Pending,
+ Fulfilled,
+ Rejected,
+ };
};
} // namespace WebCore
-#endif // OfflineAudioContext_h
+#endif // V8PromiseCustom_h

Powered by Google App Engine
This is Rietveld 408576698