| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // explicitly by passing the last parameter. | 70 // explicitly by passing the last parameter. |
| 71 // In the usual case, they are set automatically and you don't have to | 71 // In the usual case, they are set automatically and you don't have to |
| 72 // pass it. | 72 // pass it. |
| 73 static PassRefPtr<NewWebSocketChannelImpl> create(ExecutionContext* context,
WebSocketChannelClient* client, const String& sourceURL = String(), unsigned li
neNumber = 0) | 73 static PassRefPtr<NewWebSocketChannelImpl> create(ExecutionContext* context,
WebSocketChannelClient* client, const String& sourceURL = String(), unsigned li
neNumber = 0) |
| 74 { | 74 { |
| 75 return adoptRef(new NewWebSocketChannelImpl(context, client, sourceURL,
lineNumber)); | 75 return adoptRef(new NewWebSocketChannelImpl(context, client, sourceURL,
lineNumber)); |
| 76 } | 76 } |
| 77 virtual ~NewWebSocketChannelImpl(); | 77 virtual ~NewWebSocketChannelImpl(); |
| 78 | 78 |
| 79 // WebSocketChannel functions. | 79 // WebSocketChannel functions. |
| 80 virtual void connect(const KURL&, const String& protocol) OVERRIDE; | 80 virtual bool connect(const KURL&, const String& protocol) OVERRIDE; |
| 81 virtual String subprotocol() OVERRIDE; | 81 virtual String subprotocol() OVERRIDE; |
| 82 virtual String extensions() OVERRIDE; | 82 virtual String extensions() OVERRIDE; |
| 83 virtual WebSocketChannel::SendResult send(const String& message) OVERRIDE; | 83 virtual WebSocketChannel::SendResult send(const String& message) OVERRIDE; |
| 84 virtual WebSocketChannel::SendResult send(const ArrayBuffer&, unsigned byteO
ffset, unsigned byteLength) OVERRIDE; | 84 virtual WebSocketChannel::SendResult send(const ArrayBuffer&, unsigned byteO
ffset, unsigned byteLength) OVERRIDE; |
| 85 virtual WebSocketChannel::SendResult send(PassRefPtr<BlobDataHandle>) OVERRI
DE; | 85 virtual WebSocketChannel::SendResult send(PassRefPtr<BlobDataHandle>) OVERRI
DE; |
| 86 virtual unsigned long bufferedAmount() const OVERRIDE; | 86 virtual unsigned long bufferedAmount() const OVERRIDE; |
| 87 // Start closing handshake. Use the CloseEventCodeNotSpecified for the code | 87 // Start closing handshake. Use the CloseEventCodeNotSpecified for the code |
| 88 // argument to omit payload. | 88 // argument to omit payload. |
| 89 virtual void close(int code, const String& reason) OVERRIDE; | 89 virtual void close(int code, const String& reason) OVERRIDE; |
| 90 virtual void fail(const String& reason, MessageLevel, const String&, unsigne
d lineNumber) OVERRIDE; | 90 virtual void fail(const String& reason, MessageLevel, const String&, unsigne
d lineNumber) OVERRIDE; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 String m_sourceURLAtConstruction; | 176 String m_sourceURLAtConstruction; |
| 177 unsigned m_lineNumberAtConstruction; | 177 unsigned m_lineNumberAtConstruction; |
| 178 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; | 178 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; |
| 179 | 179 |
| 180 static const int64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; | 180 static const int64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; |
| 181 }; | 181 }; |
| 182 | 182 |
| 183 } // namespace WebCore | 183 } // namespace WebCore |
| 184 | 184 |
| 185 #endif // NewWebSocketChannelImpl_h | 185 #endif // NewWebSocketChannelImpl_h |
| OLD | NEW |