| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MIDIAccessInitializer_h | 5 #ifndef MIDIAccessInitializer_h |
| 6 #define MIDIAccessInitializer_h | 6 #define MIDIAccessInitializer_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 10 #include "modules/ModulesExport.h" | 10 #include "modules/ModulesExport.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 : id(id) | 33 : id(id) |
| 34 , manufacturer(manufacturer) | 34 , manufacturer(manufacturer) |
| 35 , name(name) | 35 , name(name) |
| 36 , type(type) | 36 , type(type) |
| 37 , version(version) | 37 , version(version) |
| 38 , state(state) { } | 38 , state(state) { } |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 static ScriptPromise start(ScriptState* scriptState, const MIDIOptions& opti
ons) | 41 static ScriptPromise start(ScriptState* scriptState, const MIDIOptions& opti
ons) |
| 42 { | 42 { |
| 43 RefPtrWillBeRawPtr<MIDIAccessInitializer> resolver = adoptRefWillBeNoop(
new MIDIAccessInitializer(scriptState, options)); | 43 MIDIAccessInitializer* resolver = new MIDIAccessInitializer(scriptState,
options); |
| 44 resolver->keepAliveWhilePending(); | 44 resolver->keepAliveWhilePending(); |
| 45 resolver->suspendIfNeeded(); | 45 resolver->suspendIfNeeded(); |
| 46 return resolver->start(); | 46 return resolver->start(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 ~MIDIAccessInitializer() override; | 49 ~MIDIAccessInitializer() override; |
| 50 | 50 |
| 51 // Eager finalization to allow dispose() operation access | 51 // Eager finalization to allow dispose() operation access |
| 52 // other (non eager) heap objects. | 52 // other (non eager) heap objects. |
| 53 EAGERLY_FINALIZE(); | 53 EAGERLY_FINALIZE(); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 75 OwnPtr<MIDIAccessor> m_accessor; | 75 OwnPtr<MIDIAccessor> m_accessor; |
| 76 Vector<PortDescriptor> m_portDescriptors; | 76 Vector<PortDescriptor> m_portDescriptors; |
| 77 bool m_requestSysex; | 77 bool m_requestSysex; |
| 78 bool m_hasBeenDisposed; | 78 bool m_hasBeenDisposed; |
| 79 bool m_sysexPermissionResolved; | 79 bool m_sysexPermissionResolved; |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace blink | 82 } // namespace blink |
| 83 | 83 |
| 84 #endif // MIDIAccessInitializer_h | 84 #endif // MIDIAccessInitializer_h |
| OLD | NEW |