| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/renderer/pepper/chrome_pdf_print_client.h" | 5 #include "chrome/renderer/pepper/chrome_pdf_print_client.h" |
| 6 | 6 |
| 7 #include "chrome/renderer/printing/print_web_view_helper.h" | 7 #include "components/printing/renderer/print_web_view_helper.h" |
| 8 #include "content/public/renderer/pepper_plugin_instance.h" | 8 #include "content/public/renderer/pepper_plugin_instance.h" |
| 9 #include "content/public/renderer/render_view.h" | 9 #include "content/public/renderer/render_view.h" |
| 10 #include "third_party/WebKit/public/web/WebDocument.h" | 10 #include "third_party/WebKit/public/web/WebDocument.h" |
| 11 #include "third_party/WebKit/public/web/WebElement.h" | 11 #include "third_party/WebKit/public/web/WebElement.h" |
| 12 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 12 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 13 #include "third_party/WebKit/public/web/WebPluginContainer.h" | 13 #include "third_party/WebKit/public/web/WebPluginContainer.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 blink::WebElement GetWebElement(PP_Instance instance_id) { | 17 blink::WebElement GetWebElement(PP_Instance instance_id) { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 46 | 46 |
| 47 bool ChromePDFPrintClient::Print(PP_Instance instance_id) { | 47 bool ChromePDFPrintClient::Print(PP_Instance instance_id) { |
| 48 blink::WebElement element = GetWebElement(instance_id); | 48 blink::WebElement element = GetWebElement(instance_id); |
| 49 printing::PrintWebViewHelper* helper = GetPrintWebViewHelper(element); | 49 printing::PrintWebViewHelper* helper = GetPrintWebViewHelper(element); |
| 50 if (helper) { | 50 if (helper) { |
| 51 helper->PrintNode(element); | 51 helper->PrintNode(element); |
| 52 return true; | 52 return true; |
| 53 } | 53 } |
| 54 return false; | 54 return false; |
| 55 } | 55 } |
| OLD | NEW |