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:
Marshall Greenblatt
2012-09-27 22:52:15 +00:00
parent c4a2ee9b8d
commit 149ae3df88
16 changed files with 464 additions and 0 deletions

View File

@ -16,6 +16,7 @@
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h"
#include "libcef_dll/ctocpp/frame_ctocpp.h"
#include "libcef_dll/ctocpp/quota_callback_ctocpp.h"
#include "libcef_dll/ctocpp/request_ctocpp.h"
@ -167,6 +168,39 @@ int CEF_CALLBACK request_handler_get_auth_credentials(
return _retval;
}
int CEF_CALLBACK request_handler_on_quota_request(
struct _cef_request_handler_t* self, cef_browser_t* browser,
const cef_string_t* origin_url, int64 new_size,
cef_quota_callback_t* callback) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return 0;
// Verify param: origin_url; type: string_byref_const
DCHECK(origin_url);
if (!origin_url)
return 0;
// Verify param: callback; type: refptr_diff
DCHECK(callback);
if (!callback)
return 0;
// Execute
bool _retval = CefRequestHandlerCppToC::Get(self)->OnQuotaRequest(
CefBrowserCToCpp::Wrap(browser),
CefString(origin_url),
new_size,
CefQuotaCallbackCToCpp::Wrap(callback));
// Return type: bool
return _retval;
}
cef_cookie_manager_t* CEF_CALLBACK request_handler_get_cookie_manager(
struct _cef_request_handler_t* self, cef_browser_t* browser,
const cef_string_t* main_url) {
@ -241,6 +275,7 @@ CefRequestHandlerCppToC::CefRequestHandlerCppToC(CefRequestHandler* cls)
struct_.struct_.get_resource_handler = request_handler_get_resource_handler;
struct_.struct_.on_resource_redirect = request_handler_on_resource_redirect;
struct_.struct_.get_auth_credentials = request_handler_get_auth_credentials;
struct_.struct_.on_quota_request = request_handler_on_quota_request;
struct_.struct_.get_cookie_manager = request_handler_get_cookie_manager;
struct_.struct_.on_protocol_execution = request_handler_on_protocol_execution;
}