Commit Graph

160 Commits

Author SHA1 Message Date
amaitland 6a7f4dca5e Reuse a single reference to the IBrowser instance - keeping a copy of the wrapper means we can Dispose and release the resources.
Even if the user still has a reference it shouldn't interfere with `CEF`
2015-05-28 20:34:34 +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 1ce10ea53f Move LoadHtml (LoadString) to extension 2015-05-21 20:25:02 +10:00
amaitland 1a1fcb9f2e Make the next set of frame related methods into extension methods 2015-05-21 19:12:14 +10:00
amaitland 024a80396e Move the first set of frame related method (Cut/Copy/Paste, etc) into a set of Extension methods 2015-05-21 18:49:58 +10:00
amaitland b6df5c48c1 Change GetFrame methods to return IFrame reference 2015-05-21 18:21:08 +10:00
amaitland 8a53dfe54d Pass the IBrowserAdapter (ManagedCefBrowserAdapter) reference directly into the ClientAdapter instance 2015-05-21 13:57:17 +10:00
Bill Tutt adb5ae0d77 More work on wrapping CefBrowser/CefFrame. 2015-05-17 17:41:44 -04:00
Bill Tutt 872cb06c71 Part 1 of Wrap CefBrowser. 2015-05-02 23:32:22 -04:00
Bill Tutt 7776438ea0 Remove IBrowserAdapterNative, and add nullptr checks for GetCefBrowser return value. 2015-05-02 04:37:48 -04:00
Bill Tutt e1e58a5da6 Add IFrame interface as the public face of CefFrameWrapper.
IRequestHandler: Pass IFrame instances instead of isMainFrame.
Support EvaluateJavaScriptAsync from a frame.
IBrowserAdapter, IBrowserAdapterNative: Dependency breaking between CefFrameWrapper and ManagedCefBrowserAdapter.
Add IBrowserAdapter.BrowserAdapter to IWebBrowserInternal and implment for all controls.

This builds, but hasn't been tested yet. Thoughts?
2015-05-02 00:01:31 -04:00
Bill Tutt 26ec64e587 Copy/Paste frame APIs from CefBrowser into ManagedCefBrowserAdapter.*
Start stubbing out some implementations in CefFrameWrapper.h

(This doesn't build yet, don't bother trying... )
2015-04-29 01:13:50 -04:00
rassilon 554d344b97 Now that they're all in one spot, split them into sensible groups, and add comment for async task private methods. 2015-04-22 19:24:15 -04:00
amaitland 533964105e Group public and private methods together.
Make some methods private that were previously public
Remove Overload for `Reload` - not required
Rename `isKeyDown` to `IsKeyDown`
2015-04-23 08:41:13 +10:00
rassilon 1a31b991ac Move rest of non-simple functions to .cpp file.
Rename private GetZoomLevel to GetZoomLevelOnUI to further indicate what thread it should run on.

Make WPARAM keyboard related functions private:
  isKeyDown and GetCefKeyboardModifiers.
2015-04-22 10:46:07 -04:00
rassilon 701d391c59 Adding .Net enum of CefThreadId (mostly to be able to call .ToString()).
Added license headers on new files.
Remove sync version of GetZoomLevel on ManagedCefBrowserAdapter.
Updated callers to call GetZoomLevelAsync() but in a blocking sync manner.

