Split WebWidgetClient and WebViewClient
https://chromium-review.googlesource.com/c/chromium/src/+/1134427
This commit is contained in:
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
|
||||
// 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 =
|
||||
|
|
Loading…
Reference in a new issue