| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 } | 77 } |
| 78 RTCDataChannel* channel = new RTCDataChannel(context, std::move(handler)); | 78 RTCDataChannel* channel = new RTCDataChannel(context, std::move(handler)); |
| 79 channel->suspendIfNeeded(); | 79 channel->suspendIfNeeded(); |
| 80 | 80 |
| 81 return channel; | 81 return channel; |
| 82 } | 82 } |
| 83 | 83 |
| 84 RTCDataChannel::RTCDataChannel( | 84 RTCDataChannel::RTCDataChannel( |
| 85 ExecutionContext* context, | 85 ExecutionContext* context, |
| 86 std::unique_ptr<WebRTCDataChannelHandler> handler) | 86 std::unique_ptr<WebRTCDataChannelHandler> handler) |
| 87 : ActiveScriptWrappable(this), | 87 : SuspendableObject(context), |
| 88 SuspendableObject(context), | |
| 89 m_handler(std::move(handler)), | 88 m_handler(std::move(handler)), |
| 90 m_readyState(ReadyStateConnecting), | 89 m_readyState(ReadyStateConnecting), |
| 91 m_binaryType(BinaryTypeArrayBuffer), | 90 m_binaryType(BinaryTypeArrayBuffer), |
| 92 m_scheduledEventTimer(this, &RTCDataChannel::scheduledEventTimerFired), | 91 m_scheduledEventTimer(this, &RTCDataChannel::scheduledEventTimerFired), |
| 93 m_bufferedAmountLowThreshold(0U), | 92 m_bufferedAmountLowThreshold(0U), |
| 94 m_stopped(false) { | 93 m_stopped(false) { |
| 95 m_handler->setClient(this); | 94 m_handler->setClient(this); |
| 96 } | 95 } |
| 97 | 96 |
| 98 RTCDataChannel::~RTCDataChannel() {} | 97 RTCDataChannel::~RTCDataChannel() {} |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 events.clear(); | 370 events.clear(); |
| 372 } | 371 } |
| 373 | 372 |
| 374 DEFINE_TRACE(RTCDataChannel) { | 373 DEFINE_TRACE(RTCDataChannel) { |
| 375 visitor->trace(m_scheduledEvents); | 374 visitor->trace(m_scheduledEvents); |
| 376 EventTargetWithInlineData::trace(visitor); | 375 EventTargetWithInlineData::trace(visitor); |
| 377 SuspendableObject::trace(visitor); | 376 SuspendableObject::trace(visitor); |
| 378 } | 377 } |
| 379 | 378 |
| 380 } // namespace blink | 379 } // namespace blink |
| OLD | NEW |