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:
Marshall Greenblatt
2021-03-30 09:16:51 -07:00
parent f7a4c777e8
commit 7876a2f321
25 changed files with 112 additions and 129 deletions

View File

@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=f0cd169568e9ea5bcc8bf2aa891691b76c05356d$
// $hash=54c5210924095c7e43173a2843bd28729645922b$
//
#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_
@ -43,7 +43,6 @@
#include "include/capi/cef_base_capi.h"
#include "include/capi/cef_client_capi.h"
#include "include/capi/cef_command_line_capi.h"
#include "include/capi/cef_print_handler_capi.h"
#include "include/capi/cef_values_capi.h"
#ifdef __cplusplus
@ -98,13 +97,6 @@ typedef struct _cef_browser_process_handler_t {
struct _cef_browser_process_handler_t* self,
struct _cef_command_line_t* command_line);
///
// Return the handler for printing on Linux. If a print handler is not
// provided then printing will not be supported on the Linux platform.
///
struct _cef_print_handler_t*(CEF_CALLBACK* get_print_handler)(
struct _cef_browser_process_handler_t* self);
///
// Called from any thread when work has been scheduled for the browser process
// main (UI) thread. This callback is used in combination with CefSettings.

View File

@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=4cfcac55d2a1dee466a2a0753f30fb34a78ef3b2$
// $hash=14eca959988209ba8f95037a47192fd50d64f2f1$
//
#ifndef CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_
@ -53,6 +53,7 @@
#include "include/capi/cef_keyboard_handler_capi.h"
#include "include/capi/cef_life_span_handler_capi.h"
#include "include/capi/cef_load_handler_capi.h"
#include "include/capi/cef_print_handler_capi.h"
#include "include/capi/cef_process_message_capi.h"
#include "include/capi/cef_render_handler_capi.h"
#include "include/capi/cef_request_handler_capi.h"
@ -146,6 +147,13 @@ typedef struct _cef_client_t {
struct _cef_load_handler_t*(CEF_CALLBACK* get_load_handler)(
struct _cef_client_t* self);
///
// Return the handler for printing on Linux. If a print handler is not
// provided then printing will not be supported on the Linux platform.
///
struct _cef_print_handler_t*(CEF_CALLBACK* get_print_handler)(
struct _cef_client_t* self);
///
// Return the handler for off-screen rendering events.
///

View File

@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=54ed1e16c5c1d133bcd097350c5f5871228efd4f$
// $hash=84fc58b3898f25476d9cdd260553390ba5e0b30b$
//
#ifndef CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_
@ -148,6 +148,7 @@ typedef struct _cef_print_handler_t {
///
cef_size_t(CEF_CALLBACK* get_pdf_paper_size)(
struct _cef_print_handler_t* self,
struct _cef_browser_t* browser,
int device_units_per_inch);
} cef_print_handler_t;