forked from cztomczak/cefpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathv8function_handler.h
More file actions
29 lines (26 loc) · 935 Bytes
/
v8function_handler.h
File metadata and controls
29 lines (26 loc) · 935 Bytes
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
// 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
#pragma once
#include "include/cef_v8.h"
#include "util.h"
class CefPythonApp;
class V8FunctionHandler
: public CefV8Handler {
public:
V8FunctionHandler(CefRefPtr<CefPythonApp> cefPythonApp,
int pythonCallbackId)
: cefPythonApp_(cefPythonApp),
pythonCallbackId_(pythonCallbackId) {
}
virtual bool Execute(const CefString& name,
CefRefPtr<CefV8Value> object,
const CefV8ValueList& arguments,
CefRefPtr<CefV8Value>& retval,
CefString& exception) OVERRIDE;
protected:
CefRefPtr<CefPythonApp> cefPythonApp_;
int pythonCallbackId_;
private:
IMPLEMENT_REFCOUNTING(V8FunctionHandler);
};