60 Commits

Author SHA1 Message Date
Alex Maitland 44fdfa94c8 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 11:33:09 +10:00
Justin Stenning 2298ea0a93 Implementation of Cef.RegisterWidevineCdm (#1935)
* Added Cef.RegisterWidevineCdm for CEF Widevine CDM registration #1934
* Added test page for WidevineCdm registration and example registration #1934
* Noted additional steps for Widevine and proprietary codecs to CdmSupportTest.html
* Link for more information changed to issue #1934 in CefExample.cs
* replaced Cef.RegisterCdmCallback's async result with IRegisterCdmCallback parameter
* RegisterCdmCallback now uses taskCompletionSource
2017-02-13 15:37:55 +10:00
Philip Beber b47731de5e Added DownloadItem .OriginalUrl (#1877)
* Added "OriginalUrl" property to DownloadItem which wraps "GetOriginalUrl" in CEF.

Added a sidebar to the example app which shows the DownloadItems as received by CefSharp.Core/Internals/TypeConversion.h

Added a View menu for hiding/showing the regular sidebar and the new download info sidebar.

* Pull request feedback
2016-12-04 22:26:49 +10:00
amaitland 23b8e1c14a WPF Example - Add Zoom out to menu 2016-10-24 09:36:02 +10:00
amaitland cb53751729 Add ZoomIn, ZoomRest command to WPF Example 2016-08-31 09:16:33 +10:00
amaitland 6f6ecd3090 Add TooltipTestUrl to WPF Example menu 2016-06-29 12:05:19 +10:00
amaitland ad71cf547f Add ShowDevtools menu item to WPF example 2016-04-19 14:52:52 +10:00
amaitland 4c4eb210f4 Add WPF Draggable Regions Test
Remove old generic DragHandler - maybe someone will write a WinForms specific one?
Remove some unused references from CefSharp.csproj
2016-04-12 16:57:47 +10:00
amaitland f238b2bf50 Add Filter test url to WPF Example 2016-02-11 11:33:44 +10:00
amaitland 98959d8f06 Basic example Load Request with post data has been added to the WPF Example 2015-11-29 07:59:04 +10:00
amaitland ad9f7c70ac Add IPluginHandler.OnBeforePluginLoad
Can now be used through the RequestContext
Add Example to WPF application
2015-10-12 15:32:10 +10:00
amaitland 9a7f427c29 Simplify WPF example opening of test Url's
(Should be very easy to add new Url's now)
2015-09-28 19:07:43 +10:00
David Serfozo 021f6eb715 added printtopdf example 2015-09-19 12:33:50 +02:00
amaitland 3fac742403 Demo Post data for #1267 2015-09-16 16:01:48 +10:00
amaitland 561b50b2cd Register the same scheme twice to confirm parsing of command line arguments
Fix up some urls in the custom scheme popup test
Add PopupTest.html to WPF example menu
2015-09-16 09:05:52 +10:00
amaitland dac6030a81 Add DragDemo to WPF tests menu 2015-08-26 15:27:30 +10:00
amaitland c46807f100 Add some more demo examples to WPF example project 2015-08-12 09:25:37 +10:00
amaitland a017837320 Simplify Menu command bindings in WPF example 2015-08-12 09:18:30 +10:00
amaitland 39bc589991 Add w3school url to WPF example 2015-07-28 17:26:34 +10:00
amaitland 7a940a9617 Add Open Plugins tab in the WPF example
Add system-enable-flash example to enable PPAPI otherwise it's disabled
2015-07-23 19:18:07 +10:00
amaitland 249c09c583 Add menu to WPF example
Can now easily open binding test example
TODO: Import tests from cefclient example
2015-07-09 12:21:59 +10:00
Per Lundberg f7e5b56f16 Add some margin between the X and the title. 2014-04-30 23:39:49 +03:00
Per Lundberg 991e442712 Less whitespace to the people. 2014-04-30 23:39:37 +03:00
Per Lundberg 86e928add2 Added an ItemTemplate with a Close button. 2014-04-30 23:33:02 +03:00
Per Lundberg ebba8df329 Ah, apparently I missed these ones earlier. The downside of trying to be minimalistic I guess. ;) 2014-04-30 23:32:25 +03:00
Per Lundberg 23864d64a6 We also need a ContentTemplate, so we display stuff appropriately. 2014-04-30 23:31:34 +03:00
Per Lundberg b745f7bf13 Set up bindings for Ctrl+T and Ctrl+W, to Open and Close tabs respectively. 2014-04-30 23:30:47 +03:00
Per Lundberg 8d0974880f Cleaned up the way we used the tab, by binding to a collection of BrowserTabViewModels instead. We could clean this up even further by moving stuff out from MainWindow to a MainView & MainViewModel (to achieve a fully code-behind-free approach), but let’s start with this. :) Similarly, based on @amaitland’s changes, only splitting them more aggressively. 2014-04-30 23:29:41 +03:00
Per Lundberg fd20a062dc #212: Why not go ahead and make a proper tabbed browser while we're at it... :) 2014-03-21 23:47:30 +02:00
Per Lundberg 271eb2c277 Fixed the tab titles to be data-bound to the title of the web page they are displaying. 2014-03-15 22:27:01 +02:00
Per Lundberg caeac08cfa Let's start working towards a "tabbed browser" instead of the OneBrowser/ManyBrowser approach. 2014-03-15 22:16:59 +02:00
JanEggers b4201d1971 extended samples to show multiple instances work 2014-02-24 07:50:05 +01:00
Per Lundberg 1e06907f2d Start up in maximized mode by default. 2013-10-27 10:58:16 +02:00
Per Lundberg ea18663cc8 …and centering the window also looks a bit nicer. 2013-08-03 23:40:19 +03:00
Per Lundberg 73787825fb Let's try to do things in a more MVVM-orthodox way. This is one of the first steps on a quite long journey I believe… The previous CefSharp.Wpf.Example was (in my opinion) slightly badly designed in that it too much tried to "reuse" code between the WPF and WinForms examples. Now, this is good from a CefSharp maintainability standpoint, but it really means that you will "dumb down" the WPF one in a way that feels very unnatural to me. WPF is WPF and should be done in a certain way (to take advantage of the platform), and WinForms is an entirely different beast. So, I feel that it is very much OK if these sample apps diverge much more, so that we demonstrate CefSharp usage in a more realistic, close-to-real-life way than has been the case before. 2013-07-28 22:45:28 +03:00
Per Lundberg 709fa1237f Whitespace? 2013-07-24 10:04:15 +03:00
Per Lundberg e974c3ed7f …and use more opacity. 2013-07-24 10:03:55 +03:00
Per Lundberg ba0c078abc Make the window a bit bigger by default. 2013-07-24 10:03:29 +03:00
Per Lundberg 3e778a0803 Disabled stuff which isn't working properly at the moment, and made the URL textbox at least *display* the current URL being browsed to... 2013-07-24 10:03:02 +03:00
Per Lundberg c87e218f90 Started working on getting the actual painting to work. It now works, but only in a fixed-size region. :) Need to discuss a bit with the CEF guys on how to do this properly I think... 2013-07-23 19:30:53 +03:00
Per Lundberg c25c908a15 Just for fun… :-) Let's add an opacity slider also, with a subtle message in it. 2013-07-01 23:19:07 +03:00
Per Lundberg fa9a6e6d62 One XAML attribute per line is generally much better, especially when doing diff/merge operations. 2013-07-01 23:05:30 +03:00
Per Lundberg a9c35f843b Uncomment the usage of the WebView now that it works again. 2013-06-05 11:28:09 +03:00
Per Lundberg 0c3115288f WIP code, trying to figure out why we get a weird TypeLoadException... 2013-06-05 11:28:08 +03:00
Per Lundberg a90b103a07 Uncomment the usage of the WebView now that it works again. 2013-05-01 23:28:03 +03:00
Per Lundberg bf5894af52 WIP code, trying to figure out why we get a weird TypeLoadException... 2013-05-01 20:36:54 +03:00
anthony taranto d8848c70c5 add cookie visitor test to example/test menu 2012-07-30 19:34:57 -07:00
anthony taranto 117bf84dba Merge branch 'dev'
Conflicts:
	CefSharp.WinForms.Example/Browser.Designer.cs
2012-03-21 17:44:53 -07:00
anthony taranto 66bf4604bf add show/close dev tools to each example app 2012-03-19 18:18:25 -07:00
anthony taranto c58f7574ae MainWindow.xaml: remove unused bookmarks menu 2012-03-19 18:10:26 -07:00