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

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

Issue 2652973002: [scheduler] Plumb websocket information to scheduler (Closed)
Patch Set: git Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef DocumentWebSocketChannel_h 31 #ifndef DocumentWebSocketChannel_h
32 #define DocumentWebSocketChannel_h 32 #define DocumentWebSocketChannel_h
33 33
34 #include <stdint.h>
35 #include <memory>
34 #include "bindings/core/v8/SourceLocation.h" 36 #include "bindings/core/v8/SourceLocation.h"
35 #include "core/fileapi/Blob.h" 37 #include "core/fileapi/Blob.h"
36 #include "core/fileapi/FileError.h" 38 #include "core/fileapi/FileError.h"
37 #include "modules/ModulesExport.h" 39 #include "modules/ModulesExport.h"
38 #include "modules/websockets/WebSocketChannel.h" 40 #include "modules/websockets/WebSocketChannel.h"
39 #include "modules/websockets/WebSocketHandle.h" 41 #include "modules/websockets/WebSocketHandle.h"
40 #include "modules/websockets/WebSocketHandleClient.h" 42 #include "modules/websockets/WebSocketHandleClient.h"
43 #include "platform/WebFrameScheduler.h"
41 #include "platform/heap/Handle.h" 44 #include "platform/heap/Handle.h"
42 #include "platform/weborigin/KURL.h" 45 #include "platform/weborigin/KURL.h"
43 #include "wtf/Deque.h" 46 #include "wtf/Deque.h"
44 #include "wtf/PassRefPtr.h" 47 #include "wtf/PassRefPtr.h"
45 #include "wtf/RefPtr.h" 48 #include "wtf/RefPtr.h"
46 #include "wtf/Vector.h" 49 #include "wtf/Vector.h"
47 #include "wtf/text/CString.h" 50 #include "wtf/text/CString.h"
48 #include "wtf/text/WTFString.h" 51 #include "wtf/text/WTFString.h"
49 #include <memory>
50 #include <stdint.h>
51 52
52 namespace blink { 53 namespace blink {
53 54
54 class Document; 55 class Document;
55 class WebSocketHandshakeRequest; 56 class WebSocketHandshakeRequest;
56 57
57 // This class is a WebSocketChannel subclass that works with a Document in a 58 // This class is a WebSocketChannel subclass that works with a Document in a
58 // DOMWindow (i.e. works in the main thread). 59 // DOMWindow (i.e. works in the main thread).
59 class MODULES_EXPORT DocumentWebSocketChannel final 60 class MODULES_EXPORT DocumentWebSocketChannel final
60 : public WebSocketChannel, 61 : public WebSocketChannel,
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 unsigned long m_identifier; 167 unsigned long m_identifier;
167 Member<BlobLoader> m_blobLoader; 168 Member<BlobLoader> m_blobLoader;
168 HeapDeque<Member<Message>> m_messages; 169 HeapDeque<Member<Message>> m_messages;
169 Vector<char> m_receivingMessageData; 170 Vector<char> m_receivingMessageData;
170 Member<Document> m_document; 171 Member<Document> m_document;
171 172
172 bool m_receivingMessageTypeIsText; 173 bool m_receivingMessageTypeIsText;
173 uint64_t m_sendingQuota; 174 uint64_t m_sendingQuota;
174 uint64_t m_receivedDataSizeForFlowControl; 175 uint64_t m_receivedDataSizeForFlowControl;
175 size_t m_sentSizeOfTopMessage; 176 size_t m_sentSizeOfTopMessage;
177 std::unique_ptr<WebFrameScheduler::ActiveConnectionHandle>
178 connection_handle_for_scheduler_;
176 179
177 std::unique_ptr<SourceLocation> m_locationAtConstruction; 180 std::unique_ptr<SourceLocation> m_locationAtConstruction;
178 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; 181 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest;
179 182
180 static const uint64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; 183 static const uint64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15;
181 }; 184 };
182 185
183 std::ostream& operator<<(std::ostream&, const DocumentWebSocketChannel*); 186 std::ostream& operator<<(std::ostream&, const DocumentWebSocketChannel*);
184 187
185 } // namespace blink 188 } // namespace blink
186 189
187 #endif // DocumentWebSocketChannel_h 190 #endif // DocumentWebSocketChannel_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698