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" |
11 #include "modules/webmidi/MIDIAccessor.h" | 11 #include "modules/webmidi/MIDIAccessor.h" |
12 #include "modules/webmidi/MIDIAccessorClient.h" | 12 #include "modules/webmidi/MIDIAccessorClient.h" |
13 #include "modules/webmidi/MIDIPort.h" | 13 #include "modules/webmidi/MIDIPort.h" |
14 #include "wtf/OwnPtr.h" | 14 #include "wtf/OwnPtr.h" |
15 #include "wtf/Vector.h" | 15 #include "wtf/Vector.h" |
16 | 16 |
17 namespace blink { | 17 namespace blink { |
18 | 18 |
19 class MIDIOptions; | 19 class MIDIOptions; |
20 class ScriptState; | 20 class ScriptState; |
21 | 21 |
22 class MODULES_EXPORT MIDIAccessInitializer : public ScriptPromiseResolver, publi
c MIDIAccessorClient { | 22 class MODULES_EXPORT MIDIAccessInitializer : public ScriptPromiseResolver, publi
c MIDIAccessorClient { |
23 public: | 23 public: |
24 struct PortDescriptor { | 24 struct PortDescriptor { |
| 25 ALLOW_ONLY_INLINE_ALLOCATION(); |
25 String id; | 26 String id; |
26 String manufacturer; | 27 String manufacturer; |
27 String name; | 28 String name; |
28 MIDIPort::TypeCode type; | 29 MIDIPort::TypeCode type; |
29 String version; | 30 String version; |
30 MIDIAccessor::MIDIPortState state; | 31 MIDIAccessor::MIDIPortState state; |
31 | 32 |
32 PortDescriptor(const String& id, const String& manufacturer, const Strin
g& name, MIDIPort::TypeCode type, const String& version, MIDIAccessor::MIDIPortS
tate state) | 33 PortDescriptor(const String& id, const String& manufacturer, const Strin
g& name, MIDIPort::TypeCode type, const String& version, MIDIAccessor::MIDIPortS
tate state) |
33 : id(id) | 34 : id(id) |
34 , manufacturer(manufacturer) | 35 , manufacturer(manufacturer) |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 OwnPtr<MIDIAccessor> m_accessor; | 76 OwnPtr<MIDIAccessor> m_accessor; |
76 Vector<PortDescriptor> m_portDescriptors; | 77 Vector<PortDescriptor> m_portDescriptors; |
77 bool m_requestSysex; | 78 bool m_requestSysex; |
78 bool m_hasBeenDisposed; | 79 bool m_hasBeenDisposed; |
79 bool m_sysexPermissionResolved; | 80 bool m_sysexPermissionResolved; |
80 }; | 81 }; |
81 | 82 |
82 } // namespace blink | 83 } // namespace blink |
83 | 84 |
84 #endif // MIDIAccessInitializer_h | 85 #endif // MIDIAccessInitializer_h |
OLD | NEW |