Chromium Code Reviews| Index: Source/bindings/v8/MIDIAccessResolver.h |
| diff --git a/LICENSE b/Source/bindings/v8/MIDIAccessResolver.h |
| similarity index 63% |
| copy from LICENSE |
| copy to Source/bindings/v8/MIDIAccessResolver.h |
| index 70bcb8ad118978579fa055f7ecc99604930900ce..9cc62b2fda0cf5bac69922776d9aa0a641128a4f 100644 |
| --- a/LICENSE |
| +++ b/Source/bindings/v8/MIDIAccessResolver.h |
| @@ -28,3 +28,44 @@ |
| // 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. |
|
abarth-chromium
2014/03/20 00:43:46
Please use new-style copyright blocks:
http://dev
yhirano
2014/03/20 02:40:51
Done.
|
| + |
| +#ifndef MIDIAccessResolver_h |
| +#define MIDIAccessResolver_h |
| + |
| +#include "bindings/v8/ScriptPromiseResolver.h" |
| +#include "wtf/OwnPtr.h" |
| +#include "wtf/RefCounted.h" |
| + |
| +namespace v8 { |
| +class isolate; |
|
abarth-chromium
2014/03/20 00:43:46
This must not be needed because the class is named
yhirano
2014/03/20 02:40:51
Done.
|
| +} // namespace v8 |
| + |
| +namespace WebCore { |
| + |
| +class DOMError; |
| +class DOMWrapperWorld; |
| +class ExecutionContext; |
| +class MIDIAccess; |
| + |
| +class MIDIAccessResolver { |
| + WTF_MAKE_NONCOPYABLE(MIDIAccessResolver); |
| +public: |
| + static PassOwnPtr<MIDIAccessResolver> create(PassRefPtr<ScriptPromiseResolver> resolver, v8::Isolate* isolate) |
| + { |
| + return adoptPtr(new MIDIAccessResolver(resolver, isolate)); |
| + } |
| + ~MIDIAccessResolver(); |
| + |
| + void resolve(MIDIAccess*, ExecutionContext*); |
| + void reject(DOMError*, ExecutionContext*); |
| + |
| +private: |
| + MIDIAccessResolver(PassRefPtr<ScriptPromiseResolver>, v8::Isolate*); |
| + |
| + RefPtr<ScriptPromiseResolver> m_resolver; |
| + RefPtr<DOMWrapperWorld> m_world; |
|
abarth-chromium
2014/03/20 00:43:46
Is RefPtr<DOMWrapperWorld> allowed anymore? harak
yhirano
2014/03/20 02:40:51
Currently FrameLoader and ErrorEvent use RefPtr<DO
haraken
2014/03/20 04:37:16
RefPtr<DOMWrapperWorld> is ok here. Dan and I disc
|
| +}; |
| + |
| +} // namespace WebCore |
| + |
| +#endif // #ifndef MIDIAccessResolver_h |