Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Side by Side Diff: third_party/WebKit/Source/modules/webmidi/MIDIAccess.h

Issue 2422163002: Web MIDI: use midi_service.mojom for media::midi::PortState (Closed)
Patch Set: gn --check fix Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef MIDIAccess_h 31 #ifndef MIDIAccess_h
32 #define MIDIAccess_h 32 #define MIDIAccess_h
33 33
34 #include "bindings/core/v8/ActiveScriptWrappable.h" 34 #include "bindings/core/v8/ActiveScriptWrappable.h"
35 #include "bindings/core/v8/ScriptPromise.h" 35 #include "bindings/core/v8/ScriptPromise.h"
36 #include "core/dom/ActiveDOMObject.h" 36 #include "core/dom/ActiveDOMObject.h"
37 #include "media/midi/midi_service.mojom-blink.h"
37 #include "modules/EventTargetModules.h" 38 #include "modules/EventTargetModules.h"
38 #include "modules/webmidi/MIDIAccessInitializer.h" 39 #include "modules/webmidi/MIDIAccessInitializer.h"
39 #include "modules/webmidi/MIDIAccessor.h" 40 #include "modules/webmidi/MIDIAccessor.h"
40 #include "modules/webmidi/MIDIAccessorClient.h" 41 #include "modules/webmidi/MIDIAccessorClient.h"
41 #include "platform/heap/Handle.h" 42 #include "platform/heap/Handle.h"
42 #include "wtf/Vector.h" 43 #include "wtf/Vector.h"
43 #include <memory> 44 #include <memory>
44 45
45 namespace blink { 46 namespace blink {
46 47
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 bool hasPendingActivity() const final; 92 bool hasPendingActivity() const final;
92 93
93 // ActiveDOMObject 94 // ActiveDOMObject
94 void contextDestroyed() override; 95 void contextDestroyed() override;
95 96
96 // MIDIAccessorClient 97 // MIDIAccessorClient
97 void didAddInputPort(const String& id, 98 void didAddInputPort(const String& id,
98 const String& manufacturer, 99 const String& manufacturer,
99 const String& name, 100 const String& name,
100 const String& version, 101 const String& version,
101 MIDIAccessor::MIDIPortState) override; 102 midi::mojom::PortState) override;
102 void didAddOutputPort(const String& id, 103 void didAddOutputPort(const String& id,
103 const String& manufacturer, 104 const String& manufacturer,
104 const String& name, 105 const String& name,
105 const String& version, 106 const String& version,
106 MIDIAccessor::MIDIPortState) override; 107 midi::mojom::PortState) override;
107 void didSetInputPortState(unsigned portIndex, 108 void didSetInputPortState(unsigned portIndex,
108 MIDIAccessor::MIDIPortState) override; 109 midi::mojom::PortState) override;
109 void didSetOutputPortState(unsigned portIndex, 110 void didSetOutputPortState(unsigned portIndex,
110 MIDIAccessor::MIDIPortState) override; 111 midi::mojom::PortState) override;
111 void didStartSession(midi::mojom::Result) override { 112 void didStartSession(midi::mojom::Result) override {
112 // This method is for MIDIAccess initialization: MIDIAccessInitializer 113 // This method is for MIDIAccess initialization: MIDIAccessInitializer
113 // has the implementation. 114 // has the implementation.
114 NOTREACHED(); 115 NOTREACHED();
115 } 116 }
116 void didReceiveMIDIData(unsigned portIndex, 117 void didReceiveMIDIData(unsigned portIndex,
117 const unsigned char* data, 118 const unsigned char* data,
118 size_t length, 119 size_t length,
119 double timeStamp) override; 120 double timeStamp) override;
120 121
(...skipping 19 matching lines...) Expand all
140 std::unique_ptr<MIDIAccessor> m_accessor; 141 std::unique_ptr<MIDIAccessor> m_accessor;
141 bool m_sysexEnabled; 142 bool m_sysexEnabled;
142 bool m_hasPendingActivity; 143 bool m_hasPendingActivity;
143 HeapVector<Member<MIDIInput>> m_inputs; 144 HeapVector<Member<MIDIInput>> m_inputs;
144 HeapVector<Member<MIDIOutput>> m_outputs; 145 HeapVector<Member<MIDIOutput>> m_outputs;
145 }; 146 };
146 147
147 } // namespace blink 148 } // namespace blink
148 149
149 #endif // MIDIAccess_h 150 #endif // MIDIAccess_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webmidi/DEPS ('k') | third_party/WebKit/Source/modules/webmidi/MIDIAccess.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698