Commit Graph

160 Commits

Author SHA1 Message Date
Alex Maitland 0ab5d1a08b IDownloadHandler.OnBeforeDownload now returns boolean
Return true and execute callback either
asynchronously or in this method to continue or cancel the download.
Return false to proceed with default handling (cancel with Alloy style,
download shelf with Chrome style).
2024-05-06 10:28:35 +10:00
Alex Maitland b26cb077e3 WPF - Fixed Html Dropdown positioning when near bottom of screen (Cleanup) (#4759)
* WPF - Popup Mouse Transform

- Refactor and performance improvements
- WPF Example - Enable popup transform by default

Issue #2820
2024-03-16 08:03:16 +10:00
Alex Maitland 90c31b4490 WPF Example - Implement Material Design (#4446)
* WPF Example - Improve layout/design using MaterialDesignInXamlToolkit

- Some very basic UI improvements using MaterialDesignInXamlToolkit
2023-04-02 11:46:00 +10:00
Alex Maitland 824ba98c6f WPF - Experimental LifeSpanHandler optional LifespanHandler constructor arg
Resolves #4285
2022-11-14 14:16:16 +10:00
Alex Maitland ec8e3405bd WPF - Add Experimental LifeSpanHandler capable of hosting pop-ups as Tabs/Controls
Issue #4285
2022-10-25 15:51:35 +10:00
Alex Maitland a5c9a66832 Example - Rename PermissionHandlerExample to ExamplePermissionHandler
- Matches other examples
- Minor changes
2022-08-08 15:41:45 +10:00
Алексей f92687b7cc Core - Add support PermissonHandler
https://bitbucket.org/chromiumembedded/cef/issues/3352/add-cefpermissionhandler-callback-for-the
2022-08-08 13:59:32 +10:00
Alex Maitland b4c4913b35 Core - Add IDownloadHandler.CanDownload
- Add IDownloadHandler.CanDownload
- Add to Fluent implementation
- Update examples

https://bitbucket.org/chromiumembedded/cef/commits/6d7a6801871cd4fcceb174dfa99a5b46da6253c1

Resolves #4090
2022-05-05 12:40:33 +10:00
Alex Maitland df8a6086a6 WPF Example - Add JsDialogHandler that uses custom WPF implementation 2022-05-04 10:36:51 +10:00
Santosh M Ghanti 9e0236876c Sync Javascript Binding - Add support for property interception (#3935)
* Core - added support for property interceptor

* Incorporated the review comments

* Incorporated the review comments 2

* Review comments exclude trygetproperty and trysetproperty for .netcore app

* Added the unit test cases for trygetproperty and trysetproperty

* Fixed .net core app build failure

* Added the separate test case for property interceptor

Co-authored-by: sghanti <santosh_ghanti@intuit.com>
2022-02-14 13:58:35 +10:00
Alex Maitland 6f0f20f3b2 DevTools - Add SetMainFrameDocumentContentAsync extension method
- Updated example error handlers to use SetMainFrameDocumentContentAsync for displaying error messages
  so back/forward navigation works correctly.
- DevToolsExtensions updated to use IChromiumWebBrowserBase instead of IWebBrowser so they're usable
  for WinForms hosted popups

Issue #2985
2022-01-05 10:09:56 +10:00
Alex Maitland 8160ec1ce4 Remove IRequestContextHandler.OnBeforePluginLoad and IRequestContext.PurgePluginListCache
Resolves #3924
2021-12-07 14:54:11 +10:00
Alex Maitland 6ce9958d2d WPF - Add System.Windows.Controls.ContextMenu based ContextMenuHandler (#3815)
* WPF - Add System.Windows.Controls.ContextMenu based ContextMenuHandler

Based of https://github.com/chromiumembedded/cef/blob/ba46b8c53ed0f46cec82a1aebaec173784deb6e4/libcef/browser/menu_manager.cc#L385

* Add model class instead of passing in params
2021-09-23 13:43:28 +10:00
ValentinNikin d0bdc735eb Updated example for Audio Handler (#3724)
* Implemented example for Audio Handler

* Rename AudioHandlerExample to AudioHandler

* Allow unsafe code

* Remove UnmanagedMemoryStream using

* Fix problem with build

* Allow unsafe code for .NET Core project

* Remove excess PropertyGroup

Co-authored-by: Valentin Nikin <nikin.v@tecomgroup.ru>
2021-07-31 06:30:59 +10:00
Alex Maitland 37231bcd9b WPF Example - Add namespace qualifier to WpfImeKeyboardHandler
Use the full namespace instead to make it clearer (technically the partial namespace prefix will work).

Replaces #3607
2021-07-22 10:40:43 +10:00
Alex Maitland 842429a76e WPF Example - Implement DisplayHandler.OnFullscreenModeChange
- Use the new CefSharp.Handler.DisplayHandler base class
- Update xaml so ChromiumWebBrowser has direct reference to DataContext
- When fullscreen create new window and move the browser, move back when exit fullscreen
2021-05-16 16:28:29 +10:00
Alex Maitland a48cf807e6 WPF - Allow setting Focus before the underlying browser has been initialized.
- Remove hacks from the ViewModel as Focus can now be set on Go().
- Creating a new viewmodel also sets focus

Changing tabs doesn't set focus currently.
2021-05-10 15:39:32 +10:00
amaitland da8ad192a4 WPF - Add Experimental Accessibility Handler 2020-07-27 20:32:24 +10:00
Justin D'Arcangelo e834d89518 Fix Issue #2053 - Add accessibility support for WPF 2020-07-27 20:32:24 +10:00
amaitland e8cf336bf3 Net Core - Support for compiling with .Net Core 3.1
- Make Wpf/WinForms/OffScreen projects target AnyCPU
Only the VC++ projects are platform specific now.
- Remove BrowserSubProcess project reference
Not needed as we now have a standalone exe
- Add OffScreen example
- Add WPF Example project
- Fix some compile errors for main solution
- Add BrowserSubProcess executable
- JavascriptObjectRepository remove isAsync param
Rather than throw exception remove the option
- BrowserSubprocess Exclude the WCF specific code from the netCore project
- Add some ifdef/ifndef to exclude the WCF specific implementation
- Move WCF implementation into separate namespace
2020-07-23 15:23:45 +10:00
Roh yeon jin f9acbdfde5 WPF - IME Transparent Text Background (#3143)
* The background color of ime text has been changed to transparent.

* added static methods on imehandler for set background color or underline color through wpfimekeyboardhandler constructor.

* changed codes for a pull request

* removed unused a method

* clean up codes

Co-authored-by: 노연진(Roh Yeonjin)(nyjin) <nyjin@ncsoft.com>
2020-07-23 15:01:25 +10:00
Alex Maitland 8d25b71490 Core - Re-Add IAudioHandler (#3153)
Resolves #3152
2020-07-08 08:06:16 +10:00
amaitland ae41e10d71 Core - Javascript Binding Configure Property Name
- Rename settings object to JavascriptBindingSettings
- Validate JavascriptBindingSettings.JsBindingGlobalObjectName in setter to provide immediate
  feedback
- Add FreezableBase which throws exception when frozen (we can reuse this for some other settings classes)
- Add some basic Unit Tests (More would be better)

Follow on from #3126
2020-05-30 19:28:50 +10:00
amaitland ae17525092 WPF Example - Can now run LegacyBindingTest from menu without code change
It's a bit of a hack at this point, have to read the property from the DataContext.
Need to work on a clean binding solution

Issue #2977
2020-05-23 20:08:51 +10:00
amaitland 0d399e6fd4 WPF Example - Update EvaluateJavascriptTextBox to simple js example
Use 1 + 1 as a simple example

Objects aren't bound on the home page so the old script would fail to execute.
2020-04-29 08:07:33 +10:00
amaitland 0f22224c37 WPF Example - Readd Legacy Binding
if CefSharpSettings.LegacyJavascriptBindingEnabled then register bound and boundAsync objects
2020-04-28 20:54:22 +10:00
amaitland cb429ce9bf WPF - Improve ToolTip Text Wrapping
When no ToolTip style is defined we'll use a TextBlock to wrap the text so it's
usable by default. If a style is applied then we leave it up to user.

Resolves #2488
2020-04-08 16:43:47 +10:00
amaitland 344a9297dd Examples - Update ResourceHandler.GetMimeType to Cef.GetMimeType
Transition away from our incomplete implementation to using the Chromium mapping

Issue #3041
2020-03-26 08:50:07 +10:00
amaitland ffaff5d151 Core - Remove WebBrowserExtensions.RegisterJsObject and WebBrowserExtensions.RegisterAsyncJsObject
This is a breaking change, these methods are being removed as they are used for LegacyBinding which is being drastically changed in #2977

Resolves #2990
2019-12-11 10:08:08 +10:00
amaitland 802bb7f43c Remove IAudioHandler
The Chromium implementation has changed so dramatically that CEF has removed support see https://bitbucket.org/chromiumembedded/cef/commits/1f893c76a97eaa88e3ff782b8e2e47dd0f5d27b2

Track https://bitbucket.org/chromiumembedded/cef/issues/2755/reimplement-audio-mirroring-for for details on when it will be reimplemented

Original Issue #2727
2019-10-01 20:06:37 +10:00
amaitland 07880f0074 WPF Example - Improve demo of hosting popup in ChromiumWebBrowser instance
- LifespanHandler renamed to ExperimentalLifespanHandler to make it clear the feature is experimental
- Add additional check for devtools popup
2019-08-12 12:03:52 +10:00
amaitland 4183b464d1 WPF/WinForms Example - Allow mailto to trigger OnProtocolExecution
- When Url starts with mailto then use our ExampleResourceRequestHandler
- Ignore unknown scheme errors when it's mailto, we expect that it's unknown
- WPF Example remove duplicate OnLoadError in BrowserTabViewModel
2019-07-10 20:47:55 +10:00
amaitland 7e084f7439 WPF Example - Register cefsharp.example scheme handler factory
Example is commented out
2019-07-04 10:43:38 +10:00
amaitland 7e731b0fa9 Code Cleanup - Rename DefaultRequestHandler to RequestHandler
Also renamed CefSharp.Example.Handlers.RequestHandler to CefSharp.Example.Handlers.ExampleRequestHandler

Will Add in Obsolete DefaultRequestHandler
2019-06-25 19:24:57 +10:00
Alex Maitland 1a2c8ffcb6 Add CefSharp.PostMessage (#2799)
- JavascriptMessageReceived event added to ChromiumWebBrowser/IWebBrowser
- CefSharp.PostMessage and cefSharp.postMessage added to V8Context on creation for use in Javascript
- Add PostMessageTest.html
2019-06-03 21:08:03 +10:00
Alex Maitland 76e5a8d5c0 Add IAudioHandler (#2727)
* Feature Request - Add IAudioHandler

- For performance reasons we return NULL if no audiohandler is assigned
- No example is provided currently

Initial implementation for #2714
2019-05-03 12:54:40 +10:00
amaitland 6f6ca94ea9 WPF Example - Change to using DataUri (LoadHtml extension method) for showing errors instead of LoadString
- Add new IFrame.LoadHtml extension method.

Related `upstream` issue is https://bitbucket.org/chromiumembedded/cef/issues/2586/loadstring-results-in-terminating-renderer
2019-02-08 10:42:15 +10:00
amaitland 4f71295941 CefSharp.Example - Move example classes into handlers/javascriptbinding folders/namespaces
Basic code cleanup
2018-10-29 16:21:42 +10:00
Chris 30ee538ce0 Added EditorConfig (#2514) 2018-09-17 00:46:21 +02: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 c7c98a4551 WPF Example - Readd EvaluateJavaScriptResult which was accidentally removed 2018-08-23 13:56:25 +10:00
Igor 0ede12e7ba 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-16 19:33:02 +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 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 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 c37dbcd06a Remove Geolocation API and Upgrade version numbers to 65 2018-03-17 21:31:25 +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 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