Page 1 of 1

Where can I get a callback when I click the "custom scheme"?

PostPosted: Fri Sep 03, 2021 12:21 am
by hellWorld91
After running the cef web browser, is there a callback function where I can receive information of "custom system url" when I click the button?

Re: Where can I get a callback when I click the "custom sche

PostPosted: Fri Sep 03, 2021 10:12 am
by magreenblatt

Re: Where can I get a callback when I click the "custom sche

PostPosted: Sun Sep 05, 2021 8:51 pm
by hellWorld91
Thank you for your answer.
We are implementing it by referring to the link.
Is the CefSchemeHandlerFactory mandatory?

Re: Where can I get a callback when I click the "custom sche

PostPosted: Mon Sep 06, 2021 2:24 am
by magreenblatt
You can use GetResourceHandler instead.

Re: Where can I get a callback when I click the "custom sche

PostPosted: Mon Sep 06, 2021 3:20 am
by hellWorld91
I'm sorry. I don't understand.
The procedure I just implemented...
CefApps are inherited and implemented.
You have registered with OnRegisterCustomSchemes.
What do I need to implement to get a callback?

Re: Where can I get a callback when I click the "custom sche

PostPosted: Mon Sep 06, 2021 4:53 am
by magreenblatt
You need to implement CefClient::GetRequestHandler, CefRequestHandler::GetResourceRequestHandler, CefResourceRequestHandler::OnBeforeResourceLoad. Pass the CefClient instance to CreateBrowser. See also https://bitbucket.org/chromiumembedded/ ... e_handler/ for an alternative approach.

Re: Where can I get a callback when I click the "custom sche

PostPosted: Mon Sep 06, 2021 7:01 am
by hellWorld91
Thanks for your help.
I have a question, but other than CefResourceManager,
Is there a way to get the correct CefResourceHandler?

Re: Where can I get a callback when I click the "custom sche

PostPosted: Mon Sep 06, 2021 10:49 am
by magreenblatt
I don’t understand your question.

Re: Where can I get a callback when I click the "custom sche

PostPosted: Mon Sep 06, 2021 10:42 pm
by hellWorld91
Thanks to this, the callback function implementation was successful.

When you press the button,
You are about to add a logic to call back to My Project (AS3).

OnBeforeResourceLoad or GetResourceRequestHandler
Which of the two would be a good implemented?

You also registered scheme_name in the "AddCustomScheme" function. Is there a way to get scheme_name?

Please give me some advice.
Thank you always.