439 Commits

Author SHA1 Message Date
Igor efdf9aa8d4 Add OSR AccessiblityHandler. (#2480)
* Add AccessibilityHander.

Implement CefAccessibilityHandler. Add IAccessibilityHandler interface. Add AccessibilityHandler field to IWebBrowser.

* Pull request fixes.

Replaces tabs with spaces; move CefAccessibilityHandler implementation to RenderClientAdapter; add missing comments.

* Add CefValueWrapper.

Add ICefValue interface; pass ICefValue to IAccessibilityHandler.

* Pull request fixes.

Rename CefValue to Value and CefValueType to ValueType; add CefValueWrapper::GetObject() method; remove stub code in AccessibilityHandler; fix comment on IAccessibilityHandler.

* Pull request fixes.

Fix comments for IValue; remove redundant global namespace reference for CefValueType.
2018-08-23 19:36:37 +10:00
amaitland 1d73f7cd34 WPF - Revert unnecessary formatting changes from #2474 2018-08-05 20:00:06 +10:00
alfein 1913ca7787 GetScreenInfo - Allow setting of Rect/AvaliableRect (#2474)
* added some code to send monitor information back to the cef

* reverted framework target change

* small cleanup.  Handling location changed of the window to force refresh screeninfo

* Fixed formatting of C++ code, added comments, removed code from samples

* removed extra white space
2018-08-05 20:00:04 +10:00
amaitland 366d3a898c WinForms/Wpf/OffScreen - Create specific CefSettings class for each version
- This is a breaking change as there is no common `CefSharp.CefSettings`, there is no `CefSharp.Wpf.CefSettings`, `CefSharp.WinForms.CefSettings` and `CefSharp.OffScreen.CefSettings`
 - Cef.Initialize has been removed, the `ChromiumWebBrowser` constructor will call the `Cef.Initialize` with the defaults for your flavour
 - CefSettings.FocusedNodeChangedEnabled has been moved to CefSharpSettings.FocusedNodeChangedEnabled

Resolves #2477
2018-08-02 10:48:42 +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 0f240f9510 Wpf Example - LifespanHandler Update comment to make it clear the code is experimental and incomplete 2018-07-29 19:50:15 +10:00
amaitland 1502a06eb6 BrowserSettings/CefSettings BackgroundColor xml doc updated
Also added Cef.ColorSetARGB helper function
2018-07-16 20:20:13 +10:00
amaitland 48bd8d5590 Add IRequestContextHandler.OnRequestContextInitialized
- Rename RequestContextHandler to CefRequestContextHandlerAdapter and move to internals
- Add missing RequestContextSettings.EnableNetSecurityExpiration
- Minor code cleanup
2018-07-10 20:21:46 +10:00
amaitland 709645a195 WPF Example - Remove commented out context menu code
Left over from when the built in wasn't working (it still only works partially) due to https://github.com/cefsharp/CefSharp/issues/1767
Improve comments and add links to make clearer
2018-07-09 20:04:41 +10:00
amaitland 41a6b837a0 Example projects - copy crash_reporter.cfg to bin folder 2018-07-06 07:54:34 +10:00
amaitland cf04ab4b2e WPF - Add basic JavascriptBindingStressTest command
Loads JSB test page and then reloads every 10 seconds
2018-06-30 15:40:57 +10:00
amaitland 90c5e71aeb WPF/OffScreen - Removed ViewRect and replaced with existing Rect (struct)
IRenderWebBrowser.GetViewRect didn't allow you to return the x and y coordinates

This is a breaking change
2018-06-27 19:54:41 +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 fdc7cc21d5 Upgrade to CEF 3.3359.1772.gd1df190 / Chromium 66.0.3359.117 2018-05-17 12:40:39 +10:00
amaitland 7d7b6d8d48 Example Projects - Upgrade to .Net 4.6
Remove the usage of TrySetResultAsync and replace with TaskCreationOptions.RunContinuationsAsynchronously
2018-05-13 13:07:14 +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 c1b89c62e9 WPF/OffScreen - Code cleanup and minor refactor
IRenderWebBrowser - Method naming now matches CEF, xmldoc updated to be more accurate

CefSharp.Wpf.ChromiumWebBrowser and CefSharp.OffScreen.ChromiumWebBrowser both updated as a result of IRenderWebBrowser changes
Should be minimal public API changes, should only require changes for those that are implementing their own rendering, who will have a major rewrite on their hands regardless of this.
2018-04-20 14:49:25 +10:00
amaitland 066f5a92b2 Upgrade to CEF 3.3325.1758.g9aea513 / Chromium 65.0.3325.181 2018-04-17 15:14:42 +10:00
Ondrej Medek 791c42cff3 Example LifespanHandler.OnAfterCreated fix eperimental code rare crash (#2354) 2018-04-13 20:00:25 +10:00
amaitland 1a3dc5b7a9 Example Projects - Add Microsoft.Net.Compilers Nuget package
Adding Microsoft.Net.Compilers so we can use C#7+ syntax in the example projects.
Will limit to the example projects for now.

For anyone using VS2015, you should still be able to compile, just intellisense won't like the new keywords and syntax
2018-04-05 12:41:10 +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
amaitland be50b75648 JSB - Wpf.Example update to use ResolveObject method for testing fix for #2273 2018-02-13 12:55:01 +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 5bd240c269 Fix nuget package mistakes Examples Projects and Test project
Slightly modified packages and reused the same version number which caused some problems
(Manually fixed package references)
2018-01-23 22:11:46 +10:00
amaitland ecbbced91b Example projects update app.manifest version number 2018-01-23 09:24:21 +10:00
amaitland e47157f195 WPF Example - Add LegacyBinding options and some better comments 2018-01-22 12:33:48 +10:00
amaitland fd64b079a2 IJavascriptObjectRepository.ObjectBoundInJavascript - Fix bug and add example 2018-01-22 12:19:51 +10:00
amaitland 679cdb5b11 JSB ResolveObject WcfEnabled = false throw exception if attempt to register sync object
Update the examples to use newer Register method as Legacy options is disabled by default
2018-01-22 11:02:23 +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 7128ef11aa WPF Example - windowInfo.SetAsWindowless no only takes a single param (remove transparency param as that's now set via backgroundcolor) 2018-01-18 15:06:01 +10:00
amaitland 127c00554f Rewrite WPF/OffScreen OnPaint
OffScreen
  - Now maintains a raw Byte[] buffer that is used to create the GDI bitmaps
can be overridden and raw buffer access granted (eliminates the forced memory copy to the memory mapped view)

WPF
  - MemoryMappedFile.CreateNew is now used to create the in memory view and copy the buffer
  - InteropBitmapFactory only create new MemoryMappedFile selectively. If the MemoryMappedFile is larger than we require then just reuse it rather than
    releasing then allocating a smaller section of memory that's used for double buffering with InteropBitmap and WritableBitmap
  - Removed CefDirtyRect and used existing Rect class
  - Rename rendering event to Paint, still preferable to implement IBitmapFactory or subclass ChromiumWebBrowser
  - Update ChromiumWebBrowserWithScreenshotSupport to support new rendering method - not very well tested.

Resolves #2237
2018-01-18 11:29:12 +10:00
amaitland 0032ae463f WPF Example - update MenuHandler to implement custom menu, execute command based on CefMenuCommand enum rather than trying to use IRunContextMenuCallback which isn't working (upstream issue)
This is a workaround for #1767
You can use the default CEF menu it does however require you to integrate CEF into your main message loop see #1795
2018-01-18 10:25:50 +10:00
amaitland 55fb0350a6 WPF Example - Add ChromiumWebBrowserWithScreenshotSupport example - adapted from https://github.com/cefsharp/CefSharp/pull/462/
When screenshot is requested then rendering to the screen is temp disabled, browser is resized and frames are used to take the screenshot
2018-01-18 10:25:49 +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 921ea55fff Add IDisplayHandler.OnAutoResize, IBrowserHost.SetAccessibilityState, IBrowserHost.SetAutoResizeEnabled
Wrappers for new methods/callback added
2017-12-21 08:53:56 +10:00
amaitland 464dd14b6f Update Example RequestHandler to inherit from DefaultRequestHandler
A new default implementation was added in #2157
BrowserTabView - cleanup usings and remove unused code
2017-12-20 10:01:34 +10:00
amaitland da898cc93b RequestContextHandler - Add CookieManager type checking
Type check that ICookieManager is of type CookieManager, not currently possible to provide a custom implementation.
Changes in response to #2189
2017-12-20 09:52:01 +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 fb5a0bb9ac Removed EnsureNuGetPackageBuildImports 2017-10-06 08:08:31 +01:00
GrabzIt 2f680f01b7 Updated version 59.0.0 to latest build 3.3071.1649 2017-08-18 20:37:41 +01:00
GrabzIt 08444fe035 Updated to version 59.0.0 2017-08-18 16:07:03 +01:00