OnBeforePopup and default settings value ?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

OnBeforePopup and default settings value ?

Postby futurex » Mon Aug 28, 2017 1:04 am

Hi, Im new in CEF, currently Im using CEF 3.3112.1656.g9ec3e42 (Windows 32 bit).

In my parent browser (my first browser) I have disabled image loading on browser setting.

Then on my OnBeforePopup implement. When a new window creating (by click a link has target=blank).
the new window didnt use default setting value (with img disabled) like the document described on cef_life_span_handler.h
Am i miss something ?

virtual bool OnBeforePopup(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
const CefString& target_url,
const CefString& target_frame_name,
WindowOpenDisposition target_disposition,
bool user_gesture,
const CefPopupFeatures& popupFeatures,
CefWindowInfo& windowInfo,
CefRefPtr<CefClient>& client,
CefBrowserSettings& settings,
bool* no_javascript_access)
{
// Im also trying to modify settings.image_loading = STATE_DISABLED with no luck :(
return false;
}

One more thing that if I CreateBrowser here and return true, it's seem the parent window didnt retain to the new popup.
I mean if the parent creating a popup by js like this:

var pop = window.create(...);

then it's cant call pop.close();

I happy with the default creating popup funtion, just get stuck about settings :(
- sorry for my bad english -
futurex
Techie
 
Posts: 22
Joined: Fri Sep 02, 2016 11:11 pm

Re: OnBeforePopup and default settings value ?

Postby hkurra » Tue Sep 26, 2017 5:23 am

I am also facing the exact problem but the only difference is I am interested in disabling web_security for the pop-up browser but it is not working.
For now, I have disabled the web_security for All browser through command line switch but it is not recommended
Code: Select all
command_line->AppendSwitch("disable-web-security");
hkurra
Techie
 
Posts: 22
Joined: Wed Jun 21, 2017 8:13 am

Re: OnBeforePopup and default settings value ?

Postby futurex » Fri Feb 02, 2018 6:58 am

I have same problem, even if I try to change the settings values. I dont want to use CefBrowserHost::CreateBrowser here as I want the new browser use the same render process.
@magreenblatt , please give us an advice !
Thank in advances,
Regards !
futurex
Techie
 
Posts: 22
Joined: Fri Sep 02, 2016 11:11 pm

Re: OnBeforePopup and default settings value ?

Postby magreenblatt » Fri Feb 02, 2018 1:05 pm

@futurex Please file a bug report.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 36 guests