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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 } | 162 } |
163 | 163 |
164 DEFINE_TRACE(MIDIPort) { | 164 DEFINE_TRACE(MIDIPort) { |
165 visitor->trace(m_access); | 165 visitor->trace(m_access); |
166 EventTargetWithInlineData::trace(visitor); | 166 EventTargetWithInlineData::trace(visitor); |
167 ActiveDOMObject::trace(visitor); | 167 ActiveDOMObject::trace(visitor); |
168 } | 168 } |
169 | 169 |
170 DEFINE_TRACE_WRAPPERS(MIDIPort) { | 170 DEFINE_TRACE_WRAPPERS(MIDIPort) { |
171 visitor->traceWrappers(m_access); | 171 visitor->traceWrappers(m_access); |
| 172 EventTargetWithInlineData::traceWrappers(visitor); |
172 } | 173 } |
173 | 174 |
174 void MIDIPort::open() { | 175 void MIDIPort::open() { |
175 switch (m_state) { | 176 switch (m_state) { |
176 case PortState::DISCONNECTED: | 177 case PortState::DISCONNECTED: |
177 setStates(m_state, ConnectionStatePending); | 178 setStates(m_state, ConnectionStatePending); |
178 break; | 179 break; |
179 case PortState::CONNECTED: | 180 case PortState::CONNECTED: |
180 // TODO(toyoshim): Add blink API to perform a real open and close | 181 // TODO(toyoshim): Add blink API to perform a real open and close |
181 // operation. | 182 // operation. |
(...skipping 22 matching lines...) Expand all Loading... |
204 DCHECK(state != PortState::DISCONNECTED || connection != ConnectionStateOpen); | 205 DCHECK(state != PortState::DISCONNECTED || connection != ConnectionStateOpen); |
205 if (m_state == state && m_connection == connection) | 206 if (m_state == state && m_connection == connection) |
206 return; | 207 return; |
207 m_state = state; | 208 m_state = state; |
208 m_connection = connection; | 209 m_connection = connection; |
209 dispatchEvent(MIDIConnectionEvent::create(this)); | 210 dispatchEvent(MIDIConnectionEvent::create(this)); |
210 m_access->dispatchEvent(MIDIConnectionEvent::create(this)); | 211 m_access->dispatchEvent(MIDIConnectionEvent::create(this)); |
211 } | 212 } |
212 | 213 |
213 } // namespace blink | 214 } // namespace blink |
OLD | NEW |