blob: 73c32e2dddc90095cf081704f87ebb429d629356 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_DELEGATE_H_
#define WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_DELEGATE_H_
#include "base/string16.h"
class GURL;
namespace WebKit {
class WebSocketStreamHandle;
}
namespace webkit_glue {
class WebSocketStreamHandleDelegate {
public:
WebSocketStreamHandleDelegate() {}
virtual void WillOpenStream(WebKit::WebSocketStreamHandle* handle,
const GURL& url) {}
virtual void WillSendData(WebKit::WebSocketStreamHandle* handle,
const char* data, int len) {}
virtual void DidOpenStream(WebKit::WebSocketStreamHandle* handle,
int max_amount_send_allowed) {}
virtual void DidSendData(WebKit::WebSocketStreamHandle* handle,
int amount_sent) {}
virtual void DidReceiveData(WebKit::WebSocketStreamHandle* handle,
const char* data, int len) {}
virtual void DidClose(WebKit::WebSocketStreamHandle*) {}
virtual void DidFail(WebKit::WebSocketStreamHandle* handle,
int error_code,
const string16& error_msg) {}
protected:
virtual ~WebSocketStreamHandleDelegate() {}
};
} // namespace webkit_glue
#endif // WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_DELEGATE_H_
|