-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApplication.h
65 lines (50 loc) · 1.64 KB
/
Application.h
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
#pragma once
#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 Application : public CefApp
, public CefBrowserProcessHandler
, public CefRenderProcessHandler
, public CefV8Handler
{
Application();
// CefApp
virtual CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler();
virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler();
// CefRenderProcessHandler
virtual void OnBrowserDestroyed(CefRefPtr<CefBrowser> browser);
virtual void OnContextCreated(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context
);
virtual void OnContextInitialized();
virtual void OnContextReleased(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context
);
virtual void OnWebKitInitialized();
virtual bool OnProcessMessageReceived(
CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message
);
virtual bool Execute(
const CefString& name,
CefRefPtr<CefV8Value> object,
const CefV8ValueList& arguments,
CefRefPtr<CefV8Value>& retval,
CefString& exception
);
private:
CefRefPtr<CefBrowser> firstBrowser;
CefRefPtr<CefV8Value> leprechaunObj;
std::wstring outBuffer;
IMPLEMENT_REFCOUNTING(Application);
};