Commit Graph

88 Commits

Author SHA1 Message Date
amaitland 4059c76bcf Add cef_logging.h include as CI server seems to be having a problem after upgrading to newer version of CEF 2016-05-30 08:59:13 +10:00
amaitland bae3c28e92 Update copyright to 2016 2016-01-11 14:11:30 +10:00
Rich McNeary a27a097df6 Change from EnableFocusedNodeChanged to FocusedNodeChangedEnabled to match the existing WindowlessRenderingEnabled setting property. 2016-01-05 07:30:23 -05:00
amaitland c18f951a97 Move OnContextCreated from IRequestHandler to IRenderProcessMessageHandler
Manually resolve some merge conflicts
2015-12-09 11:32:24 +10:00
amaitland af02212217 Merge branch 'feature/oncontextcreated' of https://github.com/amaitland/CefSharp 2015-12-09 11:26:07 +10:00
Rich McNeary 443804084e Changed to specifically request FocusNodeChanged messages. 2015-12-08 09:04:22 -05:00
Rich McNeary 1fb54241f7 Add the OptionalMessages property to CefSettings. 2015-12-07 16:27:17 -05:00
Rich McNeary 5323818d7b Fix comment. 2015-12-07 10:54:20 -05:00
Rich McNeary ae49a5385b Fix: tabs to spaces, if and for braces, use frame ID. 2015-12-07 09:48:57 -05:00
Rich McNeary 1ecf2d57b0 Initial implementation complete.
Add support for when an element node in the DOM gets focus. Also invoked
when focus passes from an element node to an non-element node or
nothing.
2015-12-04 16:01:26 -05:00
Rich McNeary ce79f71275 When OnFocusedNodeChanged data is passed from render to browser process. 2015-12-03 15:59:27 -05:00
amaitland 8cd491562d Reorder params for SetInt64, SetJsCallback and SetCefTime - they're not in a logical order 2015-12-02 19:20:54 +10:00
amaitland 6f272833fb Add IRequestHandler.OnContextCreated handler
Send an IPC message when OnContextCreated is called in the render process
Currently only called for the main frame
Should be possible to hook the DOMContentLoaded event
2015-12-02 19:04:19 +10:00
amaitland 3f15b53ab7 Resolves #1407
More the DeserializeV8Object call to within the context->Enter so a V8Object can be created
Change callback to use a struct as it's return type to demo the solution to this bug
Add missing list->SetDictionary call in V8Serialization.cpp
2015-11-18 09:17:16 +10:00
illfang ccedf79114 bind root objects created during the OnProcessMessageReceived upon the context creation triggered by the evaluation of JS.
00c926a4cc
#1354
2015-10-28 20:32:58 +09:00
amaitland 00c926a4cc Proposed solution to #1354
The problem seems to be that OnContextCreated is never called as the page has no javascript code on it.
Keep the same callbackRegistry logic for kJavascriptCallbackRequest as without a context there cannot be a callback
For kEvaluateJavascriptRequest we now manually create a callback registry for the frame if required. Once the script is executed OnContextCreated is called, the wrapper creation is ignored and the context should be released as per normal in OnContextReleased
2015-10-26 18:23:10 +10:00
Alex Maitland 99ef5399e8 Merge pull request #1356 from illfang/feature-sanitized-and-verbose-js-exception-strings
Feature sanitized and verbose js exception strings
2015-10-26 11:47:19 +10:00
illfang cd93572a1e create JS exceptions for callbacks and eval js using string utils, removed check for exception as contained in string utils 2015-10-23 16:40:42 +09:00
illfang 4fb963fc71 do not create two objects in the promis creaton function 2015-10-22 14:17:07 +09:00
amaitland 03f73b5960 Conditionally create response for kEvaluateJavascriptRequest and kJavascriptCallbackRequest (was only going to create the kEvaluateJavascriptResponse before 2015-10-19 13:40:36 +10:00
amaitland 17b7f0ced1 BindingTest - Braces on new lines
Fix CefAppUnmanagedWrapper code formatting
Slightly more descriptive error message when frame not found
2015-10-19 13:24:24 +10:00
Greg Martin a64f25193f This should fix #1336 (IJavascriptCallback.ExecuteAsync never returns when callback no longer exists) and likely fixes as-of-yet undiscovered related callback problems.
The code previously in CefAppUnmanagedWrapper.cpp's OnProcessMessageReceived method did not check for a nullptr callbackWrapper resulting in an exception.
Also note that previously the success and reponse variables were not initialized by default which I believe to have been a mistake after following all of the if..else code paths (most importantly some error conditions would never be returned back).
I added a new test to BindingTest.html entitled "Test Disposed Callback" which makes the same 1.5 second delayed callback that "Test Callback" does, but then immediately navigate the page to www.google.com.  Without the fix in CefAppUnmanagedWrapper.cpp the browser's renderer process will die in about 10 seconds.
2015-10-19 13:24:24 +10:00
illfang 91976cddba create a root object even if no objects have been registered but only bind the root object if objects are available 2015-10-15 11:35:41 +09:00
amaitland 4ba7e95012 Formatting - else if on new line
Minor change to message of callback registry is not available
2015-10-13 18:55:04 +10:00
illfang e9675a2c3e ensure destroyed root objects are not accessed in cef app unmanaged warpper message handling 2015-10-13 13:00:39 +09:00
amaitland 2f3d9f868f Make js callbacks and async methods Frame aware - add FrameId so they can be executed on a specific frame
Resolves a problem where multiple contexts are created and only the first one is dealt with properly (each frame has it's own V8 context)
2015-10-11 20:41:17 +10:00
amaitland 5869b20068 Change CefBrowserWrapper Dictionary to ConcurrentDictionary 2015-10-11 19:50:55 +10:00
amaitland b9ee476e8e Fix up some of the vc++ include mess that we had going
Cleanup using namespace statements as well
2015-09-29 16:26:06 +10:00
amaitland b236d7711c Restructure code so JavascriptRootObject's are stored and can be used across multiple CefBrowserWrapper instances (popups in this context)
Code is now very much dependant on using --process-per-tab for this structure to work
2015-09-24 18:44:30 +10:00
amaitland e492c0d21e Fixes #1263
Pass in CefCustomScheme as command line argument, as they're registered correctly in all processes
2015-09-15 15:15:26 +10:00
David Serfozo 437cf20160 normal bound objects transfered with cef ipc as well 2015-08-06 10:25:33 +02:00
amaitland 22fa4c3b10 Register custom schemes in render process
Fixes #1014
2015-08-03 12:30:58 +10:00
amaitland bec6fe4618 Formatting and naming fixups 2015-08-03 12:16:20 +10:00
amaitland 5a09a5ef35 Merge branch 'cefextensions' of https://github.com/arsher/CefSharp 2015-08-03 12:12:51 +10:00
David Serfozo 4fdca242d0 CefExtension modified to null-check JavascriptCode in constructor 2015-08-02 16:07:43 +02:00
David Serfozo c8c100025a whitespace diffs redone 2015-08-01 20:37:55 +02:00
David Serfozo c9b7366786 Extensions transmitted in OnRenderThreadCreated and registered after webkit initialization 2015-08-01 20:25:12 +02:00
cefsharp-ms 0b300d5dda Merged master 2015-07-31 17:41:00 +02:00
cefsharp-ms 0333437917 fixed tabs again 2015-07-31 17:30:07 +02:00
cefsharp-ms c395f03ba2 jscallbackregistry lifecycle is managed by javascriptrootobjectwrapper, async methods too bound by javascriptrootobjectwrapper 2015-07-31 17:26:59 +02:00
cefsharp-ms dbf5e94293 updated kPromisCreatorScript field to be static const 2015-07-31 17:17:55 +02:00
cefsharp-ms 561c2de020 RootObject message renamed to include async 2015-07-31 17:17:35 +02:00
cefsharp-ms 43acbbe3fc CefAppUnmanagedWrapper wrapped up a little bit 2015-07-31 17:17:22 +02:00
cefsharp-ms 4523ddfaab method call message names include Async now 2015-07-31 17:17:16 +02:00
amaitland 3d19b3a587 Cleanup Binding, rather than keep references to the V8 objects, just use them and then let them be released
Code should be a little easier to debug now.
2015-07-28 22:22:30 +10:00
cefsharp-ms fc85d90877 added callback capability for async bound method with promises 2015-07-23 15:12:50 +02:00
cefsharp-ms a8db666642 added async bound method result callback on browser process side 2015-07-23 15:12:28 +02:00
cefsharp-ms 4ec6d1ca6e async method bindings added 2015-07-23 15:11:27 +02:00
cefsharp-ms 0e073bcd0a added message to transmit async bound jsrootobject to render process 2015-07-23 15:10:52 +02:00
amaitland 18c19edc86 kJavascriptCallbackDestroyRequest jscallbackId is located at Index 0 2015-07-10 10:35:51 +10:00