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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 { | 86 { |
87 // This method is for MIDIAccess initialization: MIDIAccessInitializer | 87 // This method is for MIDIAccess initialization: MIDIAccessInitializer |
88 // has the implementation. | 88 // has the implementation. |
89 ASSERT_NOT_REACHED(); | 89 ASSERT_NOT_REACHED(); |
90 } | 90 } |
91 void didReceiveMIDIData(unsigned portIndex, const unsigned char* data, size_
t length, double timeStamp) override; | 91 void didReceiveMIDIData(unsigned portIndex, const unsigned char* data, size_
t length, double timeStamp) override; |
92 | 92 |
93 // |timeStampInMilliseconds| is in the same time coordinate system as perfor
mance.now(). | 93 // |timeStampInMilliseconds| is in the same time coordinate system as perfor
mance.now(). |
94 void sendMIDIData(unsigned portIndex, const unsigned char* data, size_t leng
th, double timeStampInMilliseconds); | 94 void sendMIDIData(unsigned portIndex, const unsigned char* data, size_t leng
th, double timeStampInMilliseconds); |
95 | 95 |
| 96 // Eager finalization needed to promptly release m_accessor. Otherwise |
| 97 // its client back reference could end up being unsafely used during |
| 98 // the lazy sweeping phase. |
| 99 EAGERLY_FINALIZE(); |
96 DECLARE_VIRTUAL_TRACE(); | 100 DECLARE_VIRTUAL_TRACE(); |
97 | 101 |
98 private: | 102 private: |
99 MIDIAccess(PassOwnPtr<MIDIAccessor>, bool sysexEnabled, const Vector<MIDIAcc
essInitializer::PortDescriptor>&, ExecutionContext*); | 103 MIDIAccess(PassOwnPtr<MIDIAccessor>, bool sysexEnabled, const Vector<MIDIAcc
essInitializer::PortDescriptor>&, ExecutionContext*); |
100 | 104 |
101 OwnPtr<MIDIAccessor> m_accessor; | 105 OwnPtr<MIDIAccessor> m_accessor; |
102 bool m_sysexEnabled; | 106 bool m_sysexEnabled; |
103 bool m_hasPendingActivity; | 107 bool m_hasPendingActivity; |
104 HeapVector<Member<MIDIInput>> m_inputs; | 108 HeapVector<Member<MIDIInput>> m_inputs; |
105 HeapVector<Member<MIDIOutput>> m_outputs; | 109 HeapVector<Member<MIDIOutput>> m_outputs; |
106 }; | 110 }; |
107 | 111 |
108 } // namespace blink | 112 } // namespace blink |
109 | 113 |
110 #endif // MIDIAccess_h | 114 #endif // MIDIAccess_h |
OLD | NEW |