C++ how to use CefURLRequest::Create
Posted: Thu Mar 10, 2016 12:01 pm
Hi,
I'm trying to find a way to use this CEF method. CefURLRequest::Create without any success.
I found in the file urlrequest_test.cc these calls.
How can I get a call to my own callback of ::OnRequestComplete.
Any idea of a simple implementation how to use this.
The test code seems way to complicated to use.
Thanks
I'm trying to find a way to use this CEF method. CefURLRequest::Create without any success.
I found in the file urlrequest_test.cc these calls.
- Code: Select all
// Create a CefRequest for the specified URL.
CefRefPtr<CefRequest> cef_request = CefRequest::Create();
cef_request->SetURL(url);
cef_request->SetMethod("GET");
// Callback to be executed on request completion.
// It's safe to use base::Unretained() here because there is only one
// RequestClient pending at any given time and we explicitly detach the
// callback in the Handler destructor.
const RequestClient::Callback& request_callback =
base::Bind(&Handler::OnRequestComplete, base::Unretained(this));
// Create and start the new CefURLRequest.
urlrequest_ = CefURLRequest::Create(cef_request,
new RequestClient(request_callback),
NULL);
How can I get a call to my own callback of ::OnRequestComplete.
Any idea of a simple implementation how to use this.
The test code seems way to complicated to use.
Thanks