Xilium.CefGlue/3 & CefGlue/1

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

Moderator: fddima

Re: Xilium.CefGlue/3 & CefGlue/1

Postby fddima » Sun Nov 18, 2012 6:18 am

BdC wrote:I can't use the fully native cefclient.exe for the render process as I have a C# V8 context handler in the render processes and messaging between render and browser process using google IPC. I did solve the issue by forcing a GC.Collect in the render process and memory now stabilizes around 180MB (the only change was to call GC.Collect at each V8 context destroy callback). If I do GC.Collect with the optimize flag (so that GC can choose to collect or not) or if I never call it, then memory increases to about 1.5GB and the process self terminates. I know the GC is not necessarily called from the message loop, but I think it uses it to figure out how busy the process is and if it's a good time to collect (I could be wrong, I'm a c# novice but a c++ master). At least it seems to me like automatic GC is not working in render process, as if I add the optimize flag the fix doesn't work and the process never reclaims any memory (same as never calling GC.Collect at all), but if I force collect, then it works fine. Also worth noting, in single process mode, there is no leak and we don't need to force GC.Collect, it just works, but since we also occasionally have no active CefWebBrowser this no longer works with the latest 904 Cef build and is no longer a viable alternative so we need to move to multi-process with forced GC.Collect to get around the leak.

By the way, thanks a lot for your quick responses and support.


What .NET version is used i.e. CLR2 or CLR4?
It will be good if you can provide simple reproduction sample about this issue.
fddima
Master
 
Posts: 775
Joined: Tue Dec 07, 2010 6:10 am

Re: Xilium.CefGlue/3 & CefGlue/1

Postby BdC » Sun Nov 18, 2012 2:20 pm

fddima wrote:What .NET version is used i.e. CLR2 or CLR4?
It will be good if you can provide simple reproduction sample about this issue.


We're using CLR4 (and we're sync with Cef r904 and Cef.Glue that was released against it). I'll see if we can re-create this problem with Cef.Glue client demo.
BdC
Newbie
 
Posts: 4
Joined: Fri Sep 07, 2012 10:50 pm

Re: Xilium.CefGlue/3 & CefGlue/1

Postby Konst » Tue Nov 20, 2012 12:01 am

Hello.

I am working with CefGlue3 and i'm trying to run my application on Mac OS X with Gtk, but it seems to it's not supported yet. Do you have any plans about Mac OS? Or maybe experimental MonoMac projects or something else?

Thanks,
Konstantin
Konst
Newbie
 
Posts: 1
Joined: Mon Nov 19, 2012 11:42 pm

Re: Xilium.CefGlue/3 & CefGlue/1

Postby fddima » Tue Nov 20, 2012 9:08 am

Konst wrote:I am working with CefGlue3 and i'm trying to run my application on Mac OS X with Gtk, but it seems to it's not supported yet. Do you have any plans about Mac OS? Or maybe experimental MonoMac projects or something else?

Chromium internally uses native views for each platform. GTK used by chromium internally only on Linux.
So on macosx you will work with NSView, and MonoMac is more appropriate option in this case. But it is still no have supported in CefGlue3.

So it will be good, if someone implement monomac support in cefglue. Main question - it is how custom application protocol must be implemented (and reused) via monomac. See precisely on cefclient.mm source code, if you want make it is for self.
fddima
Master
 
Posts: 775
Joined: Tue Dec 07, 2010 6:10 am

PepperApi Flash 11.5 in Xilium

Postby quilombodigital » Sun Jan 13, 2013 11:44 am

Hi,

I have compiled the last xilium.cefglue/3 version, with libcef r938, and some hours later, everything is working ok.

The only problem I'm having is to make pepperapi flash 11.5 work with xilium (flash 11.2 does not solve my problem because I need the lastest stage3d support)

I saw that CefSettings has an ExtraPluginPaths parameter in CefGlue, but this is not present in Xilium.

I have Pepper installed and running in chromium at the same machine, but I have no idea about how to make Xilium's libcef use the same plugin. Any ideas?

I thought that I could implement the ExtraPluginPaths in CefSettings, but since this is an Interop library, I dont know (and it is not documented anywhere) the interop class generation tools and how to use them.
Of course I can patiently read all the source code and try to understand the build process, but come on guys... :) cant you give me a simple solution? 8P

Thanks for the help, Ricardo Mello (gandhi)
quilombodigital
Newbie
 
Posts: 1
Joined: Sun Jan 13, 2013 10:27 am

Re: PepperApi Flash 11.5 in Xilium

Postby fddima » Mon Jan 14, 2013 3:29 am

