mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add CefRequestHandler::OnQuotaRequest callback for handling webkitStorageInfo.requestQuota requests (issue #732).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@816 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -68,6 +68,27 @@ class CefAuthCallback : public virtual CefBase {
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Callback interface used for asynchronous continuation of quota requests.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefQuotaCallback : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Continue the quota request. If |allow| is true the request will be
|
||||
// allowed. Otherwise, the request will be denied.
|
||||
///
|
||||
/*--cef(capi_name=cont)--*/
|
||||
virtual void Continue(bool allow) =0;
|
||||
|
||||
///
|
||||
// Cancel the quota request.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Cancel() =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Implement this interface to handle events related to browser requests. The
|
||||
// methods of this class will be called on the thread indicated.
|
||||
@ -131,6 +152,22 @@ class CefRequestHandler : public virtual CefBase {
|
||||
return false;
|
||||
}
|
||||
|
||||
///
|
||||
// Called on the IO thread when JavaScript requests a specific storage quota
|
||||
// size via the webkitStorageInfo.requestQuota function. |origin_url| is the
|
||||
// origin of the page making the request. |new_size| is the requested quota
|
||||
// size in bytes. Return true and call CefQuotaCallback::Complete() either in
|
||||
// this function or at a later time to grant or deny the request. Return false
|
||||
// to cancel the request.
|
||||
///
|
||||
/*--cef(optional_param=realm)--*/
|
||||
virtual bool OnQuotaRequest(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& origin_url,
|
||||
int64 new_size,
|
||||
CefRefPtr<CefQuotaCallback> callback) {
|
||||
return false;
|
||||
}
|
||||
|
||||
///
|
||||
// Called on the IO thread to retrieve the cookie manager. |main_url| is the
|
||||
// URL of the top-level frame. Cookies managers can be unique per browser or
|
||||
|
Reference in New Issue
Block a user