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

Unified Diff: net/websockets/websocket_event_interface.h

Issue 2267233002: Change WebSocketChannel to pass data via IOBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make it const char* Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/websockets/websocket_end_to_end_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_event_interface.h
diff --git a/net/websockets/websocket_event_interface.h b/net/websockets/websocket_event_interface.h
index 761f356c21760088cc337f1b81d6c3b99505c792..ac29659aac8bb608edab44014c1045ff90b870d0 100644
--- a/net/websockets/websocket_event_interface.h
+++ b/net/websockets/websocket_event_interface.h
@@ -13,12 +13,14 @@
#include "base/compiler_specific.h" // for WARN_UNUSED_RESULT
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
#include "net/base/net_export.h"
class GURL;
namespace net {
+class IOBuffer;
class SSLInfo;
struct WebSocketHandshakeRequestInfo;
struct WebSocketHandshakeResponseInfo;
@@ -47,10 +49,10 @@ class NET_EXPORT WebSocketEventInterface {
// Called when a data frame has been received from the remote host and needs
// to be forwarded to the renderer process.
- virtual ChannelState OnDataFrame(
- bool fin,
- WebSocketMessageType type,
- const std::vector<char>& data) WARN_UNUSED_RESULT = 0;
+ virtual ChannelState OnDataFrame(bool fin,
+ WebSocketMessageType type,
+ scoped_refptr<IOBuffer> buffer,
+ size_t buffer_size) WARN_UNUSED_RESULT = 0;
// Called to provide more send quota for this channel to the renderer
// process. Currently the quota units are always bytes of message body
« no previous file with comments | « net/websockets/websocket_end_to_end_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698