| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 156 |
| 157 void MIDIPort::stop() | 157 void MIDIPort::stop() |
| 158 { | 158 { |
| 159 // Should be "closed" to assume there are no pending activities. | 159 // Should be "closed" to assume there are no pending activities. |
| 160 m_connection = ConnectionStateClosed; | 160 m_connection = ConnectionStateClosed; |
| 161 } | 161 } |
| 162 | 162 |
| 163 DEFINE_TRACE(MIDIPort) | 163 DEFINE_TRACE(MIDIPort) |
| 164 { | 164 { |
| 165 visitor->trace(m_access); | 165 visitor->trace(m_access); |
| 166 RefCountedGarbageCollectedEventTargetWithInlineData<MIDIPort>::trace(visitor
); | 166 EventTargetWithInlineData::trace(visitor); |
| 167 ActiveDOMObject::trace(visitor); | 167 ActiveDOMObject::trace(visitor); |
| 168 } | 168 } |
| 169 | 169 |
| 170 void MIDIPort::open() | 170 void MIDIPort::open() |
| 171 { | 171 { |
| 172 switch (m_state) { | 172 switch (m_state) { |
| 173 case PortState::MIDIPortStateDisconnected: | 173 case PortState::MIDIPortStateDisconnected: |
| 174 setStates(m_state, ConnectionStatePending); | 174 setStates(m_state, ConnectionStatePending); |
| 175 break; | 175 break; |
| 176 case PortState::MIDIPortStateConnected: | 176 case PortState::MIDIPortStateConnected: |
| (...skipping 19 matching lines...) Expand all Loading... |
| 196 ASSERT(state != PortState::MIDIPortStateDisconnected || connection != Connec
tionStateOpen); | 196 ASSERT(state != PortState::MIDIPortStateDisconnected || connection != Connec
tionStateOpen); |
| 197 if (m_state == state && m_connection == connection) | 197 if (m_state == state && m_connection == connection) |
| 198 return; | 198 return; |
| 199 m_state = state; | 199 m_state = state; |
| 200 m_connection = connection; | 200 m_connection = connection; |
| 201 dispatchEvent(MIDIConnectionEvent::create(this)); | 201 dispatchEvent(MIDIConnectionEvent::create(this)); |
| 202 m_access->dispatchEvent(MIDIConnectionEvent::create(this)); | 202 m_access->dispatchEvent(MIDIConnectionEvent::create(this)); |
| 203 } | 203 } |
| 204 | 204 |
| 205 } // namespace blink | 205 } // namespace blink |
| OLD | NEW |