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

Side by Side Diff: third_party/WebKit/Source/modules/webmidi/MIDIInput.cpp

Issue 2422163002: Web MIDI: use midi_service.mojom for media::midi::PortState (Closed)
Patch Set: gn --check fix Created 4 years, 2 months 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 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #include "modules/webmidi/MIDIInput.h" 31 #include "modules/webmidi/MIDIInput.h"
32 32
33 #include "modules/webmidi/MIDIAccess.h" 33 #include "modules/webmidi/MIDIAccess.h"
34 #include "modules/webmidi/MIDIMessageEvent.h" 34 #include "modules/webmidi/MIDIMessageEvent.h"
35 #include "platform/heap/Handle.h" 35 #include "platform/heap/Handle.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 using PortState = MIDIAccessor::MIDIPortState; 39 using midi::mojom::PortState;
40 40
41 MIDIInput* MIDIInput::create(MIDIAccess* access, 41 MIDIInput* MIDIInput::create(MIDIAccess* access,
42 const String& id, 42 const String& id,
43 const String& manufacturer, 43 const String& manufacturer,
44 const String& name, 44 const String& name,
45 const String& version, 45 const String& version,
46 PortState state) { 46 PortState state) {
47 DCHECK(access); 47 DCHECK(access);
48 MIDIInput* input = 48 MIDIInput* input =
49 new MIDIInput(access, id, manufacturer, name, version, state); 49 new MIDIInput(access, id, manufacturer, name, version, state);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 return; 101 return;
102 DOMUint8Array* array = DOMUint8Array::create(data, length); 102 DOMUint8Array* array = DOMUint8Array::create(data, length);
103 dispatchEvent(MIDIMessageEvent::create(timeStamp, array)); 103 dispatchEvent(MIDIMessageEvent::create(timeStamp, array));
104 } 104 }
105 105
106 DEFINE_TRACE(MIDIInput) { 106 DEFINE_TRACE(MIDIInput) {
107 MIDIPort::trace(visitor); 107 MIDIPort::trace(visitor);
108 } 108 }
109 109
110 } // namespace blink 110 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webmidi/MIDIInput.h ('k') | third_party/WebKit/Source/modules/webmidi/MIDIOutput.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698