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 obsolete interfaces that use isActive. | |
58 virtual void didAddInputPort(const WebString& id, const WebString& manufactu
rer, const WebString& name, const WebString& version, bool isActive) override; | |
59 virtual void didAddOutputPort(const WebString& id, const WebString& manufact
urer, const WebString& name, const WebString& version, bool isActive) override; | |
60 virtual void didAddInputPort(const WebString& id, const WebString& manufactu
rer, const WebString& name, const WebString& version, MIDIPortState) override; | 57 virtual void didAddInputPort(const WebString& id, const WebString& manufactu
rer, const WebString& name, const WebString& version, MIDIPortState) override; |
61 virtual void didAddOutputPort(const WebString& id, const WebString& manufact
urer, const WebString& name, const WebString& version, MIDIPortState) override; | 58 virtual void didAddOutputPort(const WebString& id, const WebString& manufact
urer, const WebString& name, const WebString& version, MIDIPortState) override; |
62 // FIXME: Remove obsolete interfaces that use isActive. | |
63 virtual void didSetInputPortState(unsigned portIndex, bool isActive) overrid
e; | |
64 virtual void didSetOutputPortState(unsigned portIndex, bool isActive) overri
de; | |
65 virtual void didSetInputPortState(unsigned portIndex, MIDIPortState) overrid
e; | 59 virtual void didSetInputPortState(unsigned portIndex, MIDIPortState) overrid
e; |
66 virtual void didSetOutputPortState(unsigned portIndex, MIDIPortState) overri
de; | 60 virtual void didSetOutputPortState(unsigned portIndex, MIDIPortState) overri
de; |
67 virtual void didStartSession(bool success, const WebString& error, const Web
String& message) override; | 61 virtual void didStartSession(bool success, const WebString& error, const Web
String& message) override; |
68 virtual void didReceiveMIDIData(unsigned portIndex, const unsigned char* dat
a, size_t length, double timeStamp) override; | 62 virtual void didReceiveMIDIData(unsigned portIndex, const unsigned char* dat
a, size_t length, double timeStamp) override; |
69 | 63 |
70 private: | 64 private: |
71 explicit MIDIAccessor(MIDIAccessorClient*); | 65 explicit MIDIAccessor(MIDIAccessorClient*); |
72 | 66 |
73 MIDIAccessorClient* m_client; | 67 MIDIAccessorClient* m_client; |
74 OwnPtr<WebMIDIAccessor> m_accessor; | 68 OwnPtr<WebMIDIAccessor> m_accessor; |
75 }; | 69 }; |
76 | 70 |
77 } // namespace blink | 71 } // namespace blink |
78 | 72 |
79 #endif // MIDIAccessor_h | 73 #endif // MIDIAccessor_h |
OLD | NEW |