get_request_handler not called (using CAPI)

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.

get_request_handler not called (using CAPI)

Postby zoggy » Fri May 18, 2018 5:49 am

Hello,

I'm giving a try to CEF, starting from the C-API example here:
https://github.com/cztomczak/cefcapi

In this example, when a callback is called a message is displayed. It appears that the get_request_header callback in the cef_client_t structure is not called (but other callbacks are). Is this a bug or is something missing ?
zoggy
Newbie
 
Posts: 3
Joined: Fri May 18, 2018 5:41 am

Re: get_request_handler not called (using CAPI)

Postby Czarek » Fri May 18, 2018 6:21 am

Running the original unmodified example and I can see in logs that get_request_handler is called. OS: Ubuntu 14.04.

Code: Select all
initialize_cef_app
initialize_cef_base_ref_counted
cef_base_ref_counted_t.size = 72
cef_execute_process, argc=18
cef_base_ref_counted_t.add_ref
cef_base_ref_counted_t.release
on_before_command_line_processing
on_register_custom_schemes
initialize_gtk
create_gtk_window
initialize_client_handler
initialize_cef_base_ref_counted
cef_base_ref_counted_t.size = 152
cef_browser_host_create_browser
cef_run_message_loop
get_life_span_handler
get_load_handler
get_focus_handler
get_request_handler
get_render_process_handler
get_resource_bundle_handler
get_display_handler
window_destroy_signal
cef_shutdown
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: get_request_handler not called (using CAPI)

Postby zoggy » Fri May 18, 2018 7:15 am

Here is what I get on ubuntu 16.04 and CEF 3.3359.1772 :
Code: Select all
gcc -std=c99 -Wall -Werror -o Release/cefcapi-gtk2 -I. -I.. -Wl,-rpath,. -L./Release examples/main_linux.c -lX11 -lcef `pkg-config --libs --cflags gtk+-2.0`
cd Release/ && ./cefcapi-gtk2 && cd ../

Process args: none (Main process)

initialize_cef_app
initialize_cef_base_ref_counted
cef_base_ref_counted_t.size = 72
cef_execute_process, argc=1
cef_base_ref_counted_t.add_ref
cef_base_ref_counted_t.release
cef_initialize
on_before_command_line_processing
on_register_custom_schemes
get_browser_process_handler

Process args: --type=zygote --no-sandbox --log-file=/home/guesdon/compils/cefcapi/Release/debug.log --log-severity=warning --lang=en-US

initialize_cef_app
initialize_cef_base_ref_counted
cef_base_ref_counted_t.size = 72
cef_execute_process, argc=6
cef_base_ref_counted_t.add_ref
cef_base_ref_counted_t.release
on_before_command_line_processing
on_register_custom_schemes
get_resource_bundle_handler

Process args: --type=gpu-process --no-sandbox --log-file=/home/guesdon/compils/cefcapi/Release/debug.log --log-severity=warning --lang=en-US --gpu-preferences=KAAAAAAAAACAAACAAQAAAAAAAAAAAGAAEAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAA --log-file=/home/guesdon/compils/cefcapi/Release/debug.log --log-severity=warning --lang=en-US --service-request-channel-token=CED78BB91B0C5D1CAE8E7B0C5B4CDEE5

initialize_cef_app
initialize_cef_base_ref_counted
cef_base_ref_counted_t.size = 72
cef_execute_process, argc=11
cef_base_ref_counted_t.add_ref
cef_base_ref_counted_t.release
on_before_command_line_processing
on_register_custom_schemes
initialize_gtk 2
create_gtk_window
Window xid 113246211
initialize_client_handler
initialize_cef_base_ref_counted
cef_base_ref_counted_t.size = 152
cef_browser_host_create_browser
cef_run_message_loop
get_keyboard_handler
get_life_span_handler
get_display_handler
get_render_handler
get_focus_handler
get_render_process_handler
get_resource_bundle_handler

zoggy
Newbie
 
Posts: 3
Joined: Fri May 18, 2018 5:41 am

Re: get_request_handler not called (using CAPI)

Postby zoggy » Fri May 18, 2018 7:23 am

In fact the include/ directory of your repository in not in sync with CEF 3.3359.1772. In particular, the get_geolocation_handler member does not exist any more.
zoggy
Newbie
 
Posts: 3
Joined: Fri May 18, 2018 5:41 am

Re: get_request_handler not called (using CAPI)

Postby Czarek » Fri May 18, 2018 7:24 am

It might be that you did not update CEF correctly. See README which states which CEF version is supported.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am


Return to Support Forum

Who is online

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