- 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

@ -29,7 +29,8 @@ public:
// specified number of bytes have been read. If there is a response set
// |mime_type| to the mime type for the response.
virtual bool ProcessRequest(CefRefPtr<CefRequest> request,
CefString& mime_type, int* response_length)
CefRefPtr<CefResponse> response,
int* response_length)
{
REQUIRE_IO_THREAD();
@ -60,7 +61,8 @@ public:
handled = true;
// Set the resulting mime type
mime_type = "text/html";
response->SetMimeType("text/html");
response->SetStatus(200);
}
else if(strstr(url.c_str(), "client.png") != NULL) {
// Load the response image
@ -70,7 +72,9 @@ public:
if(LoadBinaryResource(IDS_LOGO, dwSize, pBytes)) {
data_ = std::string(reinterpret_cast<const char*>(pBytes), dwSize);
handled = true;
mime_type = "image/png";
// Set the resulting mime type
response->SetMimeType("image/jpg");
response->SetStatus(200);
}
#elif defined(__APPLE__)
if(LoadBinaryResource("logo.png", data_)) {