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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 virtual ~MIDIAccessor() { } | 47 virtual ~MIDIAccessor() { } |
48 | 48 |
49 void startSession(); | 49 void startSession(); |
50 void sendMIDIData(unsigned portIndex, const unsigned char* data, size_t leng
th, double timeStamp); | 50 void sendMIDIData(unsigned portIndex, const unsigned char* data, size_t leng
th, double timeStamp); |
51 // MIDIAccessInitializer and MIDIAccess are both MIDIAccessClient. | 51 // MIDIAccessInitializer and MIDIAccess are both MIDIAccessClient. |
52 // MIDIAccessInitializer is the first client and MIDIAccess takes over it | 52 // MIDIAccessInitializer is the first client and MIDIAccess takes over it |
53 // once the initialization successfully finishes. | 53 // once the initialization successfully finishes. |
54 void setClient(MIDIAccessorClient* client) { m_client = client; } | 54 void setClient(MIDIAccessorClient* client) { m_client = client; } |
55 | 55 |
56 // WebMIDIAccessorClient | 56 // WebMIDIAccessorClient |
| 57 // FIXME: Remove deprecated interfaces that do not have |isActive| argument. |
57 virtual void didAddInputPort(const WebString& id, const WebString& manufactu
rer, const WebString& name, const WebString& version) override; | 58 virtual void didAddInputPort(const WebString& id, const WebString& manufactu
rer, const WebString& name, const WebString& version) override; |
58 virtual void didAddOutputPort(const WebString& id, const WebString& manufact
urer, const WebString& name, const WebString& version) override; | 59 virtual void didAddOutputPort(const WebString& id, const WebString& manufact
urer, const WebString& name, const WebString& version) override; |
| 60 virtual void didAddInputPort(const WebString& id, const WebString& manufactu
rer, const WebString& name, const WebString& version, bool isActive) override; |
| 61 virtual void didAddOutputPort(const WebString& id, const WebString& manufact
urer, const WebString& name, const WebString& version, bool isActive) override; |
| 62 virtual void didSetInputPortState(unsigned portIndex, bool isActive) overrid
e; |
| 63 virtual void didSetOutputPortState(unsigned portIndex, bool isActive) overri
de; |
59 virtual void didStartSession(bool success, const WebString& error, const Web
String& message) override; | 64 virtual void didStartSession(bool success, const WebString& error, const Web
String& message) override; |
60 virtual void didReceiveMIDIData(unsigned portIndex, const unsigned char* dat
a, size_t length, double timeStamp) override; | 65 virtual void didReceiveMIDIData(unsigned portIndex, const unsigned char* dat
a, size_t length, double timeStamp) override; |
61 | 66 |
62 private: | 67 private: |
63 explicit MIDIAccessor(MIDIAccessorClient*); | 68 explicit MIDIAccessor(MIDIAccessorClient*); |
64 | 69 |
65 MIDIAccessorClient* m_client; | 70 MIDIAccessorClient* m_client; |
66 OwnPtr<WebMIDIAccessor> m_accessor; | 71 OwnPtr<WebMIDIAccessor> m_accessor; |
67 }; | 72 }; |
68 | 73 |
69 } // namespace blink | 74 } // namespace blink |
70 | 75 |
71 #endif // MIDIAccessor_h | 76 #endif // MIDIAccessor_h |
OLD | NEW |