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

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

Issue 338243006: Revert 176298 "[WebSocket] bufferedAmount should not decrease in..." (Closed) Base URL: svn://svn.chromium.org/blink/
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 | Annotate | Revision Log
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 WebSocketChannel::SendResult send(const String& message) OVERRIDE; 81 virtual WebSocketChannel::SendResult send(const String& message) OVERRIDE;
82 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;
83 virtual WebSocketChannel::SendResult send(PassRefPtr<BlobDataHandle>) OVERRI DE; 83 virtual WebSocketChannel::SendResult send(PassRefPtr<BlobDataHandle>) OVERRI DE;
84 virtual WebSocketChannel::SendResult send(PassOwnPtr<Vector<char> > data) OV ERRIDE; 84 virtual WebSocketChannel::SendResult send(PassOwnPtr<Vector<char> > data) OV ERRIDE;
85 virtual unsigned long bufferedAmount() const OVERRIDE;
85 // Start closing handshake. Use the CloseEventCodeNotSpecified for the code 86 // Start closing handshake. Use the CloseEventCodeNotSpecified for the code
86 // argument to omit payload. 87 // argument to omit payload.
87 virtual void close(int code, const String& reason) OVERRIDE; 88 virtual void close(int code, const String& reason) OVERRIDE;
88 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;
89 virtual void disconnect() OVERRIDE; 90 virtual void disconnect() OVERRIDE;
90 91
91 virtual void suspend() OVERRIDE; 92 virtual void suspend() OVERRIDE;
92 virtual void resume() OVERRIDE; 93 virtual void resume() OVERRIDE;
93 94
94 virtual void trace(Visitor*) OVERRIDE; 95 virtual void trace(Visitor*) OVERRIDE;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 KURL m_url; 159 KURL m_url;
159 // m_identifier > 0 means calling scriptContextExecution() returns a Documen t. 160 // m_identifier > 0 means calling scriptContextExecution() returns a Documen t.
160 unsigned long m_identifier; 161 unsigned long m_identifier;
161 OwnPtrWillBeMember<BlobLoader> m_blobLoader; 162 OwnPtrWillBeMember<BlobLoader> m_blobLoader;
162 Deque<OwnPtr<Message> > m_messages; 163 Deque<OwnPtr<Message> > m_messages;
163 Vector<char> m_receivingMessageData; 164 Vector<char> m_receivingMessageData;
164 165
165 bool m_receivingMessageTypeIsText; 166 bool m_receivingMessageTypeIsText;
166 int64_t m_sendingQuota; 167 int64_t m_sendingQuota;
167 int64_t m_receivedDataSizeForFlowControl; 168 int64_t m_receivedDataSizeForFlowControl;
169 unsigned long m_bufferedAmount;
168 size_t m_sentSizeOfTopMessage; 170 size_t m_sentSizeOfTopMessage;
169 171
170 String m_sourceURLAtConstruction; 172 String m_sourceURLAtConstruction;
171 unsigned m_lineNumberAtConstruction; 173 unsigned m_lineNumberAtConstruction;
172 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest; 174 RefPtr<WebSocketHandshakeRequest> m_handshakeRequest;
173 175
174 static const int64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; 176 static const int64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15;
175 }; 177 };
176 178
177 } // namespace WebCore 179 } // namespace WebCore
178 180
179 #endif // NewWebSocketChannelImpl_h 181 #endif // NewWebSocketChannelImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698