- 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

@@ -15,6 +15,7 @@ public:
TrackCallback(): gotit_(false) {}
void yes() { gotit_ = true; }
bool isSet() { return gotit_; }
void reset() { gotit_ = false; }
operator bool() const { return gotit_; }
protected:
bool gotit_;
@@ -111,7 +112,7 @@ public:
CefRefPtr<CefRequest> request,
CefString& redirectUrl,
CefRefPtr<CefStreamReader>& resourceStream,
CefString& mimeType,
CefRefPtr<CefResponse> response,
int loadFlags)
{
Lock();
@@ -122,7 +123,8 @@ public:
// Return the previously mapped resource
resourceStream = CefStreamReader::CreateForData(
(void*)it->second.first.c_str(), it->second.first.length());
mimeType = it->second.second;
response->SetMimeType(it->second.second);
response->SetStatus(200);
}
}
Unlock();