- Fix bug in CefV8Value handling of weak references. (issue #72)

- Reintroduce support for CefHandler::HandleJSBinding(). (issue #72)

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@100 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2010-08-31 17:52:34 +00:00
parent e70fd64a52
commit e8cc5669f0
18 changed files with 381 additions and 18 deletions

View File

@@ -699,6 +699,13 @@ public:
bool& retval,
std::wstring& result) =0;
// Event called for adding values to a frame's JavaScript 'window' object. The
// return value is currently ignored.
/*--cef()--*/
virtual RetVal HandleJSBinding(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Value> object) =0;
// Called just before a window is closed. The return value is currently
// ignored.
/*--cef()--*/
@@ -1025,8 +1032,9 @@ class CefV8Value : public CefBase
{
public:
// Create a new CefV8Value object of the specified type. These methods
// should only be called from within the JavaScript context in a
// CefV8Handler::Execute() callback.
// should only be called from within the JavaScript context -- either in a
// CefV8Handler::Execute() callback or a CefHandler::HandleJSBinding()
// callback.
/*--cef()--*/
static CefRefPtr<CefV8Value> CreateUndefined();
/*--cef()--*/

View File

@@ -511,6 +511,12 @@ typedef struct _cef_handler_t
const wchar_t* message, const wchar_t* defaultValue, int* retval,
cef_string_t* result);
// Event called for adding values to a frame's JavaScript 'window' object. The
// return value is currently ignored.
enum cef_retval_t (CEF_CALLBACK *handle_jsbinding)(
struct _cef_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame, struct _cef_v8value_t* object);
// Called just before a window is closed. The return value is currently
// ignored.
enum cef_retval_t (CEF_CALLBACK *handle_before_window_close)(
@@ -906,8 +912,9 @@ typedef struct _cef_v8value_t
// Create a new cef_v8value_t object of the specified type. These functions
// should only be called from within the JavaScript context in a
// cef_v8handler_t::execute() callback.
// should only be called from within the JavaScript context -- either in a
// cef_v8handler_t::execute() callback or a cef_handler_t::handle_jsbinding()
// callback.
CEF_EXPORT cef_v8value_t* cef_v8value_create_undefined();
CEF_EXPORT cef_v8value_t* cef_v8value_create_null();
CEF_EXPORT cef_v8value_t* cef_v8value_create_bool(int value);