| 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 26 matching lines...) Expand all Loading... |
| 37 #include <memory> | 37 #include <memory> |
| 38 | 38 |
| 39 using blink::WebString; | 39 using blink::WebString; |
| 40 using midi::mojom::PortState; | 40 using midi::mojom::PortState; |
| 41 using midi::mojom::Result; | 41 using midi::mojom::Result; |
| 42 | 42 |
| 43 namespace blink { | 43 namespace blink { |
| 44 | 44 |
| 45 // Factory method | 45 // Factory method |
| 46 std::unique_ptr<MIDIAccessor> MIDIAccessor::create(MIDIAccessorClient* client) { | 46 std::unique_ptr<MIDIAccessor> MIDIAccessor::create(MIDIAccessorClient* client) { |
| 47 return wrapUnique(new MIDIAccessor(client)); | 47 return WTF::wrapUnique(new MIDIAccessor(client)); |
| 48 } | 48 } |
| 49 | 49 |
| 50 MIDIAccessor::MIDIAccessor(MIDIAccessorClient* client) : m_client(client) { | 50 MIDIAccessor::MIDIAccessor(MIDIAccessorClient* client) : m_client(client) { |
| 51 DCHECK(client); | 51 DCHECK(client); |
| 52 | 52 |
| 53 m_accessor = wrapUnique(Platform::current()->createMIDIAccessor(this)); | 53 m_accessor = WTF::wrapUnique(Platform::current()->createMIDIAccessor(this)); |
| 54 | 54 |
| 55 DCHECK(m_accessor); | 55 DCHECK(m_accessor); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void MIDIAccessor::startSession() { | 58 void MIDIAccessor::startSession() { |
| 59 m_accessor->startSession(); | 59 m_accessor->startSession(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void MIDIAccessor::sendMIDIData(unsigned portIndex, | 62 void MIDIAccessor::sendMIDIData(unsigned portIndex, |
| 63 const unsigned char* data, | 63 const unsigned char* data, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 } | 95 } |
| 96 | 96 |
| 97 void MIDIAccessor::didReceiveMIDIData(unsigned portIndex, | 97 void MIDIAccessor::didReceiveMIDIData(unsigned portIndex, |
| 98 const unsigned char* data, | 98 const unsigned char* data, |
| 99 size_t length, | 99 size_t length, |
| 100 double timeStamp) { | 100 double timeStamp) { |
| 101 m_client->didReceiveMIDIData(portIndex, data, length, timeStamp); | 101 m_client->didReceiveMIDIData(portIndex, data, length, timeStamp); |
| 102 } | 102 } |
| 103 | 103 |
| 104 } // namespace blink | 104 } // namespace blink |
| OLD | NEW |