quilombodigital wrote:Thanks for the help, Ricardo Mello (gandhi)

1. Check plugin info in cefclient. If i'm not mistaken - it actually works npapi flash, not pepper.
2. Use plugin paths functions form CefRuntime class.
fddima
Master
 
Posts: 775
Joined: Tue Dec 07, 2010 6:10 am

Re: Xilium.CefGlue/3 & CefGlue/1

Postby dreijer » Mon Jan 21, 2013 9:53 am

I'm taking a look at Xilium to avoid having to wrap CEF3 myself for use in a WPF application. One thing Ive noticed, however, is that all the "interfaces" (CefLifeSpanHandler, CefDisplayHandler, etc) aren't actually interfaces in Xilium, but instead abstract classes, which means I cannot implement them all in the same handler class. It forces me to create a separate proxy class for each of these interfaces, which then forwards the events to the appropriate web browser class in my application, i.e. it's essentially twice the work since I have to "implement" the interface twice.

Any thoughts on improving this?
dreijer
Expert
 
Posts: 201
Joined: Mon Apr 11, 2011 10:09 pm

Re: Xilium.CefGlue/3 & CefGlue/1

Postby fddima » Mon Jan 21, 2013 10:19 am

dreijer wrote:I'm taking a look at Xilium to avoid having to wrap CEF3 myself for use in a WPF application. One thing Ive noticed, however, is that all the "interfaces" (CefLifeSpanHandler, CefDisplayHandler, etc) aren't actually interfaces in Xilium, but instead abstract classes, which means I cannot implement them all in the same handler class. It forces me to create a separate proxy class for each of these interfaces, which then forwards the events to the appropriate web browser class in my application, i.e. it's essentially twice the work since I have to "implement" the interface twice.
Any thoughts on improving this?

In general it is possible to create clean interfaces and make proxies for them at CefGlue side. You can try make it for self, using same basis (CefLifeSpanHandler / etc). Interesting idea, i think, that we needed think about little more.
Drawback - of plain interfaces - that, they may work not so good, as you think. For example you will never want have ICefTask interface, or ICefResourceHandler, and many others, which from one side - can be replaced by more appropriated analogue, or they are life-time critical objects (and life time controlled mostly by CEF).
If you want support control with popups - you can't reuse CefClient efficiently, 'cause if you want reuse it - then you will need to resolve CefBorwser<>MyControl association, which permanently absent. So only one efficient way make this association - it is create CefClient/CefLifeSpanHandler/etc handlers with browser control information, and they as you already say will just call control's implementation methods.
So i'm not sure that clean interfaces have sense, but it is needed to be digged little more. Thanks for feedback.
fddima
Master
 
Posts: 775
Joined: Tue Dec 07, 2010 6:10 am

Re: Xilium.CefGlue/3 & CefGlue/1

Postby dreijer » Mon Jan 21, 2013 10:34 am

Right, I guess it can get a little messy. I'll have to spend more time with CEF3 to really understand the repercussions. I'll get back to you on that. :) Thanks for the otherwise great work on wrapping CEF, by the way!

Unrelated:
I'm hooking up off-screen rendering via Xilium, but it looks like you haven't finished migrating everything yet?

Code: Select all
/// <summary>
/// Send a key event to the browser.
/// </summary>
public void SendKeyEvent(CefKeyEvent keyEvent)
{
    // TODO: use CefKeyEvent
    var n_event = new cef_key_event_t();
    var todo = new CefKeyEvent(&n_event);
    todo.Dispose();
    cef_browser_host_t.send_key_event(_self, &n_event);
}


All the properties on CefKeyEvent are also read-only, which means I can't set them.

How close are you to being fully OSR-ready in Xilium?
dreijer
Expert
 
Posts: 201
Joined: Mon Apr 11, 2011 10:09 pm

Re: Xilium.CefGlue/3 & CefGlue/1

Postby fddima » Mon Jan 21, 2013 11:22 am

dreijer wrote:Unrelated:
I'm hooking up off-screen rendering via Xilium, but it looks like you haven't finished migrating everything yet?
All the properties on CefKeyEvent are also read-only, which means I can't set them.

Looks like i'm miss this. Can you add issue on issue tracker?

dreijer wrote:How close are you to being fully OSR-ready in Xilium?

Currently no have idea. In general all must be, but if you found some bugs / proposals - let me know.
fddima
Master
 
Posts: 775
Joined: Tue Dec 07, 2010 6:10 am

PreviousNext

Return to CefGlue Forum

Who is online

Users browsing this forum: No registered users and 6 guests