OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // In the usual case, they are set automatically and you don't have to | 64 // In the usual case, they are set automatically and you don't have to |
65 // pass it. | 65 // pass it. |
66 static PassRefPtrWillBeRawPtr<MainThreadWebSocketChannel> create(Document* d
ocument, WebSocketChannelClient* client, const String& sourceURL = String(), uns
igned lineNumber = 0) | 66 static PassRefPtrWillBeRawPtr<MainThreadWebSocketChannel> create(Document* d
ocument, WebSocketChannelClient* client, const String& sourceURL = String(), uns
igned lineNumber = 0) |
67 { | 67 { |
68 return adoptRefWillBeRefCountedGarbageCollected(new MainThreadWebSocketC
hannel(document, client, sourceURL, lineNumber)); | 68 return adoptRefWillBeRefCountedGarbageCollected(new MainThreadWebSocketC
hannel(document, client, sourceURL, lineNumber)); |
69 } | 69 } |
70 virtual ~MainThreadWebSocketChannel(); | 70 virtual ~MainThreadWebSocketChannel(); |
71 | 71 |
72 // WebSocketChannel functions. | 72 // WebSocketChannel functions. |
73 virtual bool connect(const KURL&, const String& protocol) OVERRIDE; | 73 virtual bool connect(const KURL&, const String& protocol) OVERRIDE; |
74 virtual String subprotocol() OVERRIDE; | |
75 virtual String extensions() OVERRIDE; | |
76 virtual WebSocketChannel::SendResult send(const String& message) OVERRIDE; | 74 virtual WebSocketChannel::SendResult send(const String& message) OVERRIDE; |
77 virtual WebSocketChannel::SendResult send(const ArrayBuffer&, unsigned byteO
ffset, unsigned byteLength) OVERRIDE; | 75 virtual WebSocketChannel::SendResult send(const ArrayBuffer&, unsigned byteO
ffset, unsigned byteLength) OVERRIDE; |
78 virtual WebSocketChannel::SendResult send(PassRefPtr<BlobDataHandle>) OVERRI
DE; | 76 virtual WebSocketChannel::SendResult send(PassRefPtr<BlobDataHandle>) OVERRI
DE; |
79 virtual WebSocketChannel::SendResult send(PassOwnPtr<Vector<char> > data) OV
ERRIDE; | 77 virtual WebSocketChannel::SendResult send(PassOwnPtr<Vector<char> > data) OV
ERRIDE; |
80 virtual unsigned long bufferedAmount() const OVERRIDE; | 78 virtual unsigned long bufferedAmount() const OVERRIDE; |
81 // Start closing handshake. Use the CloseEventCodeNotSpecified for the code | 79 // Start closing handshake. Use the CloseEventCodeNotSpecified for the code |
82 // argument to omit payload. | 80 // argument to omit payload. |
83 virtual void close(int code, const String& reason) OVERRIDE; | 81 virtual void close(int code, const String& reason) OVERRIDE; |
84 virtual void fail(const String& reason, MessageLevel, const String&, unsigne
d lineNumber) OVERRIDE; | 82 virtual void fail(const String& reason, MessageLevel, const String&, unsigne
d lineNumber) OVERRIDE; |
85 virtual void disconnect() OVERRIDE; | 83 virtual void disconnect() OVERRIDE; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 unsigned m_lineNumberAtConstruction; | 220 unsigned m_lineNumberAtConstruction; |
223 | 221 |
224 WebSocketPerMessageDeflate m_perMessageDeflate; | 222 WebSocketPerMessageDeflate m_perMessageDeflate; |
225 | 223 |
226 WebSocketDeflateFramer m_deflateFramer; | 224 WebSocketDeflateFramer m_deflateFramer; |
227 }; | 225 }; |
228 | 226 |
229 } // namespace WebCore | 227 } // namespace WebCore |
230 | 228 |
231 #endif // MainThreadWebSocketChannel_h | 229 #endif // MainThreadWebSocketChannel_h |
OLD | NEW |