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 20 matching lines...) Expand all Loading... |
31 #include "core/platform/mediastream/RTCDataChannelHandlerClient.h" | 31 #include "core/platform/mediastream/RTCDataChannelHandlerClient.h" |
32 #include "wtf/RefCounted.h" | 32 #include "wtf/RefCounted.h" |
33 | 33 |
34 namespace WebKit { | 34 namespace WebKit { |
35 struct WebRTCDataChannelInit; | 35 struct WebRTCDataChannelInit; |
36 } | 36 } |
37 | 37 |
38 namespace WebCore { | 38 namespace WebCore { |
39 | 39 |
40 class Blob; | 40 class Blob; |
41 class ExceptionState; | |
42 class RTCDataChannelHandler; | 41 class RTCDataChannelHandler; |
43 class RTCPeerConnectionHandler; | 42 class RTCPeerConnectionHandler; |
44 | 43 |
45 class RTCDataChannel : public RefCounted<RTCDataChannel>, public ScriptWrappable
, public EventTarget, public RTCDataChannelHandlerClient { | 44 class RTCDataChannel : public RefCounted<RTCDataChannel>, public ScriptWrappable
, public EventTarget, public RTCDataChannelHandlerClient { |
46 public: | 45 public: |
47 static PassRefPtr<RTCDataChannel> create(ScriptExecutionContext*, PassOwnPtr
<RTCDataChannelHandler>); | 46 static PassRefPtr<RTCDataChannel> create(ScriptExecutionContext*, PassOwnPtr
<RTCDataChannelHandler>); |
48 static PassRefPtr<RTCDataChannel> create(ScriptExecutionContext*, RTCPeerCon
nectionHandler*, const String& label, const WebKit::WebRTCDataChannelInit&, Exce
ptionState&); | 47 static PassRefPtr<RTCDataChannel> create(ScriptExecutionContext*, RTCPeerCon
nectionHandler*, const String& label, const WebKit::WebRTCDataChannelInit&, Exce
ptionCode&); |
49 ~RTCDataChannel(); | 48 ~RTCDataChannel(); |
50 | 49 |
51 String label() const; | 50 String label() const; |
52 bool reliable() const; | 51 bool reliable() const; |
53 String readyState() const; | 52 String readyState() const; |
54 unsigned long bufferedAmount() const; | 53 unsigned long bufferedAmount() const; |
55 | 54 |
56 String binaryType() const; | 55 String binaryType() const; |
57 void setBinaryType(const String&, ExceptionState&); | 56 void setBinaryType(const String&, ExceptionCode&); |
58 | 57 |
59 void send(const String&, ExceptionState&); | 58 void send(const String&, ExceptionCode&); |
60 void send(PassRefPtr<ArrayBuffer>, ExceptionState&); | 59 void send(PassRefPtr<ArrayBuffer>, ExceptionCode&); |
61 void send(PassRefPtr<ArrayBufferView>, ExceptionState&); | 60 void send(PassRefPtr<ArrayBufferView>, ExceptionCode&); |
62 void send(PassRefPtr<Blob>, ExceptionState&); | 61 void send(PassRefPtr<Blob>, ExceptionCode&); |
63 | 62 |
64 void close(); | 63 void close(); |
65 | 64 |
66 DEFINE_ATTRIBUTE_EVENT_LISTENER(open); | 65 DEFINE_ATTRIBUTE_EVENT_LISTENER(open); |
67 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); | 66 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); |
68 DEFINE_ATTRIBUTE_EVENT_LISTENER(close); | 67 DEFINE_ATTRIBUTE_EVENT_LISTENER(close); |
69 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); | 68 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); |
70 | 69 |
71 void stop(); | 70 void stop(); |
72 | 71 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 }; | 107 }; |
109 BinaryType m_binaryType; | 108 BinaryType m_binaryType; |
110 | 109 |
111 Timer<RTCDataChannel> m_scheduledEventTimer; | 110 Timer<RTCDataChannel> m_scheduledEventTimer; |
112 Vector<RefPtr<Event> > m_scheduledEvents; | 111 Vector<RefPtr<Event> > m_scheduledEvents; |
113 }; | 112 }; |
114 | 113 |
115 } // namespace WebCore | 114 } // namespace WebCore |
116 | 115 |
117 #endif // RTCDataChannel_h | 116 #endif // RTCDataChannel_h |
OLD | NEW |