mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Move GetPrintHandler to CefClient (see issue #2196)
This new location is preferred because we now know the associated CefBrowser for all CefPrintHandler callbacks.
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=d07c33f1e14a7d42feac46fa1bf27dbfab50c97f$
|
||||
// $hash=15d1e044a5bc40ca25c72f070a9b996907c4c0cb$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/print_handler_cpptoc.h"
|
||||
@ -161,6 +161,7 @@ print_handler_on_print_reset(struct _cef_print_handler_t* self,
|
||||
|
||||
cef_size_t CEF_CALLBACK
|
||||
print_handler_get_pdf_paper_size(struct _cef_print_handler_t* self,
|
||||
cef_browser_t* browser,
|
||||
int device_units_per_inch) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
@ -169,10 +170,14 @@ print_handler_get_pdf_paper_size(struct _cef_print_handler_t* self,
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser);
|
||||
if (!browser)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval =
|
||||
CefPrintHandlerCppToC::Get(self)->GetPdfPaperSize(device_units_per_inch);
|
||||
cef_size_t _retval = CefPrintHandlerCppToC::Get(self)->GetPdfPaperSize(
|
||||
CefBrowserCToCpp::Wrap(browser), device_units_per_inch);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
|
Reference in New Issue
Block a user