Commit Graph

99 Commits

Author SHA1 Message Date
Konstantin Preißer 5e89f71a44 Add new projects targeting .NET Core 3.1 (#3181)
* Add .NET Core 3.1 projects for CefSharp, CefSharp.Core, CefSharp.BrowserSubprocess.Core, CefSharp.WinForms, CefSharp.Wpf, CefSharp.OffScreen.

Contributes to CefSharp#2796

* - Remove dependencies to "opengl32.lib" and "glu32.lib" which aren't available for ARM64 and don't seem to be needed.
- Clean up project files.

* Switch project CefSharp.netcore.csproj to AnyCPU as it doesn't require different builds for each platform.

* Remove WindowsTargetPlatformVersion property as that is declared in CefSharp.props.

* Use "bin.netcore" and "obj.netcore" as [intermediate] output path for the .NET Core projects, to allow side-by-side builds with the .NET Framework projects.

* Output documentation files.

* Add CefSharp.Example.netcore and CefSharp.WinForms.Example.netcore.

* Follow-up: Remove properties from the example projects that are also not used in the corresponding .NET Framework projects.
2020-07-23 15:21:14 +10:00
amaitland 7980c30478 WinForms Example - Minor changes to DevTools docked example
- Add/revise comments
- Rename some variables

Follow up to #2804
2019-08-14 11:11:10 +10:00
Luke 1992e4970c WinForms - Add example of how to dock devtools into the same window. (#2804)
* Add a SplitContainer as the base UI panel and place the browserPanel in Panel1 and new devToolsPanel in Panel2.
Create two new public methods to open and close the devtools.

* BrowserForm - Changed the Show/Close devtools to call the new methods in the BrowserTabUserControl. If the LifeHandler is null, normal behaviour is assumed.

* Handle the DoClose event in LifeSpanHandler if the IBrowserHost.CloseDevTools() is called directly. This is more of a fail-safe, if the normal CEF behaviour is allowed then entire application will close.

* Added some addtional comments.

* Uncomment the instantiation of the LifeSpanHandler

* Removed devToolsPanel from designer
Removed CloseDevToolsDocked() method
Made ShowDevToolsDocked() method easier to copy and paste
Closing Devtools should now be handled in LifeSpanHandler.DoClose()
Added a bool to the LifeSpanHandler constructor whether to handle Browser popups.
Added Toolscript menu item to show DevTools Docked or Popup
Added async Method to check it DevTools is open

* Changed field access modifier to private

* Renamed dispose devtools handler with a more meaningful name
2019-08-14 10:16:21 +10:00
amaitland 581c4e8aee WinForms Example - Add Javascript binding stress test
Port of the WPF example
2019-07-03 20:40:25 +10:00
amaitland 302f5b2c83 WinForms Example - Improve Cef.DoMessageLoopWork examples
Change WinFormsBrowserProcessHandler to use a WinForms timer so it's Diposed when the Form is
switch it to using 60fps
2019-06-02 20:35:31 +10:00
amaitland c004a68c79 RequestContext.cpp - LoadExtension resolve issues with CefPostTask
For the x86 version we define and undefine CEF_INCLUDE_BASE_INTERNAL_CEF_BIND_INTERNAL_WIN_H_
as the /clr compliation option attempts to be helpful and convers all the __fastcall versions
to __stdcall which already exist, so we just use the standard calling convention and ignore
the optimised ones. The original error is
warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall'
(compiling source file RequestContext.cpp)
2019-01-10 17:22:01 +10:00
Alex Maitland 02e3084af3 Add Chromium Extension Support (#2613)
* Add Chromium Extension Support

Add IRequestContext.LoadExtension
Add IExtensionHandler
Add IExtension
Add example (import from cefclient) - was added to CefSharp.WinForms.Example projct
Add RequestContextExtensions - to make loading an extension slightly easier
2018-12-31 13:12:10 +10:00
amaitland 2612c68002 Add IBrowserHost.RunFileDialog
Demo added to WinForms project

Resolves #2594
2018-12-28 13:39:33 +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 dd9ba1472e WinForms Example - Update LifeSpanHandler implementation to support closing Tabs vis window.close() javascript 2018-04-04 13:18:21 +10:00
amaitland fbce2d61de WinForms Example - Update LifeSpanHandler example to host popup in Tab (notify popup of move and resize) 2018-01-30 15:01:38 +10:00
Chris cd934267c6 Updated copyright year and made sure it used same format everywhere (#1966) 2017-03-06 08:44:37 +10:00
amaitland 20b1200010 WinForms Example - Add httpbin.org url to test menu 2017-02-24 09:02:04 +10:00
amaitland 01e7e6f3d7 Add LoadHtml extensions method - use data uri to load the html 2017-02-02 11:21:14 +10:00
amaitland 3f70d10538 Only hook into the Chromium message loop if we're using multiThreadedMessageLoop - no need if they're running in the same thread 2016-09-08 08:53:28 +10:00
amaitland 31b1dd97eb Winforms example - delay creation of the tab required for previous commit 2016-09-01 16:52:52 +10:00
amaitland 2c4f577820 Add experimental note about hosting devtools as a tab 2016-07-04 08:18:44 +10:00
amaitland a94bbdd593 Demo loading a base64 data encoded url 2016-05-28 07:24:14 +10:00
amaitland 7524a71332 Change task Status check - was a mistake before, wasn't checking for success, just that it finished. 2016-05-24 19:09:56 +10:00
amaitland b78e166340 Example below shows how to use a control to host DevTools (in this case it's added as a new TabPage) 2016-04-20 22:25:25 +10:00
amaitland ca074ab4f2 Add PrintToPdf example to WinForms example project 2016-04-12 12:39:38 +10:00
amaitland bae3c28e92 Update copyright to 2016 2016-01-11 14:11:30 +10:00
amaitland af05e56c12 Reformat inline js (use @ notation so much of the string encapsulation can be removed)
Make ScriptedMethods class static and convert the methods into extension methods (really just for the hell of it)
Make some of the comments a little less verbose in terms of number of lines
Some Resharper inspired simplifications
Other code reformatting to make consistent with other parts of the project (switch case statements should have braces, ContinueWith blocks reformatted to match others)
Untabify ScriptedMethodsTest.html
Remove unused usings from ScriptedMethods
Add a few comments about camelCaseJavascriptNames
2015-12-30 09:57:34 +10:00
Rich McNeary f1197acc78 Add menu to demonstrate javascript evaluation / execution. 2015-12-28 14:29:25 -05:00
Rich McNeary 5691669df3 Initial script examples. 2015-12-14 14:54:04 -05:00
amaitland fff0808693 Demo opening OnOpenUrlFromTab - rough example 2015-09-18 13:22:11 +10:00
rassilon 431cb511c3 * Move unmanged objects into finalizer and call finalizer from Dispose.
* Remove DisposableResources from ManagedCefBrowserAdapter
* Improve disposing of CefRequestWrapper
* Have callbacks dispose themselves.
* Allow the Application exit handler shutdown CEF from the Winforms example application.
2015-06-13 10:42:33 -04:00
amaitland 996661de60 Resharper inspired cleanup of BrowserForm - mostly remove redundant type arguments from anon delegates 2015-05-21 13:51:14 +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 b910a1f2fa Minor review cleanups. 2015-04-16 18:51:37 -04:00
rassilon 06e26f132d GetZoomLevel is required to be called from the UI thread, but it has a failure mode of just returning 0. Here's a cheesy temporary solution to adding a full on GetZoomLevelAsync method that returns a .Net task. 2015-04-16 15:15:01 -04:00
Sylvain Hamel b72f3b757c fix #553 by handling Initial resize and OnSizeChanged 2014-11-18 23:08:34 -05:00
amaitland f693fc2119 Add x64/x86 to WinForms Window Title 2014-10-27 11:17:33 +10:00
amaitland 53e6dcb95d Prevent window redraw when resizing as per http://stackoverflow.com/questions/2353381/prevent-window-redraw-when-resizing-c-sharp-windows-forms 2014-10-21 21:50:55 +10:00
amaitland 35d7fc6ea4 Make sure Close calls Cef.Shutdown() 2014-10-13 17:36:27 +10:00
amaitland a6bacdec55 Simplify setting of active tab
Conflicts:
	CefSharp.WinForms.Example/BrowserForm.cs
2014-10-13 17:36:27 +10:00
amaitland f6afe37214 Set tab index to current - 1 when closing a tab 2014-10-13 16:39:29 +10:00
amaitland 57f39701ba Attempt to get layout working properly - still has some problems better than before though 2014-10-13 16:31:22 +10:00
amaitland a59c83d0be Change to use build in devtools introduced in 1750 2014-10-13 15:43:33 +10:00
amaitland 8f7254e5ca Merge remote-tracking branch 'remotes/upstream/master' into feature/winforms-tabbed 2014-10-13 15:39:59 +10:00
amaitland a58b6086c7 First 1750 feature - ShowDevTools/CloseDevTools 2014-10-03 16:41:17 +10:00
amaitland 4f60818744 Add CloseDevTools option 2014-08-26 17:54:23 +10:00
amaitland c363a23b4e Show DevTools in panel 2014-08-26 17:46:46 +10:00
amaitland def3790d9a Show DevToolsUrl in browser tab next to currently active tab (still needs some work as layout doesn't update properly) 2014-08-25 17:19:08 +10:00
amaitland 43afa96acb Close main form when there are no remaining tabs 2014-08-25 16:54:44 +10:00
Adrian Phinney 96bdad96d4 Add StatusMessage examples for WPF/WinForms. 2014-08-12 09:25:33 -04:00
amaitland b7e29dacd0 Add print menu item 2014-07-01 12:05:50 +10:00
amaitland 60d53bca93 Implement Edit menu items 2014-07-01 12:05:50 +10:00
amaitland e9b35654c5 Add menu item stubs 2014-07-01 12:05:50 +10:00