Xilium.CefGlue/3 & CefGlue/1

Having problems with building or using the CefGlue .NET/Mono binding? Ask your questions here.

Moderator: fddima

Xilium.CefGlue/3 & CefGlue/1

Postby fddima » Thu Jun 07, 2012 5:10 pm

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.
fddima
Master
 
Posts: 775
Joined: Tue Dec 07, 2010 6:10 am

Updated to CEF 3.1163.695

Postby fddima » Wed Jun 13, 2012 6:34 pm

Sources updated to CEF 3.1163.695. Prebuilt non-official CEF 3.1163.695 binaries.
fddima
Master
 
Posts: 775
Joined: Tue Dec 07, 2010 6:10 am

Re: Xilium.CefGlue/3 & CefGlue/1

Postby weezelboy » Wed Jun 20, 2012 2:10 pm

Does Xilium/Cef3 has support for off-screen rendering? I'd like to implement a control for .NET WPF.
weezelboy
Newbie
 
Posts: 1
Joined: Wed Jun 20, 2012 10:00 am

Re: Xilium.CefGlue/3 & CefGlue/1

Postby fddima » Thu Jun 21, 2012 2:43 am

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.
fddima
Master
 
Posts: 775
Joined: Tue Dec 07, 2010 6:10 am

Re: Xilium.CefGlue/3 & CefGlue/1

Postby fddima » Thu Jun 21, 2012 5:26 pm

Sources updated to CEF 3.1163.700. Prebuilt non-official CEF 3.1163.700 binaries.
fddima
Master
 
Posts: 775
Joined: Tue Dec 07, 2010 6:10 am

Re: Xilium.CefGlue/3 & CefGlue/1

Postby fddima » Sat Jun 23, 2012 4:49 am

Sources updated to CEF 3.1180.705. Prebuilt non-official CEF 3.1180.705 binaries.
fddima
Master
 
Posts: 775
Joined: Tue Dec 07, 2010 6:10 am

Re: Xilium.CefGlue/3 & CefGlue/1

Postby fddima » Thu Jun 28, 2012 5:58 pm

Sources updated to CEF 3.1180.719. Prebuilt non-official CEF 3.1180.719 binaries.
fddima
Master
 
Posts: 775
Joined: Tue Dec 07, 2010 6:10 am

Re: Xilium.CefGlue/3 & CefGlue/1

Postby AlexDj94 » Wed Jul 25, 2012 12:46 pm

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 :(
AlexDj94
Newbie
 
Posts: 7
Joined: Thu Apr 05, 2012 11:57 am

Re: Xilium.CefGlue/3 & CefGlue/1

Postby fddima » Wed Jul 25, 2012 12:59 pm

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;
        }
}
fddima
Master
 
Posts: 775
Joined: Tue Dec 07, 2010 6:10 am

Re: Xilium.CefGlue/3 & CefGlue/1

Postby AlexDj94 » Wed Jul 25, 2012 1:18 pm

Thanks! Now work :D
AlexDj94
Newbie
 
Posts: 7
Joined: Thu Apr 05, 2012 11:57 am

Next

Return to CefGlue Forum

Who is online

Users browsing this forum: No registered users and 5 guests