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

Unified Diff: Source/core/dom/Future.idl

Issue 15786003: WIP don't review: Implement Future (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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/core/dom/Future.idl
diff --git a/Source/modules/webmidi/MIDIInput.idl b/Source/core/dom/Future.idl
similarity index 73%
copy from Source/modules/webmidi/MIDIInput.idl
copy to Source/core/dom/Future.idl
index 8c0ae3cd90aad230083403867cef594a190a0674..0222930ede8fa667431bca575efe8fe2004f4331 100644
--- a/Source/modules/webmidi/MIDIInput.idl
+++ b/Source/core/dom/Future.idl
@@ -29,9 +29,18 @@
*/
[
- NoInterfaceObject,
ActiveDOMObject,
- EventTarget
-] interface MIDIInput : MIDIPort {
- attribute EventListener onmidimessage;
+ CustomConstructor(FutureInit init)
+] interface Future {
+ static Future accept(any value);
+ static Future resolve(any value); // same as any(value)
+ static Future reject(any value);
+
+ static Future anyof(any... values); // exposed as "any" in JavaScript, without "_"
+ static Future every(any... values);
+ static Future some(any... values);
+
+ [Custom] Future then(AnyCallback acceptCallback, AnyCallback rejectCallback);
+ [Custom] Future catch(AnyCallback rejectCallback);
+ [Custom] void done(AnyCallback acceptCallback, AnyCallback rejectCallback);
};

Powered by Google App Engine
This is Rietveld 408576698