mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- 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:
@ -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,16 +21,39 @@ int CEF_CALLBACK print_handler_get_print_options(
|
||||
struct _cef_print_handler_t* self, cef_browser_t* browser,
|
||||
struct _cef_print_options_t* printOptions)
|
||||
{
|
||||
// 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: printOptions; type: struct_byref
|
||||
DCHECK(printOptions);
|
||||
if (!self || !browser || !printOptions)
|
||||
if (!printOptions)
|
||||
return 0;
|
||||
|
||||
return CefPrintHandlerCppToC::Get(self)->GetPrintOptions(
|
||||
CefBrowserCToCpp::Wrap(browser), *printOptions);
|
||||
// Translate param: printOptions; type: struct_byref
|
||||
CefPrintOptions printOptionsObj;
|
||||
if (printOptions)
|
||||
printOptionsObj.AttachTo(*printOptions);
|
||||
|
||||
// Execute
|
||||
bool _retval = CefPrintHandlerCppToC::Get(self)->GetPrintOptions(
|
||||
CefBrowserCToCpp::Wrap(browser),
|
||||
printOptionsObj);
|
||||
|
||||
// Restore param: printOptions; type: struct_byref
|
||||
if (printOptions)
|
||||
printOptionsObj.DetachTo(*printOptions);
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
|
||||
int CEF_CALLBACK print_handler_get_print_header_footer(
|
||||
struct _cef_print_handler_t* self, cef_browser_t* browser,
|
||||
cef_frame_t* frame, const cef_print_info_t* printInfo,
|
||||
@ -39,36 +62,95 @@ int CEF_CALLBACK print_handler_get_print_header_footer(
|
||||
cef_string_t* topRight, cef_string_t* bottomLeft,
|
||||
cef_string_t* bottomCenter, cef_string_t* bottomRight)
|
||||
{
|
||||
// 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: printInfo; type: struct_byref_const
|
||||
DCHECK(printInfo);
|
||||
if (!printInfo)
|
||||
return 0;
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(url);
|
||||
if (!url)
|
||||
return 0;
|
||||
// Verify param: title; type: string_byref_const
|
||||
DCHECK(title);
|
||||
if (!title)
|
||||
return 0;
|
||||
// Verify param: topLeft; type: string_byref
|
||||
DCHECK(topLeft);
|
||||
if (!topLeft)
|
||||
return 0;
|
||||
// Verify param: topCenter; type: string_byref
|
||||
DCHECK(topCenter);
|
||||
if (!topCenter)
|
||||
return 0;
|
||||
// Verify param: topRight; type: string_byref
|
||||
DCHECK(topRight);
|
||||
if (!topRight)
|
||||
return 0;
|
||||
// Verify param: bottomLeft; type: string_byref
|
||||
DCHECK(bottomLeft);
|
||||
if (!bottomLeft)
|
||||
return 0;
|
||||
// Verify param: bottomCenter; type: string_byref
|
||||
DCHECK(bottomCenter);
|
||||
if (!bottomCenter)
|
||||
return 0;
|
||||
// Verify param: bottomRight; type: string_byref
|
||||
DCHECK(bottomRight);
|
||||
if (!self || !browser || !frame || !printInfo || !url || !title || !topLeft ||
|
||||
!topCenter || !topRight || !bottomLeft || !bottomCenter || !bottomRight)
|
||||
if (!bottomRight)
|
||||
return 0;
|
||||
|
||||
// Translate param: printInfo; type: struct_byref_const
|
||||
CefPrintInfo printInfoObj;
|
||||
if (printInfo)
|
||||
printInfoObj.Set(*printInfo, false);
|
||||
// Translate param: topLeft; type: string_byref
|
||||
CefString topLeftStr(topLeft);
|
||||
// Translate param: topCenter; type: string_byref
|
||||
CefString topCenterStr(topCenter);
|
||||
// Translate param: topRight; type: string_byref
|
||||
CefString topRightStr(topRight);
|
||||
// Translate param: bottomLeft; type: string_byref
|
||||
CefString bottomLeftStr(bottomLeft);
|
||||
// Translate param: bottomCenter; type: string_byref
|
||||
CefString bottomCenterStr(bottomCenter);
|
||||
// Translate param: bottomRight; type: string_byref
|
||||
CefString bottomRightStr(bottomRight);
|
||||
return CefPrintHandlerCppToC::Get(self)->GetPrintHeaderFooter(
|
||||
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame), *printInfo,
|
||||
CefString(url), CefString(title), currentPage, maxPages, topLeftStr,
|
||||
topCenterStr, topRightStr, bottomLeftStr, bottomCenterStr,
|
||||
|
||||
// Execute
|
||||
bool _retval = CefPrintHandlerCppToC::Get(self)->GetPrintHeaderFooter(
|
||||
CefBrowserCToCpp::Wrap(browser),
|
||||
CefFrameCToCpp::Wrap(frame),
|
||||
printInfoObj,
|
||||
CefString(url),
|
||||
CefString(title),
|
||||
currentPage,
|
||||
maxPages,
|
||||
topLeftStr,
|
||||
topCenterStr,
|
||||
topRightStr,
|
||||
bottomLeftStr,
|
||||
bottomCenterStr,
|
||||
bottomRightStr);
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefPrintHandlerCppToC::CefPrintHandlerCppToC(CefPrintHandler* cls)
|
||||
|
Reference in New Issue
Block a user