1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef WEBKIT_CHILD_WEBSOCKETSTREAMHANDLE_DELEGATE_H_
6 #define WEBKIT_CHILD_WEBSOCKETSTREAMHANDLE_DELEGATE_H_
8 #include "base/strings/string16.h"
13 class WebSocketStreamHandle
;
16 namespace webkit_glue
{
18 class WebSocketStreamHandleDelegate
{
20 WebSocketStreamHandleDelegate() {}
22 virtual void WillOpenStream(WebKit::WebSocketStreamHandle
* handle
,
24 virtual void WillSendData(WebKit::WebSocketStreamHandle
* handle
,
25 const char* data
, int len
) {}
27 virtual void DidOpenStream(WebKit::WebSocketStreamHandle
* handle
,
28 int max_amount_send_allowed
) {}
29 virtual void DidSendData(WebKit::WebSocketStreamHandle
* handle
,
31 virtual void DidReceiveData(WebKit::WebSocketStreamHandle
* handle
,
32 const char* data
, int len
) {}
33 virtual void DidClose(WebKit::WebSocketStreamHandle
*) {}
34 virtual void DidFail(WebKit::WebSocketStreamHandle
* handle
,
36 const string16
& error_msg
) {}
39 virtual ~WebSocketStreamHandleDelegate() {}
42 } // namespace webkit_glue
44 #endif // WEBKIT_CHILD_WEBSOCKETSTREAMHANDLE_DELEGATE_H_