render_delegate.h
2.48 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
#ifndef ETRADECLIENT_BROWSER_RENDER_DELEGATE_H_INCLUDED
#define ETRADECLIENT_BROWSER_RENDER_DELEGATE_H_INCLUDED
#include <set>
#include "include/cef_base.h"
#include "include/cef_process_message.h"
// Forward declaration
class BrowserApp;
class CefListValue;
class CefBrowser;
class CefFrame;
class CefRequest;
class CefV8Context;
class CefV8Exception;
class CefV8StackTrace;
class CefDOMNode;
class CefProcessMessage;
class CefLoadHandler;
namespace RenderDelegate
{
// Interface for renderer delegates. All RenderDelegates must be returned via
// CreateRenderDelegates. Do not perform work in the RenderDelegate
// constructor. See CefRenderProcessHandler for documentation.
class BrowserRender : public virtual CefBase {
public:
virtual void OnRenderThreadCreated(CefRefPtr<BrowserApp> app, CefRefPtr<CefListValue> extra_info);
virtual void OnWebKitInitialized(CefRefPtr<BrowserApp> app);
virtual void OnBrowserCreated(CefRefPtr<BrowserApp> app, CefRefPtr<CefBrowser> browser);
virtual void OnBrowserDestroyed(CefRefPtr<BrowserApp> app, CefRefPtr<CefBrowser> browser);
virtual CefRefPtr<CefLoadHandler> GetLoadHandler(CefRefPtr<BrowserApp> app);
virtual bool OnBeforeNavigation(CefRefPtr<BrowserApp> app,
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
cef_navigation_type_t navigation_type,
bool is_redirect);
virtual void OnContextCreated(CefRefPtr<BrowserApp> app,
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context);
virtual void OnContextReleased(CefRefPtr<BrowserApp> app,
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context);
virtual void OnUncaughtException(CefRefPtr<BrowserApp> app,
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context,
CefRefPtr<CefV8Exception> exception,
CefRefPtr<CefV8StackTrace> stackTrace);
virtual bool OnProcessMessageReceived(CefRefPtr<BrowserApp> app,
CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message);
};
typedef std::set<CefRefPtr<BrowserRender>> BrowserRenderSet;
// Create the render delegate.
void CreateRenderDelegates(BrowserRenderSet& delegates);
} // RenderDelegate
#endif // ETRADECLIENT_BROWSER_RENDER_DELEGATE_H_INCLUDED