Commit Graph

415 Commits

Author SHA1 Message Date
amaitland 732f5851de Upgrade to CEF 3.3497.1829.g004ef91 / Chromium 69.0.3497.81 2018-09-16 13:01:45 +10:00
amaitland 6602977496 Upgrade version number to 69 2018-09-10 13:27:10 +10:00
amaitland b24286d591 Upgrade to CEF 3.3497.1827.ga4f7e36 / Chromium 69.0.3497.81 2018-09-10 12:13:39 +10:00
Chris bef5dd37c4 Maintenance - Fixed formatting, file encoding, and copyright year (#2504)
* Applied formatting

* Fixed file encoding + Updated copyright year

* Updated License

* Fixed more file encoding

* Copyright notice now shows the year the file was created
2018-09-10 10:41:13 +10:00
amaitland 7450d0d51b JSB - Remove use of CefRegisterExtension and change Promise creator to an anon function
Use CefV8Context::Eval to create the promise using an anonymous function

Attempt to resolve #2432 (though it actually seems upgrading to a newer version resolves the underlying problem)
2018-08-27 13:12:55 +10:00
Damir Ainullin fc373f4601 Fixed small typo and removed excessive null-check (#2485) 2018-08-16 19:44:40 +10:00
amaitland e5a7ed75ec Upgrade version numbers to 68.0.0 2018-08-07 19:15:00 +10:00
amaitland 38bc2d8365 CefAppUnmanagedWrapper::OnContextCreated - Send OnContextCreated message after Objects created
Message is now sent once the CefSharp.BindObjectAsync and helper functions are created and Legacy objects
are bound.

It should now be reliable to call CefSharp.BindObjectAsync in OnContextCreated
2018-08-05 19:56:41 +10:00
amaitland 161e1ae0cc Upgrade to CEF 3.3440.1803.gde363ee / Chromium 68.0.3440.75 2018-08-02 10:03:10 +10:00
amaitland 1d94885d75 Upgrade to CEF 3.3396.1786.gd3e36d0 / Chromium 67.0.3396.79 2018-07-31 19:20:56 +10:00
amaitland 49d353bc9e JavascriptAsyncMethodHandler::Execute - Add extra logging
- Add extra logging
- Fix formatting
- Add reference to relevant github issue

Follow up to https://github.com/cefsharp/CefSharp/pull/2446
2018-07-09 20:31:15 +10:00
mtajmajer 8fb47b4761 Add nullcheck to promiseData. This is null at times; I see it when refreshing the browser in the development tools. 2018-07-09 20:16:18 +10:00
amaitland 72c1babab9 Upgrade version numbers to 67 2018-06-25 21:33:57 +10:00
amaitland e7cacffe5a Upgrade to CEF 3.3396.1777.g636f29b / Chromium 67.0.3396.79 2018-06-14 22:33:47 +10:00
amaitland cb0d9275e0 WcfEnabledSubProcess - Revert codepage change 2018-06-09 21:53:15 +10:00
João Neves 274e841f35 Close CefSharp.BrowserSubprocess.exe if parent process exits (#2375)
* Close cefsharp subprocess if main process dies

* Code review

* Await before exiting

* Update Program.cs
2018-06-09 21:39:23 +10:00
amaitland fdc7cc21d5 Upgrade to CEF 3.3359.1772.gd1df190 / Chromium 66.0.3359.117 2018-05-17 12:40:39 +10:00
amaitland 5f3dca4d96 JavascriptAsyncMethodHandler - Obtain Promise from context on Execute
Previously the promise reference was passed into the handler, now we obtain the reference on demand
2018-05-15 16:12:46 +10:00
amaitland ddb2fdcbbc CefAppUnmanagedWrapper - Add comment about mapping layer so code isn't duplicated to handle camel casing of object names 2018-05-15 15:52:31 +10:00
amaitland 306ac694e1 RegisterBoundObjectHandler - Reduce code duplication slightly 2018-05-15 15:52:30 +10:00
amaitland 5ab2fc0142 JavascriptRootObjectWrapper - Log error when trying to bind sync object when IBrowserProcess is null 2018-05-15 15:52:29 +10:00
amaitland 56ce91fa9d Upgrade version numbers to 66 and update README.md 2018-05-03 12:20:45 +10:00
amaitland 05e67ddc2d Upgrade to CEF 3.3359.1769.gd0bfc4d / Chromium 66.0.3359.117 2018-05-02 17:31:20 +10:00
amaitland f2fcbf0add Always pass through Process Id to subprocess
Improve command line parsing

Partial import of changes from #2375
2018-04-30 12:45:15 +10:00
amaitland 8f7692ae6e JSB - Add JavascriptBindingCompleteEventArgs and config options to CefSharp.BindObjectAsync
CefSharp.BindObjectAsync can now take an optional config object as first param
Include additional information when binding complete
Add option for cefSharp.bindObjectAsync (starting with lowercase latters)
Add new syntax options - not entirely complete, no variant for the options object
Add ignore cache option
2018-04-27 16:40:39 +10:00
amaitland f6e58283a6 LegacyBinding - Remove objects from cache if key already exists
Temp fix for #2301 Will be resolved properly in #2306
2018-04-20 10:45:52 +10:00
amaitland 066f5a92b2 Upgrade to CEF 3.3325.1758.g9aea513 / Chromium 65.0.3325.181 2018-04-17 15:14:42 +10:00
amaitland efff50bf7e Upgrade to CEF 3.3325.1751.ge5b78a5 / Chromium 65.0.3325.181 2018-03-28 13:50:42 +10:00
amaitland c37dbcd06a Remove Geolocation API and Upgrade version numbers to 65 2018-03-17 21:31:25 +10:00
amaitland 8eb9860cac Upgrade to CEF 3.3325.1749.ga42963a / Chromium 65.0.3325.146 2018-03-17 21:29:21 +10:00
João Neves 5a713fdf7d Support uncaught exception handling (#2244)
* Added support for uncaught javascript exception in Render Process Message Handler
* Fixed typo
* Added stack frame column numbers
* Code review
* Code review
* Update JavascriptException.cs
2018-03-07 10:21:31 +10:00
amaitland 5e6addc0c9 CefTime.GetDoubleT returns invalid .Net date
Issue #2283
2018-03-05 16:55:11 +10:00
amaitland a38df4a268 Default builds to using VS2015
Builds are now done using VS2015 which will require VC++ 2015 (or VC++ 2017 as they are compatible)

Remove VS2013 target from build.ps1
2018-02-05 17:23:34 +10:00
amaitland 9f5a7efe70 Upgrade to CEF 3.3282.1731.gfc9a4fa / Chromium 64.0.3282.119 2018-02-05 17:11:41 +10:00
amaitland 1b00c277b8 JSB Add Caching
Bound object meta data is cached within a render process
CefSharp.IsObjectCached - JS method to test if object cached
CefSharp.RemoveObjectFromCache - JS method to remove object from cache

If a request is made for multiple objects with not all of them being cached then a IPC message is sent.
When all objects already bound return response object for consistency
FindBrowserWrapper signature change - it's really not safe to throw a managed exception in the middle of unmanaged code, changed to logging and null checking
JavascriptObjectRepository - Add All Constant - Used when All objects are requested for binding (objects can also be requested by name)

TODO: Add a JS library to improve user experience when dealing with cached objects
2018-01-30 10:16:28 +10:00
amaitland 934cd70ed6 JSB BindObjectAsync return response object
Can now return additional properties, still need better error handling
2018-01-29 09:45:24 +10:00
amaitland fd64b079a2 IJavascriptObjectRepository.ObjectBoundInJavascript - Fix bug and add example 2018-01-22 12:19:51 +10:00
amaitland 7c699e3ec6 IJavascriptObjectRepositry - Add ObjectBoundInJavascript event
Executed on the thread pool when objects are bound in JS
2018-01-22 12:19:43 +10:00
amaitland 1019ee0a71 WcfEnabledSubProcess - Add better error handling when closing the WCF channel/factory
Resolves #2074
2018-01-22 11:15:44 +10:00
Alex Maitland 9b01b69d2f Implement Javascript Binding v2 (#2247)
* JSB Rewrite - Add CefSharp.RegisterBoundObject javascript method

To get around the problem of IPC timing, I've reversed the communication, now it's the render process requesting
the bound objects, the implementation is incomplete at this stage, more just a basic proof of concept

Rewrite BindingTest.html using QUnit
One of the tests doesn't map correctly as it requires def user interaction

TODO:

- Get objects by name
- Rename Messages.h values that relate to this change so they are more descriptive
- Better error handling
- Caching of objects within a render process
- Investigate global context options, don't think it's possible to call an async method directly in the global context

# Conflicts:
#	CefSharp.Example/Resources/BindingTest.html

* JSB Improve Request/Response message names

* BindingTest.html - Output stress test results

* Remove JavascriptRootObject was leftover from time we used WCF to transmit objects

* JavascriptObjectRepository - Objects are now sent in the same list with an IsAsync flag

Separation when sending over IPC with two unique lists isn't necessary

* JavascriptObjectRepository - Return objects by name or return all by default

Untabify CefAppUnmanagedWrapper.cpp
Add minor comment to CefBrowserWrapper for a reminder that we use Frame Identifier as dictionary key

* Add //TODO: JSB comments for work that's left to be done

Ideally within a render process we cache bound objects once they've been communicated,
It would also be nice to make multiple binding requests so objects can later be added dynamically

* JSB Allow multiple calls to CefSharp.RegisterBoundObject

Update BindingTest.html to name two distinct calls to different bound objects

* JSB - Add some notes about caching, no working implementation yet

* JSB - Dynamically Register object on Request

* JSB Add ability to unbind an object and rename RegisterBoundObject to BindObjectAsync

# Conflicts:
#	CefSharp.Example/Resources/BindingTest.html

* JSB BindObjectAsync - if objects already bound then return false

* JSB - Ignore Indexer properties

Were previously throwing an exception

* JSB - Add LegacyJavascriptBindingEnabled option so preserve existing behaviour

This is only useful for SPA application and those that only navigate to pages
hosting within a single domain. Any sort of cross-site navigation and a new
render process will be spawned and objects won't be bound automatically
(You can use the new methods to request they're bound yourself, at least in theory,
more testing required on this)

* Add LegacyBindingTest.html

Current disabled by default. To enable uncomment CefSharpSettings.LegacyJavascriptBindingEnabled = true;
in CefExample.cs

* RegisterJsObject and RegisterAsyncJsObject can now only be used when CefSharpSettings.LegacyJavascriptBindingEnabled = true

See https://github.com/cefsharp/CefSharp/issues/2246 for details
2018-01-22 10:24:25 +10:00
amaitland 41b3da004f Cleanup CefTime handling - make consistent across all projects
# Conflicts:
#	CefSharp.Core/ResourceHandlerWrapper.cpp
2018-01-18 10:25:54 +10:00
amaitland 5dfd24bddb Upgrade to CEF 3.3239.1723.g071d1c1 / Chromium 63.0.3239.132 2018-01-12 15:45:50 +10:00
amaitland ea4cafed18 Upgrade to CEF 3.3239.1716.g735b746 / Chromium 63.0.3239.109 2017-12-29 22:10:13 +10:00
amaitland 1ae29bdb78 Upgrade to CEF 3.3239.1709.g093cae4 / Chromium 63.0.3239.109 2017-12-26 09:17:52 +10:00
amaitland a6f20e82bc Upgrade to CEF 3.3239.1705.gf6d6dfc / Chromium 63.0.3239.109 2017-12-21 11:13:02 +10:00
amaitland 6f3016d1a7 Remove additionallibsdirectory references to CefSharp.Core\bin - probably a leftover from years ago before the structure was cleaned up 2017-12-20 10:54:41 +10:00
amaitland 2c935268e6 Upgrade to CEF 3.3239.1700
Update version numbers to 63.x
Remove EnsureNuGetPackageBuildImports targets (newer nuget restore method should always be used)
cef.redist targets updated as package structure changed with commit https://github.com/cefsharp/cef-binary/commit/982a6330e70a75860bc6ecb6f84d55456b847d68
(Swiftshader should now be supported)
2017-12-19 11:44:34 +10:00
Per Lundberg a15986979e Upgraded to CEF 62 (#2203)
* Upgraded to CEF 62.
* Upgraded CEF version in README.md
* Bumped appveyor etc versions to 62.0.0.
2017-11-30 21:43:11 +02:00
GrabzIt 93b08f1c12 Upgraded CEF to version 60 (#2159)
* Fixed pointer problem.

* Upgrade to CEF version 60

* Fix for invalid cookie date time

Error and stacktrace:

Year, Month, and Day parameters describe an un-representable DateTime.
   at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day)
   at System.DateTime..ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second, Int32 millisecond)
   at CefSharp.ResourceHandlerWrapper.GetCookie(ResourceHandlerWrapper* , CefStructBase<CefCookieTraits>* cookie)
   at CefSharp.ResourceHandlerWrapper.CanGetCookie(ResourceHandlerWrapper* , CefStructBase<CefCookieTraits>* cookie)

Fixed by copying the same solution found here:

https://github.com/cefsharp/CefSharp/blob/cd934267c65f494ceb9ee75995cd2a1ca0954543/CefSharp.Core/Internals/CookieVisitor.cpp
2017-11-08 13:08:59 +02:00
GrabzIt 653896a5b3 Merge pull request #2114 from GrabzIt/master
Update to Cef Version 59.0.0
2017-10-07 08:16:54 +01:00