Add CefPrintHandler::OnPrintStart callback (issue #1736)

This commit is contained in:
Marshall Greenblatt
2015-10-12 16:45:14 -04:00
parent f7d9457c20
commit 1f21fe5412
13 changed files with 143 additions and 9 deletions

View File

@@ -95,6 +95,15 @@ typedef struct _cef_print_handler_t {
///
cef_base_t base;
///
// Called when printing has started for the specified |browser|. This function
// will be called before the other OnPrint*() functions and irrespective of
// how printing was initiated (e.g. cef_browser_host_t::print(), JavaScript
// window.print() or PDF extension print button).
///
void (CEF_CALLBACK *on_print_start)(struct _cef_print_handler_t* self,
struct _cef_browser_t* browser);
///
// Synchronize |settings| with client state. If |get_defaults| is true (1)
// then populate |settings| with the default print settings. Do not keep a

View File

@@ -82,6 +82,15 @@ class CefPrintJobCallback : public virtual CefBase {
/*--cef(source=client)--*/
class CefPrintHandler : public virtual CefBase {
public:
///
// Called when printing has started for the specified |browser|. This method
// will be called before the other OnPrint*() methods and irrespective of how
// printing was initiated (e.g. CefBrowserHost::Print(), JavaScript
// window.print() or PDF extension print button).
///
/*--cef()--*/
virtual void OnPrintStart(CefRefPtr<CefBrowser> browser) =0;
///
// Synchronize |settings| with client state. If |get_defaults| is true then
// populate |settings| with the default print settings. Do not keep a