| Index: android_webview/renderer/print_web_view_helper.cc
|
| diff --git a/android_webview/renderer/print_web_view_helper.cc b/android_webview/renderer/print_web_view_helper.cc
|
| index 006a37107d3e18f90e9e2f5a21b0c5950a93baf7..11296796921b8bc2adf1e35680fe6a35a680a07e 100644
|
| --- a/android_webview/renderer/print_web_view_helper.cc
|
| +++ b/android_webview/renderer/print_web_view_helper.cc
|
| @@ -19,9 +19,9 @@
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| +#include "content/public/common/web_preferences.h"
|
| #include "content/public/renderer/render_thread.h"
|
| #include "content/public/renderer/render_view.h"
|
| -#include "content/public/renderer/web_preferences.h"
|
| #include "net/base/escape.h"
|
| #include "printing/metafile.h"
|
| #include "printing/metafile_impl.h"
|
| @@ -44,13 +44,14 @@
|
| #include "third_party/WebKit/public/web/WebViewClient.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| -#include "webkit/common/webpreferences.h"
|
|
|
| // This code is copied from chrome/renderer/printing. Code is slightly
|
| // modified to run it with webview, and the modifications are marked
|
| // using OS_ANDROID.
|
| // TODO(sgurun): remove the code as part of componentization of printing.
|
|
|
| +using content::WebPreferences;
|
| +
|
| namespace printing {
|
|
|
| namespace {
|
| @@ -665,8 +666,7 @@ void PrepareFrameAndViewForPrint::CopySelection(
|
|
|
| blink::WebView* web_view = blink::WebView::create(this);
|
| owns_web_view_ = true;
|
| - content::ApplyWebPreferences(prefs, web_view);
|
| -
|
| + content::RenderView::ApplyWebPreferences(prefs, web_view);
|
| web_view->setMainFrame(blink::WebLocalFrame::create(this));
|
| frame_.Reset(web_view->mainFrame()->toWebLocalFrame());
|
| node_to_print_.reset();
|
| @@ -1590,9 +1590,8 @@ bool PrintWebViewHelper::RenderPagesForPrint(blink::WebLocalFrame* frame,
|
| return false;
|
| const PrintMsg_PrintPages_Params& params = *print_pages_params_;
|
| const PrintMsg_Print_Params& print_params = params.params;
|
| - prep_frame_view_.reset(
|
| - new PrepareFrameAndViewForPrint(print_params, frame, node,
|
| - ignore_css_margins_));
|
| + prep_frame_view_.reset(new PrepareFrameAndViewForPrint(
|
| + print_params, frame, node, ignore_css_margins_));
|
| DCHECK(!print_pages_params_->params.selection_only ||
|
| print_pages_params_->pages.empty());
|
| prep_frame_view_->CopySelectionIfNeeded(
|
|
|