parent
8d9f24d369
commit
816c2f1893
1 changed files with 5 additions and 2 deletions
|
@ -352,7 +352,8 @@ float PrintWebViewHelper::RenderPageContent(blink::WebLocalFrame* frame,
|
||||||
// Class that calls the Begin and End print functions on the frame and changes
|
// 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..
|
// the size of the view temporarily to support full page printing..
|
||||||
class PrepareFrameAndViewForPrint : public blink::WebViewClient,
|
class PrepareFrameAndViewForPrint : public blink::WebViewClient,
|
||||||
public blink::WebLocalFrameClient {
|
public blink::WebLocalFrameClient,
|
||||||
|
public blink::WebWidgetClient {
|
||||||
public:
|
public:
|
||||||
PrepareFrameAndViewForPrint(const PrintMsg_Print_Params& params,
|
PrepareFrameAndViewForPrint(const PrintMsg_Print_Params& params,
|
||||||
blink::WebLocalFrame* frame,
|
blink::WebLocalFrame* frame,
|
||||||
|
@ -368,6 +369,8 @@ class PrepareFrameAndViewForPrint : public blink::WebViewClient,
|
||||||
// Prepares frame for printing.
|
// Prepares frame for printing.
|
||||||
void StartPrinting();
|
void StartPrinting();
|
||||||
|
|
||||||
|
blink::WebWidgetClient* WidgetClient() override { return this; }
|
||||||
|
|
||||||
blink::WebLocalFrame* frame() { return frame_.GetFrame(); }
|
blink::WebLocalFrame* frame() { return frame_.GetFrame(); }
|
||||||
|
|
||||||
const blink::WebNode& node() const { return node_to_print_; }
|
const blink::WebNode& node() const { return node_to_print_; }
|
||||||
|
@ -512,7 +515,7 @@ void PrepareFrameAndViewForPrint::CopySelection(
|
||||||
prefs.javascript_enabled = false;
|
prefs.javascript_enabled = false;
|
||||||
|
|
||||||
blink::WebView* web_view = blink::WebView::Create(
|
blink::WebView* web_view = blink::WebView::Create(
|
||||||
this, blink::mojom::PageVisibilityState::kVisible, nullptr);
|
this, this, blink::mojom::PageVisibilityState::kVisible, nullptr);
|
||||||
owns_web_view_ = true;
|
owns_web_view_ = true;
|
||||||
content::RenderView::ApplyWebPreferences(prefs, web_view);
|
content::RenderView::ApplyWebPreferences(prefs, web_view);
|
||||||
blink::WebLocalFrame* main_frame =
|
blink::WebLocalFrame* main_frame =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue