forked from cztomczak/cefpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb_request_client.h
More file actions
44 lines (34 loc) · 1.44 KB
/
web_request_client.h
File metadata and controls
44 lines (34 loc) · 1.44 KB
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-2014 The CEF Python authors. All rights reserved.
// License: New BSD License.
// Website: http://code.google.com/p/cefpython/
#pragma once
#if defined(_WIN32)
#include "../windows/stdint.h"
#endif
#include "cefpython_public_api.h"
class WebRequestClient : public CefWebURLRequestClient
{
public:
int webRequestId_;
public:
WebRequestClient(int webRequestId) :
webRequestId_(webRequestId) {
}
virtual ~WebRequestClient(){}
virtual void OnStateChange(CefRefPtr<CefWebURLRequest> requester,
RequestState state) OVERRIDE;
virtual void OnRedirect(CefRefPtr<CefWebURLRequest> requester,
CefRefPtr<CefRequest> request,
CefRefPtr<CefResponse> response) OVERRIDE;
virtual void OnHeadersReceived(CefRefPtr<CefWebURLRequest> requester,
CefRefPtr<CefResponse> response) OVERRIDE;
virtual void OnProgress(CefRefPtr<CefWebURLRequest> requester,
uint64 bytesSent, uint64 totalBytesToBeSent) OVERRIDE;
virtual void OnData(CefRefPtr<CefWebURLRequest> requester,
const void* data, int dataLength) OVERRIDE;
virtual void OnError(CefRefPtr<CefWebURLRequest> requester,
ErrorCode errorCode) OVERRIDE;
protected:
// Include the default reference counting implementation.
IMPLEMENT_REFCOUNTING(WebRequestClient);
};