mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Make |origin_url| parameter to CefJSDialogHandler::OnJsDialog optional since it may be empty for non-standard schemes (issue #1106).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1621 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -81,8 +81,8 @@ class CefJSDialogHandler : public virtual CefBase {
|
|||||||
// modal or modeless. If a custom dialog is used the application must execute
|
// modal or modeless. If a custom dialog is used the application must execute
|
||||||
// |callback| once the custom dialog is dismissed.
|
// |callback| once the custom dialog is dismissed.
|
||||||
///
|
///
|
||||||
/*--cef(optional_param=accept_lang,optional_param=message_text,
|
/*--cef(optional_param=origin_url,optional_param=accept_lang,
|
||||||
optional_param=default_prompt_text)--*/
|
optional_param=message_text,optional_param=default_prompt_text)--*/
|
||||||
virtual bool OnJSDialog(CefRefPtr<CefBrowser> browser,
|
virtual bool OnJSDialog(CefRefPtr<CefBrowser> browser,
|
||||||
const CefString& origin_url,
|
const CefString& origin_url,
|
||||||
const CefString& accept_lang,
|
const CefString& accept_lang,
|
||||||
|
@ -32,10 +32,6 @@ int CEF_CALLBACK jsdialog_handler_on_jsdialog(
|
|||||||
DCHECK(browser);
|
DCHECK(browser);
|
||||||
if (!browser)
|
if (!browser)
|
||||||
return 0;
|
return 0;
|
||||||
// Verify param: origin_url; type: string_byref_const
|
|
||||||
DCHECK(origin_url);
|
|
||||||
if (!origin_url)
|
|
||||||
return 0;
|
|
||||||
// Verify param: callback; type: refptr_diff
|
// Verify param: callback; type: refptr_diff
|
||||||
DCHECK(callback);
|
DCHECK(callback);
|
||||||
if (!callback)
|
if (!callback)
|
||||||
@ -44,7 +40,8 @@ int CEF_CALLBACK jsdialog_handler_on_jsdialog(
|
|||||||
DCHECK(suppress_message);
|
DCHECK(suppress_message);
|
||||||
if (!suppress_message)
|
if (!suppress_message)
|
||||||
return 0;
|
return 0;
|
||||||
// Unverified params: accept_lang, message_text, default_prompt_text
|
// Unverified params: origin_url, accept_lang, message_text,
|
||||||
|
default_prompt_text
|
||||||
|
|
||||||
// Translate param: suppress_message; type: bool_byref
|
// Translate param: suppress_message; type: bool_byref
|
||||||
bool suppress_messageBool = (
|
bool suppress_messageBool = (
|
||||||
|
@ -31,15 +31,12 @@ bool CefJSDialogHandlerCToCpp::OnJSDialog(CefRefPtr<CefBrowser> browser,
|
|||||||
DCHECK(browser.get());
|
DCHECK(browser.get());
|
||||||
if (!browser.get())
|
if (!browser.get())
|
||||||
return false;
|
return false;
|
||||||
// Verify param: origin_url; type: string_byref_const
|
|
||||||
DCHECK(!origin_url.empty());
|
|
||||||
if (origin_url.empty())
|
|
||||||
return false;
|
|
||||||
// Verify param: callback; type: refptr_diff
|
// Verify param: callback; type: refptr_diff
|
||||||
DCHECK(callback.get());
|
DCHECK(callback.get());
|
||||||
if (!callback.get())
|
if (!callback.get())
|
||||||
return false;
|
return false;
|
||||||
// Unverified params: accept_lang, message_text, default_prompt_text
|
// Unverified params: origin_url, accept_lang, message_text,
|
||||||
|
default_prompt_text
|
||||||
|
|
||||||
// Translate param: suppress_message; type: bool_byref
|
// Translate param: suppress_message; type: bool_byref
|
||||||
int suppress_messageInt = suppress_message;
|
int suppress_messageInt = suppress_message;
|
||||||
|
Reference in New Issue
Block a user