1 // Copyright (c) 2009 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. 4 5 #ifndef WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_DELEGATE_H_ 6 #define WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_DELEGATE_H_ 7 8 class GURL; 9 10 namespace WebKit { 11 class WebSocketStreamHandle; 12 } 13 14 namespace webkit_glue { 15 16 class WebSocketStreamHandleDelegate { 17 public: WebSocketStreamHandleDelegate()18 WebSocketStreamHandleDelegate() {} ~WebSocketStreamHandleDelegate()19 virtual ~WebSocketStreamHandleDelegate() {} 20 WillOpenStream(WebKit::WebSocketStreamHandle * handle,const GURL & url)21 virtual void WillOpenStream(WebKit::WebSocketStreamHandle* handle, 22 const GURL& url) {} WillSendData(WebKit::WebSocketStreamHandle * handle,const char * data,int len)23 virtual void WillSendData(WebKit::WebSocketStreamHandle* handle, 24 const char* data, int len) {} 25 DidOpenStream(WebKit::WebSocketStreamHandle * handle,int max_amount_send_allowed)26 virtual void DidOpenStream(WebKit::WebSocketStreamHandle* handle, 27 int max_amount_send_allowed) {} DidSendData(WebKit::WebSocketStreamHandle * handle,int amount_sent)28 virtual void DidSendData(WebKit::WebSocketStreamHandle* handle, 29 int amount_sent) {} DidReceiveData(WebKit::WebSocketStreamHandle * handle,const char * data,int len)30 virtual void DidReceiveData(WebKit::WebSocketStreamHandle* handle, 31 const char* data, int len) {} DidClose(WebKit::WebSocketStreamHandle *)32 virtual void DidClose(WebKit::WebSocketStreamHandle*) {} 33 }; 34 35 } // namespace webkit_glue 36 37 #endif // WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_DELEGATE_H_ 38