Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.cpp

Issue 2647703002: Move RTCDataChannel timer to frame-specific TaskRunnerTimer. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 11 matching lines...) Expand all
22 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */ 23 */
24 24
25 #include "modules/peerconnection/RTCDataChannel.h" 25 #include "modules/peerconnection/RTCDataChannel.h"
26 26
27 #include "bindings/core/v8/ExceptionState.h" 27 #include "bindings/core/v8/ExceptionState.h"
28 #include "core/dom/DOMArrayBuffer.h" 28 #include "core/dom/DOMArrayBuffer.h"
29 #include "core/dom/DOMArrayBufferView.h" 29 #include "core/dom/DOMArrayBufferView.h"
30 #include "core/dom/ExceptionCode.h" 30 #include "core/dom/ExceptionCode.h"
31 #include "core/dom/ExecutionContext.h" 31 #include "core/dom/ExecutionContext.h"
32 #include "core/dom/TaskRunnerHelper.h"
32 #include "core/events/MessageEvent.h" 33 #include "core/events/MessageEvent.h"
33 #include "core/fileapi/Blob.h" 34 #include "core/fileapi/Blob.h"
34 #include "modules/peerconnection/RTCPeerConnection.h" 35 #include "modules/peerconnection/RTCPeerConnection.h"
35 #include "public/platform/WebRTCPeerConnectionHandler.h" 36 #include "public/platform/WebRTCPeerConnectionHandler.h"
36 #include "wtf/PtrUtil.h" 37 #include "wtf/PtrUtil.h"
37 #include <memory> 38 #include <memory>
38 39
39 namespace blink { 40 namespace blink {
40 41
41 static void throwNotOpenException(ExceptionState& exceptionState) { 42 static void throwNotOpenException(ExceptionState& exceptionState) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return channel; 82 return channel;
82 } 83 }
83 84
84 RTCDataChannel::RTCDataChannel( 85 RTCDataChannel::RTCDataChannel(
85 ExecutionContext* context, 86 ExecutionContext* context,
86 std::unique_ptr<WebRTCDataChannelHandler> handler) 87 std::unique_ptr<WebRTCDataChannelHandler> handler)
87 : SuspendableObject(context), 88 : SuspendableObject(context),
88 m_handler(std::move(handler)), 89 m_handler(std::move(handler)),
89 m_readyState(ReadyStateConnecting), 90 m_readyState(ReadyStateConnecting),
90 m_binaryType(BinaryTypeArrayBuffer), 91 m_binaryType(BinaryTypeArrayBuffer),
91 m_scheduledEventTimer(this, &RTCDataChannel::scheduledEventTimerFired), 92 m_scheduledEventTimer(
93 TaskRunnerHelper::get(TaskType::Networking, context),
94 this,
95 &RTCDataChannel::scheduledEventTimerFired),
92 m_bufferedAmountLowThreshold(0U), 96 m_bufferedAmountLowThreshold(0U),
93 m_stopped(false) { 97 m_stopped(false) {
94 m_handler->setClient(this); 98 m_handler->setClient(this);
95 } 99 }
96 100
97 RTCDataChannel::~RTCDataChannel() {} 101 RTCDataChannel::~RTCDataChannel() {}
98 102
99 void RTCDataChannel::dispose() { 103 void RTCDataChannel::dispose() {
100 if (m_stopped) 104 if (m_stopped)
101 return; 105 return;
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 events.clear(); 374 events.clear();
371 } 375 }
372 376
373 DEFINE_TRACE(RTCDataChannel) { 377 DEFINE_TRACE(RTCDataChannel) {
374 visitor->trace(m_scheduledEvents); 378 visitor->trace(m_scheduledEvents);
375 EventTargetWithInlineData::trace(visitor); 379 EventTargetWithInlineData::trace(visitor);
376 SuspendableObject::trace(visitor); 380 SuspendableObject::trace(visitor);
377 } 381 }
378 382
379 } // namespace blink 383 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698