illfang
fa7f6bdb39
always create the offscreen browser using the instance settings, request context and address
v43.0.1
2015-10-29 21:35:05 +10:00
illfang
3618ea3fd2
bind root objects created during the OnProcessMessageReceived upon the context creation triggered by the evaluation of JS.
...
00c926a4cc
#1354
2015-10-28 22:04:08 +10:00
illfang
d797a43fa6
added a flag indicating if the root object has already been bound
2015-10-28 22:04:08 +10:00
amaitland
cc6eaa65d6
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-27 16:09:41 +10:00
amaitland
fdceb5c202
Fix #1357
...
In GetBrowserWrapper check if _cefBrowser has a valid pointer
Add ManagedCefBrowserAdapter IsDisposed check in JavascriptCallbackProxy::GetBrowser
Add CanExecute to check if underlying resources are still available
2015-10-27 16:09:41 +10:00
amaitland
b1d0bcf836
Add missing using statement
...
Using var - another resharper inspired change
2015-10-26 20:19:33 +10:00
amaitland
b07c112544
Remove redundant else statement from StringUtils.h
2015-10-26 11:50:33 +10:00
illfang
8e17df70cd
added missing include for CI build
2015-10-26 11:50:30 +10:00
illfang
49a2416683
create JS exceptions for callbacks and eval js using string utils, removed check for exception as contained in string utils
2015-10-26 11:50:29 +10:00
illfang
88c15ebcbe
added CreateExceptionString to the string utils which creates a verbose message from a Cef V8 exception, if possible
2015-10-26 11:50:29 +10:00
illfang
f7d139a8d2
test for js exceptions created in callbacks
2015-10-26 11:50:29 +10:00
bartwe
52c8b66383
Expose explicit message loop handling.
2015-10-21 20:38:34 +10:00
amaitland
d2aa11ec75
Conditionally create response for kEvaluateJavascriptRequest and kJavascriptCallbackRequest (was only going to create the kEvaluateJavascriptResponse before
2015-10-19 13:41:24 +10:00
amaitland
a598af2a2e
BindingTest - Braces on new lines
...
Fix CefAppUnmanagedWrapper code formatting
Slightly more descriptive error message when frame not found
2015-10-19 13:23:01 +10:00
Greg Martin
1a01b95619
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:13:12 +10:00
amaitland
be29bb8270
Add notes about CefLoadHandler methods/events being called on the CEF UI thread and that blocking is not advised.
2015-10-18 08:17:09 +10:00
amaitland
f676288894
VS2012 has problem with the auto keyboard in for each loops
2015-10-17 12:58:39 +10:00
amaitland
16e55d3865
Upgrade to 43.0.1 in pre for next release
2015-10-17 12:50:08 +10:00
amaitland
7c157f742c
Resolve merge issues when cherry picking from master branch
2015-10-17 12:35:12 +10:00
amaitland
d0460e50df
OffScreen - Allow for the delayed creation of the underlying OffScreenBrowser, useful for binding and potentially using as an custom popup implementation (when that eventually works properly)
...
Resolves #1170
2015-10-17 12:29:49 +10:00
amaitland
6e79d50640
Allow for custom rendering in OffScreen project
...
- Add BitmapFactory property
- Expose InvokeRenderAsync as virtual
2015-10-17 12:29:49 +10:00
amaitland
fb7777a19f
CefAppWrapper no longer inherits from DisposableResource
...
No need for CefRenderProcess to keep a list of browsers any more, one less thing to cleanup
2015-10-17 12:29:49 +10:00
amaitland
eab056608f
Remove unused references
2015-10-17 12:29:49 +10:00
illfang
a255020721
create a root object even if no objects have been registered but only bind the root object if objects are available
2015-10-17 12:29:47 +10:00
amaitland
aa14254c06
Add IsDisposed checks
...
Resolves #1307
2015-10-17 12:29:47 +10:00
amaitland
98fe58c38c
Formatting - else if on new line
...
Minor change to message of callback registry is not available
2015-10-17 12:29:47 +10:00
illfang
7fdd5476db
ensure destroyed root objects are not accessed in cef app unmanaged warpper message handling
2015-10-17 12:29:43 +10:00
illfang
482b727d26
do not delete shared callback registry in js method handler destructor, added comment to clarify the missing destructor call
2015-10-17 12:29:43 +10:00
amaitland
015855a653
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)
Conflicts:
CefSharp.Core/Internals/JavascriptCallbackProxy.cpp
CefSharp.Core/Internals/JavascriptCallbackProxy.h
2015-10-17 12:29:41 +10:00
amaitland
dbc1671af5
Change CefBrowserWrapper Dictionary to ConcurrentDictionary
2015-10-17 12:27:34 +10:00
illfang
fc9b095544
fix formatting of multi binding test
2015-10-17 12:27:33 +10:00
illfang
88342c1594
added multi binding test for testing bindings with multiple contexts and dynamic context creation / destruction
...
1 browser, multiple changing contexts
also added a link to the popuptest
Conflicts:
CefSharp.Example/CefSharpSchemeHandler.cs
CefSharp.Example/Properties/Resources.Designer.cs
CefSharp.Example/Properties/Resources.resx
2015-10-17 12:27:33 +10:00
illfang
553ccfc8cc
replaced tabs for spaces in test html files
...
Conflicts:
CefSharp.Example/Resources/FramedWebGLTest.html
2015-10-17 12:26:27 +10:00
amaitland
ea0f0e3071
Add CefSharpSettings.WcfTimeout - allow user to specify custom timeout when closing the WCF channel host
...
Can set to TimeSpan.Zero to Abort the channel (close without timeout)
2015-10-17 12:26:18 +10:00
amaitland
71acc04c40
Add CefSharpSettings.ShutdownOnExit - all the user to disable the inbuilt call to Cef.Shutdown
...
(Also needs to set shutdownOnProcessExit:false when calling Cef.Initialize, or the ParentProcessExitHandler will be called to Shutdown Cef)
2015-10-17 12:26:17 +10:00
amaitland
d9d84d781a
Remove stray quotes
2015-10-17 12:26:17 +10:00
amaitland
e0c8284507
Fix up some of the vc++ include mess that we had going
...
Cleanup using namespace statements as well
Conflicts:
CefSharp.Core/Cef.h
CefSharp.Core/CefSharp.Core.vcxproj
CefSharp.Core/Internals/CefGetGeolocationCallbackWrapper.h
CefSharp.Core/Internals/CefPdfPrintCallbackWrapper.h
2015-10-17 12:26:16 +10:00
amaitland
1148f022fc
Keep a WeakReference to IBrowserAdapter instead of IBrowser and lookup the browser by it's Id for callbacks
2015-10-17 12:24:41 +10:00
amaitland
a450fd79bb
Add TODO about callbacks being executed in the context of a popup
2015-10-17 12:24:41 +10:00
amaitland
c95291ce03
Async JSB now working in popups
...
Still have the issue of callbacks not working as expect, for some reason it can't find the context
2015-10-17 12:24:40 +10:00
amaitland
c7030d0f05
Remove unused MethodInvocation constructor
2015-10-17 12:24:40 +10:00
amaitland
946b107f4f
Only send kJavascriptRootObjectRequest when main browser is created (OnRenderViewReady)
...
Remove IsPopup check from async binding
Conflicts:
CefSharp.Core/Internals/ClientAdapter.cpp
2015-10-17 12:24:39 +10:00
amaitland
81ce8d265a
Only keep reference to the property/method objects long enough to bind the object
...
No need to store a reference to them long term
2015-10-17 12:20:32 +10:00
amaitland
42dd4d9cef
Remove JavascriptCallbackWrapper.cpp - move methods into header (super simple class doesn't need the extra overhead of a cpp file)
2015-10-17 12:20:32 +10:00
amaitland
1aa30ad9a2
Fix small build error - had to do a full rebuild before compiler showed a problem
2015-10-17 12:20:32 +10:00
amaitland
ea3cbb74f7
Add popup to open BindingTest.html
2015-10-17 12:20:32 +10:00
amaitland
2d49fcf085
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-10-17 12:20:30 +10:00
amaitland
d2ed4afa7a
Pass JavascriptObject in as param rather than keeping reference when calling Bind
2015-10-17 12:20:29 +10:00
amaitland
94c508eb0b
Set supported cookie schemes for https and http
2015-09-25 06:09:43 +10:00
amaitland
2230ee47d6
Add small section about upgrading to 43.0.x in NuGet/Readme.txt
v43.0.0
2015-09-20 22:45:04 +10:00