| Index: chrome/renderer/print_web_view_helper.cc
|
| diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc
|
| index 1b4008a97bcaa5d503a430d14b999bc5e1d91754..cfa6e62d642020b1dd86edf8f06c0f78f77db959 100644
|
| --- a/chrome/renderer/print_web_view_helper.cc
|
| +++ b/chrome/renderer/print_web_view_helper.cc
|
| @@ -45,6 +45,9 @@
|
| #include "skia/ext/vector_canvas.h"
|
| #include "skia/ext/vector_platform_device_skia.h"
|
| #include "third_party/skia/include/core/SkTypeface.h"
|
| +#if defined (OS_WIN)
|
| +#include "content/common/child_process_messages.h"
|
| +#endif
|
| #elif defined(OS_MACOSX)
|
| #include <CoreGraphics/CGContext.h>
|
|
|
| @@ -442,9 +445,20 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view)
|
| is_print_ready_metafile_sent_(false),
|
| user_cancelled_scripted_print_count_(0),
|
| notify_browser_of_print_failure_(true) {
|
| +#if defined(OS_WIN) && defined(USE_SKIA)
|
| + if (!g_SandboxSupport) {
|
| + g_SandboxSupport = this;
|
| + }
|
| +#endif
|
| }
|
|
|
| -PrintWebViewHelper::~PrintWebViewHelper() {}
|
| +PrintWebViewHelper::~PrintWebViewHelper() {
|
| +#if defined(OS_WIN) && defined(USE_SKIA)
|
| + if (g_SandboxSupport == this) {
|
| + g_SandboxSupport = NULL;
|
| + }
|
| +#endif
|
| +}
|
|
|
| // Prints |frame| which called window.print().
|
| void PrintWebViewHelper::PrintPage(WebKit::WebFrame* frame) {
|
| @@ -1569,3 +1583,10 @@ void PrintWebViewHelper::PrintPreviewContext::ClearContext() {
|
| pages_to_render_.clear();
|
| error_ = PREVIEW_ERROR_NONE;
|
| }
|
| +
|
| +#if defined(OS_WIN) && defined(USE_SKIA)
|
| +void PrintWebViewHelper::EnsureFontLoad(LOGFONT logfont) {
|
| + // This is a synchronized IPC message, will block caller thread.
|
| + Send(new ChildProcessHostMsg_PreCacheFont(logfont));
|
| +}
|
| +#endif
|
|
|