| 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/webmidi/MIDIAccessor.h" | 10 #include "modules/webmidi/MIDIAccessor.h" |
| 11 #include "modules/webmidi/MIDIAccessorClient.h" | 11 #include "modules/webmidi/MIDIAccessorClient.h" |
| 12 #include "modules/webmidi/MIDIPort.h" | 12 #include "modules/webmidi/MIDIPort.h" |
| 13 #include "wtf/OwnPtr.h" | 13 #include "wtf/OwnPtr.h" |
| 14 #include "wtf/Vector.h" | 14 #include "wtf/Vector.h" |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 class MIDIOptions; | 18 class MIDIOptions; |
| 19 class ScriptState; | 19 class ScriptState; |
| 20 | 20 |
| 21 class MIDIAccessInitializer : public ScriptPromiseResolver, public MIDIAccessorC
lient { | 21 class MIDIAccessInitializer : public ScriptPromiseResolver, public MIDIAccessorC
lient { |
| 22 #if ENABLE(OILPAN) | 22 WILL_BE_USING_PRE_FINALIZER(MIDIAccessInitializer, dispose); |
| 23 USING_PRE_FINALIZER(MIDIAccessInitializer, dispose); | |
| 24 #endif | |
| 25 public: | 23 public: |
| 26 struct PortDescriptor { | 24 struct PortDescriptor { |
| 27 String id; | 25 String id; |
| 28 String manufacturer; | 26 String manufacturer; |
| 29 String name; | 27 String name; |
| 30 MIDIPort::MIDIPortTypeCode type; | 28 MIDIPort::MIDIPortTypeCode type; |
| 31 String version; | 29 String version; |
| 32 bool isActive; | 30 bool isActive; |
| 33 | 31 |
| 34 PortDescriptor(const String& id, const String& manufacturer, const Strin
g& name, MIDIPort::MIDIPortTypeCode type, const String& version, bool isActive) | 32 PortDescriptor(const String& id, const String& manufacturer, const Strin
g& name, MIDIPort::MIDIPortTypeCode type, const String& version, bool isActive) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 ScriptPromise start(); | 66 ScriptPromise start(); |
| 69 void dispose(); | 67 void dispose(); |
| 70 | 68 |
| 71 OwnPtr<MIDIAccessor> m_accessor; | 69 OwnPtr<MIDIAccessor> m_accessor; |
| 72 Vector<PortDescriptor> m_portDescriptors; | 70 Vector<PortDescriptor> m_portDescriptors; |
| 73 bool m_requestSysex; | 71 bool m_requestSysex; |
| 74 }; | 72 }; |
| 75 | 73 |
| 76 } // namespace blink | 74 } // namespace blink |
| 77 | 75 |
| 78 | |
| 79 #endif // MIDIAccessInitializer_h | 76 #endif // MIDIAccessInitializer_h |
| OLD | NEW |