| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 return channel; | 62 return channel; |
| 63 } | 63 } |
| 64 | 64 |
| 65 RTCDataChannel* RTCDataChannel::create( | 65 RTCDataChannel* RTCDataChannel::create( |
| 66 ExecutionContext* context, | 66 ExecutionContext* context, |
| 67 WebRTCPeerConnectionHandler* peerConnectionHandler, | 67 WebRTCPeerConnectionHandler* peerConnectionHandler, |
| 68 const String& label, | 68 const String& label, |
| 69 const WebRTCDataChannelInit& init, | 69 const WebRTCDataChannelInit& init, |
| 70 ExceptionState& exceptionState) { | 70 ExceptionState& exceptionState) { |
| 71 std::unique_ptr<WebRTCDataChannelHandler> handler = | 71 std::unique_ptr<WebRTCDataChannelHandler> handler = |
| 72 wrapUnique(peerConnectionHandler->createDataChannel(label, init)); | 72 WTF::wrapUnique(peerConnectionHandler->createDataChannel(label, init)); |
| 73 if (!handler) { | 73 if (!handler) { |
| 74 exceptionState.throwDOMException(NotSupportedError, | 74 exceptionState.throwDOMException(NotSupportedError, |
| 75 "RTCDataChannel is not supported"); | 75 "RTCDataChannel is not supported"); |
| 76 return nullptr; | 76 return nullptr; |
| 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 } |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 events.clear(); | 372 events.clear(); |
| 373 } | 373 } |
| 374 | 374 |
| 375 DEFINE_TRACE(RTCDataChannel) { | 375 DEFINE_TRACE(RTCDataChannel) { |
| 376 visitor->trace(m_scheduledEvents); | 376 visitor->trace(m_scheduledEvents); |
| 377 EventTargetWithInlineData::trace(visitor); | 377 EventTargetWithInlineData::trace(visitor); |
| 378 ActiveDOMObject::trace(visitor); | 378 ActiveDOMObject::trace(visitor); |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // namespace blink | 381 } // namespace blink |
| OLD | NEW |