- Add support for returning an HTTP status code from HandleBeforeResourceLoad and custom scheme handlers via the CefResponse class (issue #202).

- Add unit tests for custom scheme handlers (issue #221).
- Fix reversed enable/disable of stop and reload buttons in cefclient.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@222 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-04-21 16:46:16 +00:00
parent f9c9c9318c
commit f18083e5df
25 changed files with 654 additions and 69 deletions

View File

@ -12,24 +12,25 @@
#include "libcef_dll/cpptoc/scheme_handler_cpptoc.h"
#include "libcef_dll/ctocpp/request_ctocpp.h"
#include "libcef_dll/ctocpp/response_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK scheme_handler_process_request(
struct _cef_scheme_handler_t* self, cef_request_t* request,
cef_string_t* mime_type, int* response_length)
cef_response_t* response, int* response_length)
{
DCHECK(self);
DCHECK(request);
DCHECK(mime_type);
DCHECK(response);
DCHECK(response_length);
if(!self || !request || !mime_type || !response_length)
if(!self || !request || !response || !response_length)
return 0;
CefString mimeTypeStr(mime_type);
return CefSchemeHandlerCppToC::Get(self)->ProcessRequest(
CefRequestCToCpp::Wrap(request), mimeTypeStr, response_length);
CefRequestCToCpp::Wrap(request), CefResponseCToCpp::Wrap(response),
response_length);
}
void CEF_CALLBACK scheme_handler_cancel(struct _cef_scheme_handler_t* self)