Commit Graph

127 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 c37dbcd06a Remove Geolocation API and Upgrade version numbers to 65 2018-03-17 21:31:25 +10:00
amaitland f67ff89e44 Geolocation - Mark as obsolete/deprecated
See #2293 for details
2018-03-05 16:34:35 +10:00
amaitland 91da9ea8a4 JSB - Improve xmldoc for IJavascriptObjectRepository 2018-02-07 12:55:40 +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 d585348887 Add RequestContext getter property to IWebBrowser
WPF - Add checks so if RequestContext is set after browser created an exception is thrown
WinForms - Add checks so if RequestContext is set after browser created an exception is thrown
2017-12-20 12:26:49 +10:00
amaitland eecf3aded9 Add IWebBrowser.CanExecuteJavascriptInMainFrame property, set to true/false when V8Context is created/released
Added checks in the execute/eval javscript methods in WebBrowserExtensions
Made possibly by the addition of OnContextReleased IPC message being added
2017-03-28 09:43:59 +10:00
Chris cd934267c6 Updated copyright year and made sure it used same format everywhere (#1966) 2017-03-06 08:44:37 +10:00
Kevin Driedger 11dee93bf3 Fix spelling error (#1) (#1797) 2016-09-13 16:57:02 -05:00
Alex Maitland d4feffb554 Feature - Add IBinder (#1749)
* Add basic ModelBinding which was imported from NancyFx framework - more can be stripped out that's unused

* Add IBinder as a param when registering an object for binding
Binding is disabled by default

* Add license and remove unused using statements

* Make bind method virtual to allow for overriding
Make methods protected

* Add very basic collection support - only primitive types supported for now.
Remove unused exceptions

* Support binding a list of sub objects

* Add null check for null params

* Add BindingOptions class - remove binder and CamelCaseJavascriptNames properties - allow for additional options in the future
Breaking change.

* Add support for List<object> binding type
2016-07-20 13:38:24 +10:00
amaitland 933bad3dcc Add a more detailed description of what thread events are executed on
Should be enough to generate some meaningful API docs now
2016-06-15 14:14:39 +10:00
amaitland afe758eb51 Use GhostDoc to generate bulk xml documentation - it's not perfect at least a lot of the interface doco has been copied into the
ChromiumWebBrowser instance classes
2016-06-15 13:44:16 +10:00
amaitland 98e8e1812f Add some remarks to FrameLoadStart about executing javascript 2016-04-15 12:05:50 +10:00
amaitland af457916e3 Implement IFindHandler
Resolves #1459
2016-03-07 12:44:49 +10:00
amaitland bae3c28e92 Update copyright to 2016 2016-01-11 14:11:30 +10:00
Rich McNeary 7d4e074ef4 Move OnFocusedNodeChanged into new IRenderProcessMessageHandler. 2015-12-08 09:32:54 -05:00
amaitland 4a66273d8e Add notes about CefLoadHandler methods/events being called on the CEF UI thread and that blocking is not advised. 2015-10-18 08:15:48 +10:00
amaitland 45e5da8d7b Remove obsolete methods 2015-09-01 22:49:17 +10:00
amaitland 29e6bc7571 Rename IMenuHandler to IContextMenuHandler 2015-08-17 13:42:44 +10:00
amaitland 41acea55d3 Add ILoadHandler to directly expose CefLoadHandler interface
Rather than have a complex set of rules where some methods were handled via IPopupHandler and others weren't
It's just a basic wrapper around CEF now with the internal event handlers only being called if it's not a popup
2015-08-17 11:54:40 +10:00
amaitland bb3103e1c2 Rename IPopupHandler to IDisplayHandler 2015-08-17 11:23:21 +10:00
amaitland 2368115c61 Make CanReload as Obsolete - use IsLoading instead 2015-08-13 21:39:19 +10:00
amaitland 77c11c3ad0 Move Title property from IWebBrowser to IWpfWebBrowser (not really required for WinForms and OffScreen)
TitleChanged EventHandler is now the best way to access these for WinForms and OffScreen
2015-08-13 21:36:18 +10:00
cefsharp-ms 70827bbe1e updated comment on new IWebBrowser method 2015-07-31 17:17:10 +02:00
cefsharp-ms a99e020138 added option to register async js objects with only method bindings 2015-07-23 15:10:28 +02:00
amaitland df94d54a61 Remove duplicate GetMainFrame and GetFocusedFrame methods - turned them into extensions 2015-07-01 19:49:27 +10:00
amaitland f239503bb3 Move SendMouseWheelEvent to IBrowserHost 2015-07-01 19:38:14 +10:00
amaitland 819dfd54f9 Move WcfEnabled option into CefSharpSettings class
Reduce code duplication - move EvaluateScriptAsync in WebBrowserExtensions
2015-06-29 13:20:47 +10:00
amaitland d394124b3a Move public facing CefBrowserHost methods into extension methods that use the IBrowserHost wrapper 2015-05-29 11:23:25 +10:00
amaitland 67d57c96a0 Move Stop/Back/Forward methods into WebBrowserExtensions 2015-05-28 20:20:32 +10:00
amaitland c0e79c20b0 Add GetBrowser methods to get direct access to the underlying CefBrowser instance 2015-05-28 20:08:56 +10:00
amaitland 71f783ddda Remove extra /// from xml comment 2015-05-28 20:02:03 +10:00
amaitland d37dd2d2ef Move LoadHtml into an extension method 2015-05-27 16:18:28 +10:00
amaitland 1a1fcb9f2e Make the next set of frame related methods into extension methods 2015-05-21 19:12:14 +10:00
amaitland 4763020b9d Add GetMainFrame and GetFocusedFrame to IWebBrowser 2015-05-21 18:38:33 +10:00
Bill Tutt adb5ae0d77 More work on wrapping CefBrowser/CefFrame. 2015-05-17 17:41:44 -04:00
amaitland 05d7860cb2 Update IWebBrowser xml doco for Get/Set ZoomLevel 2015-04-28 10:52:48 +10:00
rassilon fdd5508467 Continue the TaskScheduler items:
* Replace IWebBrowser.ZoomLevel property with:
   GetZoomLevelAsync(), and SetZoomLevel().
2015-04-27 18:20:32 -04:00
rassilon 7128e40fd1 It's time for copyright updates again. Yay!
Throw in a couple of tab containing files for good measure.
Evil tabs, evil I say.
2015-04-25 02:45:21 -04:00
amaitland c66b28a645 Merge remote-tracking branch 'remotes/upstream/master' into cef/2272 2015-04-21 11:54:56 +10:00
amaitland 39c8194b49 rename lowerCaseJavascriptNames to camelCaseJavascriptNames - more accurate description of what's going on 2015-04-16 16:31:54 +10:00
amaitland 4b3ee2a9a0 Merge remote-tracking branch 'remotes/upstream/master' into cef/2272 2015-04-10 16:22:57 +10:00
amaitland d55ea0c90e Rename NavStateChanged to LoadingStateChanged 2015-04-08 11:09:37 +10:00
amaitland 89b02583e8 Remove method overloads and use optional param instead 2015-04-07 20:30:15 +10:00
rassilon 9ebe4fcdc2 Hopefully the last of the IDE overzealous comment renaming. 2015-03-03 01:44:19 -05:00
rassilon a04d3c6eb8 Rename IResourceHandler to IResourceHandlerFactory. 2015-03-02 23:08:04 -05:00
pushplay aba800a9c3 Implement CefGeolocationHandler::OnRequestGeolocationPermission delegating the request to a CefSharp.IGeolocationHandler implementation. This allows CefSharp to permit geolocation requests. 2015-01-26 14:16:46 -08:00
amaitland c0cdae9ee3 Improve LoadHtml comment, include a valid example of the url param 2015-01-09 20:59:31 +10:00
amaitland d3d8d53e15 Merge remote-tracking branch 'remotes/upstream/master' into cef/2171 2014-12-16 19:27:13 +10:00
amaitland c6a387e592 Add LoadHtml overrides with Encoding param (default is UTF-8) 2014-12-16 10:48:16 +10:00