54 Commits

Author SHA1 Message Date
Alex Maitland 8258102569 Core - Move OnCursorChange from CefRenderHandler to IDisplayHandler
Resolves #3275
2020-11-07 18:17:14 +10:00
amaitland 5b89eede06 WinForms Example - Remove dependency on CefSharp.WinForms.Internals.ControlExtensions.InvokeOnUiThreadIfRequired
Uses the extension method within the example now
2020-07-17 12:17:59 +10:00
amaitland fdc02076ce WinForms - Demo workaround for activation issue when showing two browser forms
When there are two forms that contain browser instances shown at the same time they rapidly switch between
the two windows.

Issue #2928
2019-10-29 19:26:50 +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 47b488061e ISelectClientCertificateCallback - Update xml doc, return null means no certificate selected.
Update WinForms Example to deal with user cancellation of certificate selection UI

Resolves #2853
2019-07-31 19:41:08 +10:00
amaitland 52ec00c486 Code cleanup - Rename IWebBrowser browserControl to chromiumWebBrowser
Hopefully this makes it clearer that the IWebBrowser instance is actually the ChromiumWebBrowser

Updated almost all instances, there's one WinForms example that wasn't updated
2019-07-20 16:26:25 +10:00
amaitland b68d8d7a8f RequestHandler - Change interface implementation to be explicit
- Make members protected virtual (BREAKING CHANGE)
- Remove Default from name of DefaultResourceRequestHandlerFactory/DefaultResourceRequestHandlerFactoryItem
2019-06-25 19:24:57 +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
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 13aefe1857 WinForms Example - Split BrowserProcessHandler out into two different examples
ScheduleMessagePumpBrowserProcessHandler - contains a simplistic message pump example
WinFormsBrowserProcessHandler - contains just a timer that calls Cef.DoMessageLoopWork

These are the two options for integrating CEF into WinForms
2019-05-15 21:27:56 +10:00
amaitland a0d74dd63e IDisplayHandler - Add OnLoadingProgressChange
Resolves #2686
2019-03-27 22:05:17 +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 bf934b2ec3 WinForms - Example LifeSpanHandler update DevTools Url
The Default Devtools URL has been changed in `CEF`.

