-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathWindowClient.h
More file actions
54 lines (42 loc) · 1.42 KB
/
WindowClient.h
File metadata and controls
54 lines (42 loc) · 1.42 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
#pragma once
#include <list>
#include "include/cef_base.h"
#include "include/cef_client.h"
#include "include/cef_app.h"
#include "include/cef_browser.h"
#include "include/cef_client.h"
#include "include/cef_task.h"
#include "include/cef_v8.h"
#include "include/cef_app.h"
struct WindowClient : public CefClient
, public CefLifeSpanHandler
, public CefDisplayHandler
, public CefRequestHandler
{
WindowClient();
~WindowClient();
// CefClient
virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler();
virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler();
// CefLifeSpanHandler
virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser);
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser);
// CefDisplayHandler
virtual bool OnConsoleMessage(CefRefPtr<CefBrowser> browser,
const CefString& message,
const CefString& source,
int line);
// CefRequestHandler
virtual bool OnProcessMessageReceived(
CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message
);
void CloseAllBrowsers();
private:
typedef std::list<CefRefPtr<CefBrowser> > BrowserList;
BrowserList browsers_;
IMPLEMENT_REFCOUNTING(WindowClient);
};
// aieeeee
extern int s_result;