Added CurrentlyOn/EnsureOn static methods to CefTaskScheduler.
2015-04-22 08:19:36 -04:00
rassilon c96f8a82d6 Add TaskFactories in the main process for UI/File/IO, and utilize the UI task factory for GetZoomLevel, and implement GetZoomLevelAsync. 2015-04-22 00:14:29 -04:00
amaitland c66b28a645 Merge remote-tracking branch 'remotes/upstream/master' into cef/2272 2015-04-21 11:54:56 +10:00
amaitland 5dc824aaac Remove duplicate const from _GetZoomLevel - was causing compiler warning 2015-04-21 11:49:28 +10: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
amaitland bdabd3a91c Remove usage of TaskFactory - will look at implementing later 2015-04-10 16:33:12 +10:00
Alex Maitland 5c40ff0af3 Merge pull request #933 from amaitland/experiment/taskscheduler
Add Experiment TaskScheduler
2015-04-10 16:30:46 +10:00
Alex Maitland d7525280d8 Merge pull request #923 from exinferis/master
Added parameter for lowercasing JS functions (or not)
2015-04-10 15:44:21 +10:00
amaitland 76e28b1b16 Switch lparam to CastToInt32() extension method 2015-04-09 19:23:28 +10:00
amaitland 9d7b65ccfc Add TaskFactory that corresponds to the UI Thread
Execute SetZoomLevel on UI Thread
2015-04-09 11:30:02 +10:00
amaitland 805daee1da Modify SetZoomLevel to execute on CEF UI Thread
Ideally would replace the with `CefTaskScheduler` which currently lives in the subprocess
2015-04-09 11:22:55 +10:00
amaitland 525193c102 Untabify 2015-04-07 20:30:40 +10:00
Exinferis 8581c3f03b Added parameter for lowercasing JS functions (or not) 2015-04-02 15:37:12 +02:00
amaitland 2493f8c0c4 Information added about change made for #862 and #804
Added comment as suggested in https://github.com/cefsharp/CefSharp/commit/387101ee79b730d593d701b88e5fc521381fd964#commitcomment-10315749
2015-03-23 09:29:05 +10:00
amaitland 387101ee79 Check BrowserProcessServiceHost is in a Created State before opening 2015-03-19 15:46:11 +10:00
amaitland a7b8e1eb76 Remove MouseButtonType as it's not required - enum values match those of Cef, so just pass in as int and cast when required
(Should be much more efficient than switch statement)
2015-03-19 10:58:18 +10:00
Bjarte Skogøy ebf8b88523 - notify screen info changed
- update the scaletransform when presentation source is changed
2015-02-26 10:05:23 +01:00
Bill Tutt 08b1254879 #785: _browserProcessServiceHost isn't safe to call Close on if we're being finalized. (it may have already been disposed of separately on the finalizer thread) 2015-02-03 19:55:24 -05:00
amaitland 6d4a766c32 Remove IMouseEvent interface - served no real purpose 2015-02-03 23:07:00 +10:00
amaitland da16d9f0eb Cleanup code as per feedback in PR #732 2015-02-03 23:05:43 +10:00
amaitland 38e60a97f3 Merge branch 'feature/2171-drag-drop' of https://github.com/Bodekaer/CefSharp into enhancement/focus-take4 2015-02-03 22:54:46 +10:00
amaitland 1d7cc92a6a Pass in the IntPtr as lParam and then based on IntPtr Size (32bit == 4 and 64bit == 8) convert the IntPtr to either 32bit or 64bit 2015-01-22 11:59:53 +10:00
amaitland 0838dcd382 LPARAM is dependent on target platform so changing to int64 so both x86 and x64 are the same 2015-01-22 11:18:28 +10:00
amaitland a250e2d7ed WPF Fix lParam.ToInt32() overflow when running in 64bit mode
https://github.com/cefsharp/CefSharp/issues/509#issuecomment-70944315
2015-01-22 11:09:45 +10:00
Bodekaer 3407a91d1d Added drag-drop support, to allow dragging files, text and links into the browser (WPF-only currently) 2015-01-07 16:10:56 +01:00
amaitland 251ae9a8ec IntPtr is a struct so pass by value rather than reference 2014-12-30 16:29:07 +10:00
amaitland f1ddf6f61f Remove TryGetCefHost method - similar cleanup to previous commit, brings code more inline with cefclient example
(It would appear that having an instance of the browser then there will always to be a host)
2014-12-30 09:16:28 +10:00
amaitland 3cf7b0159a Remove TryGetCefMainFrame method - now just using calls directly to GetMainFrame() (brings code more inline with cefclient example) 2014-12-30 09:10:56 +10:00
amaitland 995974d3df Rename _renderClientAdapter to _clientAdapter 2014-12-30 08:55:27 +10:00
amaitland f9821ae549 Add offScreenRendering param to ManagedCefBrowserAdapter and create the relevant Client Adapter as required. 2014-12-30 08:53:16 +10:00
amaitland 8b8d97e350 Pass in WPF Window handle when creating offscreeen browser 2014-12-30 08:42:29 +10:00
amaitland 061c350a9c Improve formatting and include comment about source code origin 2014-12-22 22:54:57 +10:00
amaitland 48c3625523 Import keyboard SourceHook code from cefclient to comprehensively handle key modifiers
Simplified OnPreviewKey so that it only deals with keys that would have been handled by WPF
2014-12-22 22:51:34 +10:00
amaitland 450ee3995d Close open popups (if any) when ManagedCefBrowserAdapter is disposed 2014-12-19 16:30:59 +10:00