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

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

Issue 2191533003: Refactor Timer classes in preparation for landing FrameTimers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More build fixes Created 4 years, 4 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
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 void didDecreaseBufferedAmount(unsigned) override; 114 void didDecreaseBufferedAmount(unsigned) override;
115 void didReceiveStringData(const WebString&) override; 115 void didReceiveStringData(const WebString&) override;
116 void didReceiveRawData(const char*, size_t) override; 116 void didReceiveRawData(const char*, size_t) override;
117 void didDetectError() override; 117 void didDetectError() override;
118 118
119 private: 119 private:
120 RTCDataChannel(ExecutionContext*, std::unique_ptr<WebRTCDataChannelHandler>) ; 120 RTCDataChannel(ExecutionContext*, std::unique_ptr<WebRTCDataChannelHandler>) ;
121 void dispose(); 121 void dispose();
122 122
123 void scheduleDispatchEvent(Event*); 123 void scheduleDispatchEvent(Event*);
124 void scheduledEventTimerFired(Timer<RTCDataChannel>*); 124 void scheduledEventTimerFired(TimerBase*);
125 125
126 std::unique_ptr<WebRTCDataChannelHandler> m_handler; 126 std::unique_ptr<WebRTCDataChannelHandler> m_handler;
127 127
128 WebRTCDataChannelHandlerClient::ReadyState m_readyState; 128 WebRTCDataChannelHandlerClient::ReadyState m_readyState;
129 129
130 enum BinaryType { 130 enum BinaryType {
131 BinaryTypeBlob, 131 BinaryTypeBlob,
132 BinaryTypeArrayBuffer 132 BinaryTypeArrayBuffer
133 }; 133 };
134 BinaryType m_binaryType; 134 BinaryType m_binaryType;
135 135
136 Timer<RTCDataChannel> m_scheduledEventTimer; 136 Timer<RTCDataChannel> m_scheduledEventTimer;
137 HeapVector<Member<Event>> m_scheduledEvents; 137 HeapVector<Member<Event>> m_scheduledEvents;
138 138
139 unsigned m_bufferedAmountLowThreshold; 139 unsigned m_bufferedAmountLowThreshold;
140 140
141 bool m_stopped; 141 bool m_stopped;
142 142
143 FRIEND_TEST_ALL_PREFIXES(RTCDataChannelTest, BufferedAmountLow); 143 FRIEND_TEST_ALL_PREFIXES(RTCDataChannelTest, BufferedAmountLow);
144 }; 144 };
145 145
146 } // namespace blink 146 } // namespace blink
147 147
148 #endif // RTCDataChannel_h 148 #endif // RTCDataChannel_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698