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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 MIDIAccessor::MIDIAccessor(MIDIAccessorClient* client) | 49 MIDIAccessor::MIDIAccessor(MIDIAccessorClient* client) |
50 : m_client(client) | 50 : m_client(client) |
51 { | 51 { |
52 ASSERT(client); | 52 ASSERT(client); |
53 | 53 |
54 m_accessor = adoptPtr(WebKit::Platform::current()->createMIDIAccessor(this))
; | 54 m_accessor = adoptPtr(WebKit::Platform::current()->createMIDIAccessor(this))
; |
55 | 55 |
56 ASSERT(m_accessor); | 56 ASSERT(m_accessor); |
57 } | 57 } |
58 | 58 |
59 void MIDIAccessor::requestAccess(bool access) | 59 void MIDIAccessor::startSession() |
60 { | 60 { |
61 m_accessor->requestAccess(access); | 61 // FIXME: Use new API once embedder side implement the new API. |
| 62 m_accessor->requestAccess(false); |
62 } | 63 } |
63 | 64 |
64 void MIDIAccessor::sendMIDIData(unsigned portIndex, const unsigned char* data, s
ize_t length, double timeStamp) | 65 void MIDIAccessor::sendMIDIData(unsigned portIndex, const unsigned char* data, s
ize_t length, double timeStamp) |
65 { | 66 { |
66 m_accessor->sendMIDIData(portIndex, data, length, timeStamp); | 67 m_accessor->sendMIDIData(portIndex, data, length, timeStamp); |
67 } | 68 } |
68 | 69 |
69 void MIDIAccessor::didAddInputPort(const WebString& id, const WebString& manufac
turer, const WebString& name, const WebString& version) | 70 void MIDIAccessor::didAddInputPort(const WebString& id, const WebString& manufac
turer, const WebString& name, const WebString& version) |
70 { | 71 { |
71 m_client->didAddInputPort(id, manufacturer, name, version); | 72 m_client->didAddInputPort(id, manufacturer, name, version); |
72 } | 73 } |
73 | 74 |
74 void MIDIAccessor::didAddOutputPort(const WebString& id, const WebString& manufa
cturer, const WebString& name, const WebString& version) | 75 void MIDIAccessor::didAddOutputPort(const WebString& id, const WebString& manufa
cturer, const WebString& name, const WebString& version) |
75 { | 76 { |
76 m_client->didAddOutputPort(id, manufacturer, name, version); | 77 m_client->didAddOutputPort(id, manufacturer, name, version); |
77 } | 78 } |
78 | 79 |
| 80 void MIDIAccessor::didStartSession() |
| 81 { |
| 82 m_client->didStartSession(); |
| 83 } |
| 84 |
79 void MIDIAccessor::didAllowAccess() | 85 void MIDIAccessor::didAllowAccess() |
80 { | 86 { |
81 m_client->didAllowAccess(); | 87 m_client->didStartSession(); |
82 } | 88 } |
83 | 89 |
84 void MIDIAccessor::didBlockAccess() | 90 void MIDIAccessor::didBlockAccess() |
85 { | 91 { |
86 m_client->didBlockAccess(); | 92 m_client->didStartSession(); |
87 } | 93 } |
88 | 94 |
89 void MIDIAccessor::didReceiveMIDIData(unsigned portIndex, const unsigned char* d
ata, size_t length, double timeStamp) | 95 void MIDIAccessor::didReceiveMIDIData(unsigned portIndex, const unsigned char* d
ata, size_t length, double timeStamp) |
90 { | 96 { |
91 m_client->didReceiveMIDIData(portIndex, data, length, timeStamp); | 97 m_client->didReceiveMIDIData(portIndex, data, length, timeStamp); |
92 } | 98 } |
93 | 99 |
94 } // namespace WebCore | 100 } // namespace WebCore |
OLD | NEW |