- Auto-generate all C/C++ translation code (issue #33).

- Change index parameter types from int to size_t to make 0-based range implicit.
- Make CefPrintOptions and CefMenuInfo proper wrapper classes.
- Normalize the naming of menu-related types.
- Remove unused command_line variable from test_suite.cc.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@408 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-12-08 01:38:30 +00:00
parent b4653ce1da
commit 64e08c2918
238 changed files with 14703 additions and 4322 deletions

View File

@ -4,8 +4,8 @@
//
// ---------------------------------------------------------------------------
//
// A portion of this file was generated by the CEF translator tool. When
// making changes by hand only do so within the body of existing function
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
@ -21,66 +21,139 @@ int CEF_CALLBACK jsdialog_handler_on_jsalert(
struct _cef_jsdialog_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, const cef_string_t* message)
{
// 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: frame; type: refptr_diff
DCHECK(frame);
if (!frame)
return 0;
// Verify param: message; type: string_byref_const
DCHECK(message);
if (!self || !browser || !frame || !message)
if (!message)
return 0;
return CefJSDialogHandlerCppToC::Get(self)->OnJSAlert(
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
// Execute
bool _retval = CefJSDialogHandlerCppToC::Get(self)->OnJSAlert(
CefBrowserCToCpp::Wrap(browser),
CefFrameCToCpp::Wrap(frame),
CefString(message));
// Return type: bool
return _retval;
}
int CEF_CALLBACK jsdialog_handler_on_jsconfirm(
struct _cef_jsdialog_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, const cef_string_t* message, int* retval)
{
// 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: frame; type: refptr_diff
DCHECK(frame);
if (!frame)
return 0;
// Verify param: message; type: string_byref_const
DCHECK(message);
if (!message)
return 0;
// Verify param: retval; type: bool_byref
DCHECK(retval);
if (!self || !browser || !frame || !message || !retval)
if (!retval)
return 0;
bool ret = false;
int rv = CefJSDialogHandlerCppToC::Get(self)->OnJSConfirm(
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
CefString(message), ret);
*retval = (ret ? 1 : 0);
// Translate param: retval; type: bool_byref
bool retvalBool = (retval && *retval)?true:false;
return rv;
// Execute
bool _retval = CefJSDialogHandlerCppToC::Get(self)->OnJSConfirm(
CefBrowserCToCpp::Wrap(browser),
CefFrameCToCpp::Wrap(frame),
CefString(message),
retvalBool);
// Restore param: retval; type: bool_byref
if (retval)
*retval = retvalBool?true:false;
// Return type: bool
return _retval;
}
int CEF_CALLBACK jsdialog_handler_on_jsprompt(
struct _cef_jsdialog_handler_t* self, cef_browser_t* browser,
cef_frame_t* frame, const cef_string_t* message,
const cef_string_t* defaultValue, int* retval, cef_string_t* result)
{
// 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: frame; type: refptr_diff
DCHECK(frame);
if (!frame)
return 0;
// Verify param: message; type: string_byref_const
DCHECK(message);
if (!message)
return 0;
// Verify param: defaultValue; type: string_byref_const
DCHECK(defaultValue);
if (!defaultValue)
return 0;
// Verify param: retval; type: bool_byref
DCHECK(retval);
if (!retval)
return 0;
// Verify param: result; type: string_byref
DCHECK(result);
if (!self || !browser || !frame || !message || !defaultValue || !retval ||
!result)
if (!result)
return 0;
bool ret = false;
// Translate param: retval; type: bool_byref
bool retvalBool = (retval && *retval)?true:false;
// Translate param: result; type: string_byref
CefString resultStr(result);
int rv = CefJSDialogHandlerCppToC::Get(self)->OnJSPrompt(
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
CefString(message), CefString(defaultValue), ret, resultStr);
*retval = (ret ? 1 : 0);
return rv;
// Execute
bool _retval = CefJSDialogHandlerCppToC::Get(self)->OnJSPrompt(
CefBrowserCToCpp::Wrap(browser),
CefFrameCToCpp::Wrap(frame),
CefString(message),
CefString(defaultValue),
retvalBool,
resultStr);
// Restore param: retval; type: bool_byref
if (retval)
*retval = retvalBool?true:false;
// Return type: bool
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefJSDialogHandlerCppToC::CefJSDialogHandlerCppToC(CefJSDialogHandler* cls)