Add support for printing via CefBrowserHost::Print() and JavaScript window.print() (issue #505).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1479 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-10-23 19:30:47 +00:00
parent f248b937f9
commit bc1ea4974a
35 changed files with 1960 additions and 20 deletions

View File

@@ -26,6 +26,10 @@
#include "ui/base/resource/resource_bundle.h"
#include "v8/include/v8.h"
#if defined(OS_LINUX)
#include "chrome/browser/printing/print_dialog_gtk.h"
#endif
CefBrowserMainParts::CefBrowserMainParts(
const content::MainFunctionParams& parameters)
: BrowserMainParts(),
@@ -48,6 +52,11 @@ void CefBrowserMainParts::PostMainMessageLoopStart() {
// CEF's internal handling of "chrome://tracing".
content::WebUIControllerFactory::UnregisterFactoryForTesting(
content::ContentWebUIControllerFactory::GetInstance());
#if defined(OS_LINUX)
printing::PrintingContextGtk::SetCreatePrintDialogFunction(
&PrintDialogGtk::CreatePrintDialog);
#endif
}
int CefBrowserMainParts::PreCreateThreads() {