Index: Source/bindings/v8/MIDIAccessResolver.h |
diff --git a/LICENSE b/Source/bindings/v8/MIDIAccessResolver.h |
similarity index 64% |
copy from LICENSE |
copy to Source/bindings/v8/MIDIAccessResolver.h |
index 70bcb8ad118978579fa055f7ecc99604930900ce..5eab117d45a6ecf2b4801c0d97346cf90b527e65 100644 |
--- a/LICENSE |
+++ b/Source/bindings/v8/MIDIAccessResolver.h |
@@ -28,3 +28,38 @@ |
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+ |
+#ifndef MIDIAccessResolver_h |
+#define MIDIAccessResolver_h |
+ |
+#include "bindings/v8/ScriptPromiseResolver.h" |
+#include "wtf/OwnPtr.h" |
+#include "wtf/RefCounted.h" |
+ |
+namespace WebCore { |
+ |
+class DOMError; |
+class DOMWrapperWorld; |
+class ExecutionContext; |
+class MIDIAccess; |
+ |
+class MIDIAccessResolver { |
+ WTF_MAKE_NONCOPYABLE(MIDIAccessResolver); |
+public: |
+ static PassOwnPtr<MIDIAccessResolver> create(PassRefPtr<ScriptPromiseResolver> resolver, ExecutionContext* executionContext) { return adoptPtr(new MIDIAccessResolver(resolver, executionContext)); } |
haraken
2014/02/26 11:30:39
Nit: Split into multiple lines.
yhirano
2014/03/04 17:52:59
Done.
|
+ ~MIDIAccessResolver(); |
+ |
+ void resolve(MIDIAccess*); |
haraken
2014/02/26 11:30:39
PassRefPtr<MIDIAccess> ?
yhirano
2014/03/04 17:52:59
No, to avoid modules/webmidi inclusion in MIDIAcce
|
+ void reject(PassRefPtr<DOMError>); |
+ |
+private: |
+ MIDIAccessResolver(PassRefPtr<ScriptPromiseResolver>, ExecutionContext*); |
+ |
+ RefPtr<ScriptPromiseResolver> m_resolver; |
+ ExecutionContext* m_executionContext; |
haraken
2014/02/26 11:30:39
Why do you need to store m_executionContext to MID
yhirano
2014/03/04 17:52:59
Done.
|
+ RefPtr<DOMWrapperWorld> m_world; |
+}; |
+ |
+} // namespace WebCore |
+ |
+#endif // #ifndef MIDIAccessResolver_h |