Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(492)

Side by Side Diff: Source/modules/websockets/NewWebSocketChannelImpl.h

Issue 334873002: [WebSocket] Make subprotocol and extensions live in WebSocket (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 PassRefPtrWillBeRawPtr<NewWebSocketChannelImpl> create(ExecutionConte xt* context, WebSocketChannelClient* client, const String& sourceURL = String(), unsigned lineNumber = 0) 73 static PassRefPtrWillBeRawPtr<NewWebSocketChannelImpl> create(ExecutionConte xt* context, WebSocketChannelClient* client, const String& sourceURL = String(), unsigned lineNumber = 0)
74 { 74 {
75 return adoptRefWillBeRefCountedGarbageCollected(new NewWebSocketChannelI mpl(context, client, sourceURL, lineNumber)); 75 return adoptRefWillBeRefCountedGarbageCollected(new NewWebSocketChannelI mpl(context, client, sourceURL, lineNumber));
76 } 76 }
77 virtual ~NewWebSocketChannelImpl(); 77 virtual ~NewWebSocketChannelImpl();
78 78
79 // WebSocketChannel functions. 79 // WebSocketChannel functions.
80 virtual bool connect(const KURL&, const String& protocol) OVERRIDE; 80 virtual bool connect(const KURL&, const String& protocol) OVERRIDE;
81 virtual String subprotocol() OVERRIDE;
82 virtual String extensions() OVERRIDE;
83 virtual WebSocketChannel::SendResult send(const String& message) OVERRIDE; 81 virtual WebSocketChannel::SendResult send(const String& message) OVERRIDE;
84 virtual WebSocketChannel::SendResult send(const ArrayBuffer&, unsigned byteO ffset, unsigned byteLength) OVERRIDE; 82 virtual WebSocketChannel::SendResult send(const ArrayBuffer&, unsigned byteO ffset, unsigned byteLength) OVERRIDE;
85 virtual WebSocketChannel::SendResult send(PassRefPtr<BlobDataHandle>) OVERRI DE; 83 virtual WebSocketChannel::SendResult send(PassRefPtr<BlobDataHandle>) OVERRI DE;
86 virtual WebSocketChannel::SendResult send(PassOwnPtr<Vector<char> > data) OV ERRIDE; 84 virtual WebSocketChannel::SendResult send(PassOwnPtr<Vector<char> > data) OV ERRIDE;
87 virtual unsigned long bufferedAmount() const OVERRIDE; 85 virtual unsigned long bufferedAmount() const OVERRIDE;
88 // Start closing handshake. Use the CloseEventCodeNotSpecified for the code 86 // Start closing handshake. Use the CloseEventCodeNotSpecified for the code
89 // argument to omit payload. 87 // argument to omit payload.
90 virtual void close(int code, const String& reason) OVERRIDE; 88 virtual void close(int code, const String& reason) OVERRIDE;
91 virtual void fail(const String& reason, MessageLevel, const String&, unsigne d lineNumber) OVERRIDE; 89 virtual void fail(const String& reason, MessageLevel, const String&, unsigne d lineNumber) OVERRIDE;
92 virtual void disconnect() OVERRIDE; 90 virtual void disconnect() OVERRIDE;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 unsigned long m_identifier; 161 unsigned long m_identifier;
164 OwnPtrWillBeMember<BlobLoader> m_blobLoader; 162 OwnPtrWillBeMember<BlobLoader> m_blobLoader;
165 Deque<OwnPtr<Message> > m_messages; 163 Deque<OwnPtr<Message> > m_messages;
166 Vector<char> m_receivingMessageData; 164 Vector<char> m_receivingMessageData;
167 165
168 bool m_receivingMessageTypeIsText; 166 bool m_receivingMessageTypeIsText;
169 int64_t m_sendingQuota; 167 int64_t m_sendingQuota;
170 int64_t m_receivedDataSizeForFlowControl; 168 int64_t m_receivedDataSizeForFlowControl;
171 unsigned long m_bufferedAmount; 169 unsigned long m_bufferedAmount;
172 size_t m_sentSizeOfTopMessage; 170 size_t m_sentSizeOfTopMessage;
173 String m_subprotocol;
174 String m_extensions;
175 171
176 String m_sourceURLAtConstruction; 172 String m_sourceURLAtConstruction;
177 unsigned m_lineNumberAtConstruction; 173 unsigned m_lineNumberAtConstruction;
178 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; 174 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest;
179 175
180 static const int64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; 176 static const int64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15;
181 }; 177 };
182 178
183 } // namespace WebCore 179 } // namespace WebCore
184 180
185 #endif // NewWebSocketChannelImpl_h 181 #endif // NewWebSocketChannelImpl_h
OLDNEW
« no previous file with comments | « Source/modules/websockets/MainThreadWebSocketChannel.cpp ('k') | Source/modules/websockets/NewWebSocketChannelImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698