Index: Source/modules/webmidi/NavigatorWebMIDI.h |
diff --git a/Source/modules/webmidi/NavigatorWebMIDI.h b/Source/modules/webmidi/NavigatorWebMIDI.h |
index 1b6e73bc191e3f42a7251e55eeb4f67b4341c3e9..6941f6a54496e234ca54e01c94da2cfd9fcd15cc 100644 |
--- a/Source/modules/webmidi/NavigatorWebMIDI.h |
+++ b/Source/modules/webmidi/NavigatorWebMIDI.h |
@@ -31,26 +31,36 @@ |
#ifndef NavigatorWebMIDI_h |
#define NavigatorWebMIDI_h |
+#include "bindings/v8/ScriptPromise.h" |
#include "core/frame/DOMWindowProperty.h" |
#include "modules/webmidi/MIDIOptions.h" |
#include "platform/Supplementable.h" |
+#include "wtf/HashSet.h" |
+#include "wtf/RefPtr.h" |
namespace WebCore { |
-class MIDIAccessPromise; |
+class ExecutionContext; |
+class Frame; |
class Navigator; |
+class MIDIAccess; |
class NavigatorWebMIDI : public Supplement<Navigator>, public DOMWindowProperty { |
public: |
virtual ~NavigatorWebMIDI(); |
static NavigatorWebMIDI* from(Navigator*); |
- static PassRefPtr<MIDIAccessPromise> requestMIDIAccess(Navigator*, const Dictionary&); |
- PassRefPtr<MIDIAccessPromise> requestMIDIAccess(const Dictionary&); |
+ static ScriptPromise requestMIDIAccess(Navigator*, const Dictionary&); |
+ ScriptPromise requestMIDIAccess(const Dictionary&); |
+ |
+ void registerPending(MIDIAccess*); |
+ void unregisterPending(MIDIAccess*); |
private: |
+ void clearPending(); |
NavigatorWebMIDI(Frame*); |
static const char* supplementName(); |
+ HashSet<RefPtr<MIDIAccess> > m_pending; |
}; |
} // namespace WebCore |