forked from cztomczak/cefpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient_handler.h
More file actions
96 lines (77 loc) · 2.51 KB
/
client_handler.h
File metadata and controls
96 lines (77 loc) · 2.51 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// Copyright (c) 2012 CEF Python, see the Authors file.
// All rights reserved. Licensed under BSD 3-clause license.
// Project website: https://github.com/cztomczak/cefpython
// ClientHandler code is running only in the Browser process.
#pragma once
#if defined(_WIN32)
#include <stdint.h>
#endif
#include "context_menu_handler.h"
#include "dialog_handler.h"
#include "display_handler.h"
#include "download_handler.h"
#include "focus_handler.h"
#include "js_dialog_handler.h"
#include "keyboard_handler.h"
#include "lifespan_handler.h"
#include "load_handler.h"
#include "render_handler.h"
#include "request_handler.h"
class ClientHandler : public CefClient,
public ContextMenuHandler,
public DialogHandler,
public DisplayHandler,
public DownloadHandler,
public FocusHandler,
public JSDialogHandler,
public KeyboardHandler,
public LifespanHandler,
public LoadHandler,
public RenderHandler,
public RequestHandler
{
public:
ClientHandler(){}
virtual ~ClientHandler(){}
CefRefPtr<CefContextMenuHandler> GetContextMenuHandler() override {
return this;
}
#if defined(OS_LINUX)
CefRefPtr<CefDialogHandler> GetDialogHandler() override {
return this;
}
#endif
CefRefPtr<CefDisplayHandler> GetDisplayHandler() override {
return this;
}
CefRefPtr<CefDownloadHandler> GetDownloadHandler() override {
return this;
}
CefRefPtr<CefFocusHandler> GetFocusHandler() override {
return this;
}
CefRefPtr<CefJSDialogHandler> GetJSDialogHandler() override {
return this;
}
CefRefPtr<CefKeyboardHandler> GetKeyboardHandler() override {
return this;
}
CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() override {
return this;
}
CefRefPtr<CefLoadHandler> GetLoadHandler() override {
return this;
}
CefRefPtr<CefRenderHandler> GetRenderHandler() override {
return this;
}
CefRefPtr<CefRequestHandler> GetRequestHandler() override {
return this;
}
bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message
) override;
private:
IMPLEMENT_REFCOUNTING(ClientHandler);
};