https://bitbucket.org/chromiumembedded/cef/commits/7b00e057140c3c134dfae328718a005f2064b9f6?at=3396
2018-07-29 19:37:00 +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 c37dbcd06a Remove Geolocation API and Upgrade version numbers to 65 2018-03-17 21:31:25 +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
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
Chris 2b7bdf863f Updated OnTooltipChanged to allow for modifying text (#1953)
* Updated OnTooltipChanged to allow for modifying text

* Updated examples
2017-05-15 02:52:02 +02:00
amaitland c138ba2519 Remove experimental option #1 from WinForms LifeSpanHandler example - should use SetAsChild method instead (I know the example is incomplete, contributions welcome).
newBrowser should only be used in WPF/OffScreen
2017-04-18 15:33:02 +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 526fe28bc9 Add missing using statement 2017-01-31 10:01:57 +10:00
amaitland 314b3a00c7 IGeolocationHandler.OnRequestGeolocationPermission - improve comment
GeolocationHandler Example - upgrade to properly use the callback.
2017-01-30 10:05:44 +10:00
amaitland 43f2a3faba WinForms LifeSpanHandler - Check browser.IsDisposed (should only happen when disposing)
Update ILifeSpanHandler.DoClose comment
2017-01-06 13:08:39 +10:00
amaitland b7f7cc4dc6 Minor formatting changes to CefCertificateCallbackWrapper
Update WinFormsRequestHandler so the X509Certificate2UI.SelectFromCollection is made on the UI thread and
Follow up to #1878
2016-12-13 10:20:25 +10:00
Smaran Harihar fa41529853 Add IRequestHandler.OnSelectClientCertificate (#1878)
* wip create hooks for onSelectClientCertificate

* create interface and wrapper for callback

* get certificate from CefCertificateList, convert to X509Certificate2, add them to X509CertificateCollection and return this to ClientAdapter

* code review changes. Certificate selection in wrapper requires recreation of certificate in iteration

* added certificate dialog selection to WinFormsRequestHandler. Used VS untabify to remove all the tabs and replaced it with spaces

* missed updating a summary on ISelectClientCertificateCallback

* code review changes
2016-12-13 09:48:15 +10:00
amaitland 2d86311b44 Fix bug in WinForms example - the LifeSpanHandler implementation wasn't allowing popup windows to close 2016-10-19 07:51:19 +10:00
amaitland 662ef561b5 ILifeSpanHandler.OnBeforePopup - Add comment about setting newBrowser to null 2016-10-12 12:43:11 +10:00
amaitland 289fbf244a Update WinFormsBrowserProcessHandler to use the simplest possible approach - NOT PRODUCTION READY 2016-09-09 13:21:48 +10:00
amaitland 9fbde82ef0 Experimental implementation of IBrowserProcessHandler.OnScheduleMessagePumpWork
NOT READY FOR PRODUCTION USE
2016-09-01 16:51:20 +10:00
amaitland 79f3844cab Follow up to #1764
- Call SetHandlersToNull() in a consistent fashion across all three implementations
- Reword comments slightly
2016-08-09 12:40:58 +10:00
Dan Backes 7108ae3f43 Fix LifeSpanHandler not Called During Dispose (#1764)
- Make it so that the lifespan handler is still called when the
  ChromiumWebBrowser is disposed We need to make sure that the
  LifeSpanHandler is still around when `managedCefBrowserAdapter`
  is disposed since it is going to call `CloseBrowser`. That way,
  we can implement LifeSpanHandler and reject closing the entire
  application as described in #1574
2016-08-09 12:32:41 +10:00
amaitland 885e0d685f Forgot to comment out the experimental window hosting 2016-05-19 17:56:10 +10:00
amaitland d1d754cf58 Remove CefWindowInfo from ClientAdapter::OnBeforePopup they will now need to be made in client code
(This is now possible as IWindowInfo exposes all the relevant pieces).
This will allow for a little more flexibility, specially on the WinForms front, it should be possible to create the control and then show the window later
2016-05-19 12:11:29 +10:00
amaitland 1a0c08afa0 Add another experimental ILifeSpanHandler.OnBeforePopup option 2016-05-04 23:34:33 +10:00
amaitland 6644fd7208 Update KeyboardHandler to ignore left, right, up, down as they were being cancelled
Some resharper inspired cleanup as well
2016-04-21 07:03:19 +10:00
amaitland 7f1f1c5f21 Add example IDisplayHandler.OnFullscreenModeChange to WinForms example - reparent ChromiumWebBrowser control to demo switching to fullscreen, little bit of screen resize which isn't perfect, it works ok though. 2016-03-30 10:58:05 +10:00
amaitland cad16c40e4 CEF API Changes for 2623 upgrade
Update IGeolocationHandler.OnCancelGeolocationPermission - remove requestUrl
2016-03-18 08:47:24 +10:00
amaitland dd7ea823a3 Add PopupFeatures and BrowserSettings to OnBeforePopup
Update WinForms popup example - comment out experimental feature

Had to add interfaces to allow for wrapping of the structures (BrowserSettings and PopupFeatures)

Resolves #1586
2016-03-07 18:58:56 +10:00
amaitland bae3c28e92 Update copyright to 2016 2016-01-11 14:11:30 +10:00
amaitland 514d7e275d Add IContextMenuHandler.RunContextMenu 2015-10-12 08:08:41 +10:00
amaitland fff0808693 Demo opening OnOpenUrlFromTab - rough example 2015-09-18 13:22:11 +10:00
amaitland 52791957d5 Update callback usage examples
Add some comments in example RequestHandler about disposing of callbacks
2015-09-09 09:18:27 +10:00
amaitland fa7728b0d0 Strongly type commandId
Add example of using custom menu id numbers
2015-08-31 11:36:49 +10:00
zkovacs1 0c4dd367eb Exposing menu commands enum from Cef 2015-08-28 00:24:08 +03:00
zkovacs1 cafc129b33 TO DO: Create enum for Command Id values 2015-08-25 04:34:48 +03:00
zkovacs1 43eb12e9c2 Some code beautifying 2015-08-25 04:32:54 +03:00
zkovacs1 cb3455f14f Exposing more methods in IMenuModel to facilitate context menu customizations 2015-08-25 03:28:30 +03:00