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

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

Issue 311993006: [WebSocket] bufferedAmount should not decrease inside a task. (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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 }; 81 };
82 82
83 virtual bool connect(const KURL&, const String& protocol) = 0; 83 virtual bool connect(const KURL&, const String& protocol) = 0;
84 virtual SendResult send(const String& message) = 0; 84 virtual SendResult send(const String& message) = 0;
85 virtual SendResult send(const ArrayBuffer&, unsigned byteOffset, unsigned by teLength) = 0; 85 virtual SendResult send(const ArrayBuffer&, unsigned byteOffset, unsigned by teLength) = 0;
86 virtual SendResult send(PassRefPtr<BlobDataHandle>) = 0; 86 virtual SendResult send(PassRefPtr<BlobDataHandle>) = 0;
87 87
88 // For WorkerThreadableWebSocketChannel. 88 // For WorkerThreadableWebSocketChannel.
89 virtual SendResult send(PassOwnPtr<Vector<char> >) = 0; 89 virtual SendResult send(PassOwnPtr<Vector<char> >) = 0;
90 90
91 virtual unsigned long bufferedAmount() const = 0;
92 virtual void close(int code, const String& reason) = 0; 91 virtual void close(int code, const String& reason) = 0;
93 92
94 // Log the reason text and close the connection. Will call didClose(). 93 // Log the reason text and close the connection. Will call didClose().
95 // The MessageLevel parameter will be used for the level of the message 94 // The MessageLevel parameter will be used for the level of the message
96 // shown at the devtool console. 95 // shown at the devtool console.
97 // sourceURL and lineNumber parameters may be shown with the reason text 96 // sourceURL and lineNumber parameters may be shown with the reason text
98 // at the devtool console. 97 // at the devtool console.
99 // Even if sourceURL and lineNumber are specified, they may be ignored 98 // Even if sourceURL and lineNumber are specified, they may be ignored
100 // and the "current" url and the line number in the sense of 99 // and the "current" url and the line number in the sense of
101 // JavaScript execution may be shown if this method is called in 100 // JavaScript execution may be shown if this method is called in
102 // a JS execution context. 101 // a JS execution context.
103 // You can specify String() and 0 for sourceURL and lineNumber 102 // You can specify String() and 0 for sourceURL and lineNumber
104 // respectively, if you can't / needn't provide the information. 103 // respectively, if you can't / needn't provide the information.
105 virtual void fail(const String& reason, MessageLevel, const String& sourceUR L, unsigned lineNumber) = 0; 104 virtual void fail(const String& reason, MessageLevel, const String& sourceUR L, unsigned lineNumber) = 0;
106 105
107 virtual void disconnect() = 0; // Will suppress didClose(). 106 virtual void disconnect() = 0; // Will suppress didClose().
108 107
109 virtual void suspend() = 0; 108 virtual void suspend() = 0;
110 virtual void resume() = 0; 109 virtual void resume() = 0;
111 110
112 virtual ~WebSocketChannel() { } 111 virtual ~WebSocketChannel() { }
113 112
114 virtual void trace(Visitor*) { } 113 virtual void trace(Visitor*) { }
115 }; 114 };
116 115
117 } // namespace WebCore 116 } // namespace WebCore
118 117
119 #endif // WebSocketChannel_h 118 #endif // WebSocketChannel_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698