Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5996)

Unified Diff: chrome/renderer/pepper/chrome_pdf_print_client.cc

Issue 2510753002: Revert of Make printing work better with OOPIF. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/pepper/chrome_pdf_print_client.cc
diff --git a/chrome/renderer/pepper/chrome_pdf_print_client.cc b/chrome/renderer/pepper/chrome_pdf_print_client.cc
index 4085c1025c1677e0ffbdf34e2bfcca60ec90d394..f3e6528daca4c2c12a93a2be5af48fb65e3a5c85 100644
--- a/chrome/renderer/pepper/chrome_pdf_print_client.cc
+++ b/chrome/renderer/pepper/chrome_pdf_print_client.cc
@@ -6,7 +6,7 @@
#include "components/printing/renderer/print_web_view_helper.h"
#include "content/public/renderer/pepper_plugin_instance.h"
-#include "content/public/renderer/render_frame.h"
+#include "content/public/renderer/render_view.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
@@ -26,15 +26,14 @@
const blink::WebElement& element) {
if (element.isNull())
return nullptr;
- auto* render_frame =
- content::RenderFrame::FromWebFrame(element.document().frame());
- return printing::PrintWebViewHelper::Get(render_frame);
+ blink::WebView* view = element.document().frame()->view();
+ content::RenderView* render_view = content::RenderView::FromWebView(view);
+ return printing::PrintWebViewHelper::Get(render_view);
}
} // namespace
ChromePDFPrintClient::ChromePDFPrintClient() {}
-
ChromePDFPrintClient::~ChromePDFPrintClient() {}
bool ChromePDFPrintClient::IsPrintingEnabled(PP_Instance instance_id) {
« no previous file with comments | « chrome/renderer/chrome_render_frame_observer.cc ('k') | chrome/renderer/printing/chrome_print_web_view_helper_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698