Commit Graph

3120 Commits

Author SHA1 Message Date
amaitland e83daa37fe Remove ISchemeHandlerResponse - wasn't going to be used 2015-05-28 20:46:42 +10:00
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 1163e59aae Dispose of frame when finished (releases the reference to the unmanaged class).
Whilst not strictly required, it's nice to know the frame is explicitly released and for those copying the code, give them a clue that they need to call dispose
2015-05-28 20:28:46 +10:00
amaitland bd3fddddbc Throw exception if null (ThrowExceptionIfBrowserNull)
Dispose of IBrowser once finished (just releases the reference)
2015-05-28 20:26:12 +10:00
amaitland 3038b820ec Slightly better param naming - internalBrowser -> cefBrowser 2015-05-28 20:24:04 +10:00
amaitland 6cd3c67abb Make Reload + ReloadIgnoreCache into one method with a property - makes consistent with the rest of API 2015-05-28 20:23:13 +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 71f783ddda Remove extra /// from xml comment 2015-05-28 20:02:03 +10:00
amaitland 507fbf0704 Add null check for LoadHtml - add better error message to say that it's only usable with DefaultResourceHandlerFactory 2015-05-28 19:55:45 +10:00
amaitland 3908a6212a Rather than fail silently throw and exception if the frame is null, this is a drastic change in behaviour. Though it provides a much more transparent behaviour though.
Just need to make sure it's easy to check IsBrowserInitialized in all instances to see if it's safe to call methods (should only be called when IsBrowserInitialized is true, only problem with this is in WPF where it's a dependency property)
2015-05-28 19:54:22 +10:00
amaitland 0c2cd86e1b Make IFrame and IBrowser implement IDisposable (The underlying implementation already does, just not the interface) 2015-05-28 19:51:14 +10:00
amaitland 2983bf7383 Change ContentLength to be a long (int64)
Set ContentLength in ResourceHandler when using a MemoryStream
2015-05-27 18:01:17 +10:00
amaitland af8e53a6a1 Remove redundant method prefix (cpp) 2015-05-27 17:45:55 +10:00
amaitland d0d409a8fd Rename LoadHtml to LoadStringForUrl (Internal method is LoadString, for some reason that causes the compiler a problem as there is a define already aliasing LoadString).
LoadHtml was a somewhat conflicting name with the LoadHtml extension methods that use a ResourceHandler to load the html
2015-05-27 17:44:03 +10:00
amaitland 187b255730 Change ResourceHandler to use explicit IResourceHandler interface implementation
Add some extra spacing and fix up a comment
2015-05-27 17:17:29 +10:00
amaitland 37384a9461 Rename SchemeHandlerResponse to ResourceHandlerResponse 2015-05-27 17:14:42 +10:00
amaitland 9c7bf2e930 Change ResourceHandler to IResourceHandler
Add StatusText
2015-05-27 17:11:52 +10:00
amaitland 8579a6a210 Remove RegisterHandler/UnRegisterHandler methods from the IResourceHandlerFactory interface 2015-05-27 16:21:48 +10:00
amaitland d37dd2d2ef Move LoadHtml into an extension method 2015-05-27 16:18:28 +10:00
amaitland b4b0cf1d7e Move the IWinFormsWebBrowser interface into the WinForms project 2015-05-22 11:06:16 +10:00
amaitland a6f5131e8a Add Print wrapper 2015-05-21 20:40:13 +10:00
amaitland 3037c84497 Add StartDownload wrapper 2015-05-21 20:39:04 +10:00
amaitland 7ab2d61b04 Add CloseBrowser CefBrowserHost wrapper to IBrowser 2015-05-21 20:34:55 +10:00
amaitland 9defed9a42 Add disclaimer
Remove unused references
2015-05-21 20:28:22 +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 29be100b57 Add new Resharper settings (upgraded to new version) 2015-05-21 18:41:34 +10:00
amaitland 00b1aee59f Reorder a few more things in the WinForms code 2015-05-21 18:41:12 +10:00
amaitland 37c64afa51 WinForms move EventHandler decelerations up higher in source file 2015-05-21 18:39:35 +10:00
amaitland 4763020b9d Add GetMainFrame and GetFocusedFrame to IWebBrowser 2015-05-21 18:38:33 +10:00
amaitland 831e2e6ffd Switch the nullptr checks around...pedantic I know :) 2015-05-21 18:31:35 +10:00
amaitland 9fb921af80 For GetFocusedFrame and GetMainFrame shouldn't need to check the result, their should always be a frame if the CefBrowser instance != null 2015-05-21 18:29:48 +10:00
amaitland b6df5c48c1 Change GetFrame methods to return IFrame reference 2015-05-21 18:21:08 +10:00
amaitland 46808752da Copy WebBrowserExtensions to InternalWebBrowserExtensions
Create empty WebBrowserExtensions to house common methods
2015-05-21 18:20:44 +10:00
amaitland 771158af28 Pass CefSharpBrowserWrapper instance (IBrowser) into IDownloadHandler - for now not populating the IBrowserAdapter property as there's currently no way to grantee when the resource would be released/disposed.
Maybe need to look at WeakReference or a layer of indirection (which I was hoping to avoid)
2015-05-21 14:25:32 +10:00
amaitland 22146e33ca Untabify 2015-05-21 13:57:17 +10:00
amaitland 8a53dfe54d Pass the IBrowserAdapter (ManagedCefBrowserAdapter) reference directly into the ClientAdapter instance 2015-05-21 13:57:17 +10:00
amaitland 2f40861dca Use default params on the IFrame interface to provide the ExecuteJavaScriptAsync overload 2015-05-21 13:51:45 +10:00
amaitland ee7c8efdd9 A few more resharper inspired cleanups 2015-05-21 13:51:15 +10:00
amaitland 996661de60 Resharper inspired cleanup of BrowserForm - mostly remove redundant type arguments from anon delegates 2015-05-21 13:51:14 +10:00
amaitland 824fd21950 Resharper - disable localization warnings for CefSharp.WinForms.Example 2015-05-21 13:51:14 +10:00
amaitland cedc3196fa Remove WindowsBase reference from OffScreen - not required (Uses Gdi Bitmap) 2015-05-21 13:51:14 +10:00
amaitland 4ea3bfca37 Start marking Cut/Copy/Paste methods Obsolete - will soon be accessible at the frame level. 2015-05-21 13:51:14 +10:00
amaitland fcde9660d3 Add System.ServiceModel to OffScreen - needed to use the new extension methods 2015-05-21 13:51:14 +10:00
amaitland e43befe9fa Start to extract some duplicate code out into extension methods - saves repeating the same block three times 2015-05-21 13:51:14 +10:00
Bill Tutt 7541ca2d3b Merge pull request #1030 from rassilon/CefSharpBrowserWrapper
More CefSharp BrowserWrapper work, not quite done yet, but we are for this PR.
2015-05-20 23:28:08 -04:00
Bill Tutt c08b1ff38e Fix some review comments, and add frameloadstart/end/error related methods to IPopupHandler. 2015-05-20 22:59:43 -04:00
Bill Tutt 80d6ae12e5 Merge remote-tracking branch 'origin/cef/2272' into CefSharpBrowserWrapper 2015-05-20 21:54:31 -04:00