- 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

@ -4,6 +4,7 @@
#include "include/cef.h"
#include "cefclient.h"
#include "binding_test.h"
#include "extension_test.h"
#include "plugin_test.h"
#include "resource_util.h"
@ -505,6 +506,18 @@ public:
return RV_CONTINUE;
}
// Event called for binding to a frame's JavaScript global object. The
// return value is currently ignored.
virtual RetVal HandleJSBinding(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Value> object)
{
// Add the V8 bindings.
InitBindingTest(browser, frame, object);
return RV_HANDLED;
}
// Called just before a window is closed. The return value is currently
// ignored.
virtual RetVal HandleBeforeWindowClose(CefRefPtr<CefBrowser> browser)
@ -1013,7 +1026,11 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
#endif // !TEST_SINGLE_THREADED_MESSAGE_LOOP
}
return 0;
case ID_TESTS_JAVASCRIPT_HANDLER: // Test the V8 extension handler
case ID_TESTS_JAVASCRIPT_BINDING: // Test the V8 binding handler
if(browser.get())
RunBindingTest(browser);
return 0;
case ID_TESTS_JAVASCRIPT_EXTENSION: // Test the V8 extension handler
if(browser.get())
RunExtensionTest(browser);
return 0;