| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |