diff --git a/chromium_src/chrome/renderer/printing/print_web_view_helper.cc b/chromium_src/chrome/renderer/printing/print_web_view_helper.cc index fd73990dd2a8..e3f03b7fbfcd 100644 --- a/chromium_src/chrome/renderer/printing/print_web_view_helper.cc +++ b/chromium_src/chrome/renderer/printing/print_web_view_helper.cc @@ -352,7 +352,8 @@ float PrintWebViewHelper::RenderPageContent(blink::WebLocalFrame* frame, // Class that calls the Begin and End print functions on the frame and changes // the size of the view temporarily to support full page printing.. class PrepareFrameAndViewForPrint : public blink::WebViewClient, - public blink::WebLocalFrameClient { + public blink::WebLocalFrameClient, + public blink::WebWidgetClient { public: PrepareFrameAndViewForPrint(const PrintMsg_Print_Params& params, blink::WebLocalFrame* frame, @@ -368,6 +369,8 @@ class PrepareFrameAndViewForPrint : public blink::WebViewClient, // Prepares frame for printing. void StartPrinting(); + blink::WebWidgetClient* WidgetClient() override { return this; } + blink::WebLocalFrame* frame() { return frame_.GetFrame(); } const blink::WebNode& node() const { return node_to_print_; } @@ -512,7 +515,7 @@ void PrepareFrameAndViewForPrint::CopySelection( prefs.javascript_enabled = false; blink::WebView* web_view = blink::WebView::Create( - this, blink::mojom::PageVisibilityState::kVisible, nullptr); + this, this, blink::mojom::PageVisibilityState::kVisible, nullptr); owns_web_view_ = true; content::RenderView::ApplyWebPreferences(prefs, web_view); blink::WebLocalFrame* main_frame =