Allow custom schemes to cause redirects (issue #98).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@223 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-04-21 18:17:46 +00:00
parent f18083e5df
commit 06718b4049
8 changed files with 151 additions and 52 deletions

View File

@ -20,15 +20,18 @@ public:
ClientSchemeHandler() : offset_(0) {}
// Process the request. All response generation should take place in this
// method. If there is no response set |response_length| to zero and
// ReadResponse() will not be called. If the response length is not known then
// set |response_length| to -1 and ReadResponse() will be called until it
// returns false or until the value of |bytes_read| is set to 0. Otherwise,
// set |response_length| to a positive value and ReadResponse() will be called
// until it returns false, the value of |bytes_read| is set to 0 or the
// specified number of bytes have been read. If there is a response set
// |mime_type| to the mime type for the response.
// method. If there is no response set |response_length| to zero or return
// false and ReadResponse() will not be called. If the response length is not
// known set |response_length| to -1 and ReadResponse() will be called until
// it returns false or until the value of |bytes_read| is set to 0. If the
// response length is known set |response_length| to a positive value and
// ReadResponse() will be called until it returns false, the value of
// |bytes_read| is set to 0 or the specified number of bytes have been read.
// Use the |response| object to set the mime type, http status code and
// optional header values for the response and return true. To redirect the
// request to a new URL set |redirectUrl| to the new URL and return true.
virtual bool ProcessRequest(CefRefPtr<CefRequest> request,
CefString& redirectUrl,
CefRefPtr<CefResponse> response,
int* response_length)
{