| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |