Linux: Pass CefBrowser to CefPrintHandler callbacks

Issue #2196 resolved
Marshall Greenblatt
created an issue

The printing system in Chromium can support multiple simultaneous print jobs (one per CefBrowser instance). In order to implement this functionality in CEF on Linux it's necessary to differentiate the CefBrowser associated with each CefPrintHandler callback.

Multiple simultaneous print jobs should also be possible to implement on other platforms. However, the platform dialog implementation in Chromium cancels the additional print jobs. For example, in PrintingContextSystemDialogWin::AskUserForSettings on Windows the call to ShowPrintDialog returns an error when the print dialog is already displayed.

Comments (2)

  1. Marshall Greenblatt reporter

    Done in master revision dce5d5c, 3112 branch revision 141ab16 and 3071 branch revision 1ebbf3c.

    This can be tested in cefclient on Linux as follows:

    1. Run cefclient.
    2. Create a new window using Tests > New Window.
    3. Select Tests > Print for the 1st window. Don't dismiss the print dialog.
    4. Select Tests > Print for the 2nd window. Notice that both windows now have print dialogs.
    5. Continue the print dialogs in any order and notice that both documents are successfully printed.

    Note that on Windows the print job for the 2nd window will be canceled without displaying the print dialog as discussed above.

  2. Log in to comment