mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- 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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user