private int on_quota_request(cef_request_handler_t *self, cef_browser_t *browser, cef_string_t *origin_url, long new_size, cef_quota_callback_t *callback) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_origin_url = cef_string_t.ToString(origin_url); var m_callback = CefQuotaCallback.FromNative(callback); var result = OnQuotaRequest(m_browser, m_origin_url, new_size, m_callback); return(result ? 1 : 0); }
/// <summary> /// 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::Continue() either in /// this method or at a later time to grant or deny the request. Return false /// to cancel the request. /// </summary> protected virtual bool OnQuotaRequest(CefBrowser browser, string originUrl, long newSize, CefQuotaCallback callback) { callback.Continue(true); return(true); }
/// <summary> /// 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::Continue() either in /// this method or at a later time to grant or deny the request. Return false /// to cancel the request. /// </summary> protected virtual bool OnQuotaRequest(CefBrowser browser, string originUrl, long newSize, CefQuotaCallback callback) { callback.Continue(true); return true; }