Page 1 of 10

Xilium.CefGlue/3 & CefGlue/1

PostPosted: Thu Jun 07, 2012 5:10 pm
by fddima
Hi, all!

We open public preview of Xilium.CefGlue - CLR bindings for CEF3.
It is first source preview. It contains about full bindings to CEF API and very-very simple demo application.
For first - Xilium.CefGlue - contains absolutely unrelated codebase with CefGlue, but still use good-showed techinques in CefGlue/1.

Sources built with CEF 3 revision 673, but it looks like compatible with rev 654 cef_preview_3.1142.654_windows.zip. So if someone want try it with 654 - remove version check, or set required version in interop/version.g.cs file. Otherwise it will not match version and fails.

Our primary goal is provide full access to CEF API (it is about done) under each platform in unified way with one deployable cil/msil image.
Currently it also can be compiled to .net 2/3.5/4. Later it of course will have only 3.5-4 features, that will not be supported on .net-2.
But all depends from end users. Main target it is .net-4/4.5.

So cool features like JSBindings and WinForms controls now are inaccessible.
Last year show that too generalized controls - it is way to get extreme complexity and they persistently doesn't met end user requirements - and our requirements too.

Also we no more work on CefGlue/1 - it last half year supported only by community, and this is good news for CefGlue/1 users.

So our next plan with Xilium.CefGlue/CEF:
- support Mono on Windows (require core CEF improvements);
- macosx support ;
- linux support.

Then, may be futures:
- provide 'featured' native renderer (if it really needed, currently with .net - managed subprocesses are very not bad);
- provide some other mechanism about js<>clr interaction instead of old-way jsbindings;
- provide some set of reusable 'extras' like simple winforms controls, and other.

We open to discussions, proposals and any cool patches.

Updated to CEF 3.1163.695

PostPosted: Wed Jun 13, 2012 6:34 pm
by fddima
Sources updated to CEF 3.1163.695. Prebuilt non-official CEF 3.1163.695 binaries.

Re: Xilium.CefGlue/3 & CefGlue/1

PostPosted: Wed Jun 20, 2012 2:10 pm
by weezelboy
Does Xilium/Cef3 has support for off-screen rendering? I'd like to implement a control for .NET WPF.

Re: Xilium.CefGlue/3 & CefGlue/1

PostPosted: Thu Jun 21, 2012 2:43 am
by fddima
weezelboy wrote:Does Xilium/Cef3 has support for off-screen rendering? I'd like to implement a control for .NET WPF.

CEF3 currently doesn't support off-screen rendering. Keep track issue 518.

Re: Xilium.CefGlue/3 & CefGlue/1

PostPosted: Thu Jun 21, 2012 5:26 pm
by fddima
Sources updated to CEF 3.1163.700. Prebuilt non-official CEF 3.1163.700 binaries.

Re: Xilium.CefGlue/3 & CefGlue/1

PostPosted: Sat Jun 23, 2012 4:49 am
by fddima
Sources updated to CEF 3.1180.705. Prebuilt non-official CEF 3.1180.705 binaries.

Re: Xilium.CefGlue/3 & CefGlue/1

PostPosted: Thu Jun 28, 2012 5:58 pm
by fddima
Sources updated to CEF 3.1180.719. Prebuilt non-official CEF 3.1180.719 binaries.

Re: Xilium.CefGlue/3 & CefGlue/1

PostPosted: Wed Jul 25, 2012 12:46 pm
by AlexDj94
I need help to implement downloads (Sorry for bad english)
Code: Select all
internal sealed class FireWebDownloadHandler : CefDownloadHandler
    {
        private readonly FireWebBrowser _core;

        public FireWebDownloadHandler(FireWebBrowser core)
        {
            _core = core;
        }

        protected override void OnBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem, string suggestedName, CefBeforeDownloadCallback callback)
        {
            _core.OnBeforeDownload(downloadItem, suggestedName, callback);
        }

        protected override void OnDownloadUpdated(CefBrowser browser, CefDownloadItem downloadItem, CefDownloadItemCallback callback)
        {
            base.OnDownloadUpdated(browser, downloadItem, callback);
        }
    }


Code: Select all
public class BeforeDownloadEventArgs : EventArgs
        {
            public BeforeDownloadEventArgs(CefDownloadItem downloadItem, string suggestedName, CefBeforeDownloadCallback callback)
            {
                this.downloadItem = downloadItem;
                this.suggestedName = suggestedName;
                this.callback = callback;
            }

            public CefDownloadItem downloadItem;
            public string suggestedName;
            public CefBeforeDownloadCallback callback;

        }
        public delegate void BeforeDownloadEventHandler(object sender, BeforeDownloadEventArgs args);
        internal void OnBeforeDownload(CefDownloadItem downloadItem, string suggestedName, CefBeforeDownloadCallback callback)
        {
            var handler = BeforeDownload;
            if (handler != null) handler(this, new BeforeDownloadEventArgs(downloadItem, suggestedName, callback));
        }
        public event BeforeDownloadEventHandler BeforeDownload;


Code: Select all
Browser.BeforeDownload += (se, ev) =>
            {
                BeginInvoke(new Action(() =>
                {
                    MessageBox.Show(ev.suggestedName);
                }));
            };


Not work :(

Re: Xilium.CefGlue/3 & CefGlue/1

PostPosted: Wed Jul 25, 2012 12:59 pm
by fddima
AlexDj94 wrote:I need help to implement downloads (Sorry for bad english)
...
Not work :(

I'm trying you code, it works, except that may be you are missing override GetDownloadHandler in CefClient (CefWebClient):
Code: Select all
internal sealed class CefWebClient : CefClient
{
        ...
        private readonly FireWebDownloadHandler _downloadHandler;

        public CefWebClient(CefWebBrowser core)
        {
           // old code here
            _downloadHandler = new FireWebDownloadHandler(_core);
        }

        protected override CefDownloadHandler GetDownloadHandler()
        {
            return _downloadHandler;
        }
}

Re: Xilium.CefGlue/3 & CefGlue/1

PostPosted: Wed Jul 25, 2012 1:18 pm
by AlexDj94
Thanks! Now work :D