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

Side by Side Diff: third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h

Issue 2003253002: [Devtools] Allow User-Agent header override for Websockets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 void didFail(WebSocketHandle*, const WebString& message) override; 124 void didFail(WebSocketHandle*, const WebString& message) override;
125 void didReceiveData(WebSocketHandle*, bool fin, WebSocketHandle::MessageType , const char* data, size_t /* size */) override; 125 void didReceiveData(WebSocketHandle*, bool fin, WebSocketHandle::MessageType , const char* data, size_t /* size */) override;
126 void didClose(WebSocketHandle*, bool wasClean, unsigned short code, const We bString& reason) override; 126 void didClose(WebSocketHandle*, bool wasClean, unsigned short code, const We bString& reason) override;
127 void didReceiveFlowControl(WebSocketHandle*, int64_t quota) override; 127 void didReceiveFlowControl(WebSocketHandle*, int64_t quota) override;
128 void didStartClosingHandshake(WebSocketHandle*) override; 128 void didStartClosingHandshake(WebSocketHandle*) override;
129 129
130 // Methods for BlobLoader. 130 // Methods for BlobLoader.
131 void didFinishLoadingBlob(DOMArrayBuffer*); 131 void didFinishLoadingBlob(DOMArrayBuffer*);
132 void didFailLoadingBlob(FileError::ErrorCode); 132 void didFailLoadingBlob(FileError::ErrorCode);
133 133
134 const WebString additionalHeaders();
yhirano 2016/05/30 11:12:57 Can you tell me why you use WebString instead of S
yhirano 2016/05/30 11:12:57 |const| not needed?
allada 2016/06/01 19:06:41 Done.
allada 2016/06/01 19:06:41 Done.
135
134 // m_handle is a handle of the connection. 136 // m_handle is a handle of the connection.
135 // m_handle == 0 means this channel is closed. 137 // m_handle == 0 means this channel is closed.
136 OwnPtr<WebSocketHandle> m_handle; 138 OwnPtr<WebSocketHandle> m_handle;
137 139
138 // m_client can be deleted while this channel is alive, but this class 140 // m_client can be deleted while this channel is alive, but this class
139 // expects that disconnect() is called before the deletion. 141 // expects that disconnect() is called before the deletion.
140 Member<WebSocketChannelClient> m_client; 142 Member<WebSocketChannelClient> m_client;
141 KURL m_url; 143 KURL m_url;
142 // m_identifier > 0 means calling scriptContextExecution() returns a Documen t. 144 // m_identifier > 0 means calling scriptContextExecution() returns a Documen t.
143 unsigned long m_identifier; 145 unsigned long m_identifier;
144 Member<BlobLoader> m_blobLoader; 146 Member<BlobLoader> m_blobLoader;
145 HeapDeque<Member<Message>> m_messages; 147 HeapDeque<Member<Message>> m_messages;
146 Vector<char> m_receivingMessageData; 148 Vector<char> m_receivingMessageData;
147 149
148 bool m_receivingMessageTypeIsText; 150 bool m_receivingMessageTypeIsText;
149 uint64_t m_sendingQuota; 151 uint64_t m_sendingQuota;
150 uint64_t m_receivedDataSizeForFlowControl; 152 uint64_t m_receivedDataSizeForFlowControl;
151 size_t m_sentSizeOfTopMessage; 153 size_t m_sentSizeOfTopMessage;
152 154
153 OwnPtr<SourceLocation> m_locationAtConstruction; 155 OwnPtr<SourceLocation> m_locationAtConstruction;
154 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; 156 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest;
155 157
156 static const uint64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; 158 static const uint64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15;
157 }; 159 };
158 160
159 } // namespace blink 161 } // namespace blink
160 162
161 #endif // DocumentWebSocketChannel_h 163 #endif // DocumentWebSocketChannel_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698