| 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 26 matching lines...) Expand all Loading... |
| 37 class WebRTCDataChannelHandler; | 37 class WebRTCDataChannelHandler; |
| 38 class WebRTCPeerConnectionHandler; | 38 class WebRTCPeerConnectionHandler; |
| 39 struct WebRTCDataChannelInit; | 39 struct WebRTCDataChannelInit; |
| 40 } | 40 } |
| 41 | 41 |
| 42 namespace WebCore { | 42 namespace WebCore { |
| 43 | 43 |
| 44 class Blob; | 44 class Blob; |
| 45 class ExceptionState; | 45 class ExceptionState; |
| 46 | 46 |
| 47 class RTCDataChannel FINAL : public RefCounted<RTCDataChannel>, public ScriptWra
ppable, public EventTargetWithInlineData, public blink::WebRTCDataChannelHandler
Client { | 47 class RTCDataChannel FINAL : public RefCountedWillBeRefCountedGarbageCollected<R
TCDataChannel>, public ScriptWrappable, public EventTargetWithInlineData, public
blink::WebRTCDataChannelHandlerClient { |
| 48 REFCOUNTED_EVENT_TARGET(RTCDataChannel); | 48 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<R
TCDataChannel>); |
| 49 public: | 49 public: |
| 50 static PassRefPtr<RTCDataChannel> create(ExecutionContext*, PassOwnPtr<blink
::WebRTCDataChannelHandler>); | 50 static PassRefPtrWillBeRawPtr<RTCDataChannel> create(ExecutionContext*, Pass
OwnPtr<blink::WebRTCDataChannelHandler>); |
| 51 static PassRefPtr<RTCDataChannel> create(ExecutionContext*, blink::WebRTCPee
rConnectionHandler*, const String& label, const blink::WebRTCDataChannelInit&, E
xceptionState&); | 51 static PassRefPtrWillBeRawPtr<RTCDataChannel> create(ExecutionContext*, blin
k::WebRTCPeerConnectionHandler*, const String& label, const blink::WebRTCDataCha
nnelInit&, ExceptionState&); |
| 52 virtual ~RTCDataChannel(); | 52 virtual ~RTCDataChannel(); |
| 53 | 53 |
| 54 String label() const; | 54 String label() const; |
| 55 | 55 |
| 56 // DEPRECATED | 56 // DEPRECATED |
| 57 bool reliable() const; | 57 bool reliable() const; |
| 58 | 58 |
| 59 bool ordered() const; | 59 bool ordered() const; |
| 60 unsigned short maxRetransmitTime() const; | 60 unsigned short maxRetransmitTime() const; |
| 61 unsigned short maxRetransmits() const; | 61 unsigned short maxRetransmits() const; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 75 | 75 |
| 76 void close(); | 76 void close(); |
| 77 | 77 |
| 78 DEFINE_ATTRIBUTE_EVENT_LISTENER(open); | 78 DEFINE_ATTRIBUTE_EVENT_LISTENER(open); |
| 79 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); | 79 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); |
| 80 DEFINE_ATTRIBUTE_EVENT_LISTENER(close); | 80 DEFINE_ATTRIBUTE_EVENT_LISTENER(close); |
| 81 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); | 81 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); |
| 82 | 82 |
| 83 void stop(); | 83 void stop(); |
| 84 | 84 |
| 85 void trace(Visitor*); |
| 86 |
| 85 // EventTarget | 87 // EventTarget |
| 86 virtual const AtomicString& interfaceName() const OVERRIDE; | 88 virtual const AtomicString& interfaceName() const OVERRIDE; |
| 87 virtual ExecutionContext* executionContext() const OVERRIDE; | 89 virtual ExecutionContext* executionContext() const OVERRIDE; |
| 88 | 90 |
| 89 private: | 91 private: |
| 90 RTCDataChannel(ExecutionContext*, PassOwnPtr<blink::WebRTCDataChannelHandler
>); | 92 RTCDataChannel(ExecutionContext*, PassOwnPtr<blink::WebRTCDataChannelHandler
>); |
| 91 | 93 |
| 92 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); | 94 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); |
| 93 void scheduledEventTimerFired(Timer<RTCDataChannel>*); | 95 void scheduledEventTimerFired(Timer<RTCDataChannel>*); |
| 94 | 96 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 106 | 108 |
| 107 blink::WebRTCDataChannelHandlerClient::ReadyState m_readyState; | 109 blink::WebRTCDataChannelHandlerClient::ReadyState m_readyState; |
| 108 | 110 |
| 109 enum BinaryType { | 111 enum BinaryType { |
| 110 BinaryTypeBlob, | 112 BinaryTypeBlob, |
| 111 BinaryTypeArrayBuffer | 113 BinaryTypeArrayBuffer |
| 112 }; | 114 }; |
| 113 BinaryType m_binaryType; | 115 BinaryType m_binaryType; |
| 114 | 116 |
| 115 Timer<RTCDataChannel> m_scheduledEventTimer; | 117 Timer<RTCDataChannel> m_scheduledEventTimer; |
| 116 WillBePersistentHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents; | 118 WillBeHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents; |
| 117 }; | 119 }; |
| 118 | 120 |
| 119 } // namespace WebCore | 121 } // namespace WebCore |
| 120 | 122 |
| 121 #endif // RTCDataChannel_h | 123 #endif // RTCDataChannel_h |
| OLD | NEW |