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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 477263003: pdf: Create a separate component for using the pdf pepper plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 months 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/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index b122262248ba5aedc70ad68f28dec4eee65a0b39..4dbabc2e83fa686ed5e484c36d187be92bb6f632 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -51,7 +51,6 @@
#include "chrome/renderer/net_benchmarking_extension.h"
#include "chrome/renderer/page_load_histograms.h"
#include "chrome/renderer/pepper/pepper_helper.h"
-#include "chrome/renderer/pepper/ppb_pdf_impl.h"
#include "chrome/renderer/playback_extension.h"
#include "chrome/renderer/plugins/chrome_plugin_placeholder.h"
#include "chrome/renderer/plugins/plugin_uma.h"
@@ -75,6 +74,7 @@
#include "components/dom_distiller/core/url_constants.h"
#include "components/nacl/renderer/ppb_nacl_private_impl.h"
#include "components/password_manager/content/renderer/credential_manager_client.h"
+#include "components/pdf/renderer/ppb_pdf_impl.h"
#include "components/plugins/renderer/mobile_youtube_plugin.h"
#include "components/signin/core/common/profile_management_switches.h"
#include "components/visitedlink/renderer/visitedlink_slave.h"
@@ -136,6 +136,10 @@
#include "chrome_elf/blacklist/blacklist.h"
#endif
+#if defined(ENABLE_FULL_PRINTING)
Lei Zhang 2014/08/26 22:41:30 nit: can you move this up to be with the other ENA
sadrul 2014/08/27 00:09:52 Done.
+#include "chrome/renderer/pepper/chrome_pdf_print_delegate.h"
+#endif
+
using autofill::AutofillAgent;
using autofill::PasswordAutofillAgent;
using autofill::PasswordGenerationAgent;
@@ -421,6 +425,10 @@ void ChromeContentRendererClient::RenderThreadStarted() {
if (blacklist::IsBlacklistInitialized())
UMA_HISTOGRAM_BOOLEAN("Blacklist.PatchedInRenderer", true);
#endif
+#if defined(ENABLE_FULL_PRINTING)
+ pdf_print_delegate_.reset(new ChromePDFPrintDelegate());
+ pdf::PPB_PDF_Impl::SetPrintDelegate(pdf_print_delegate_.get());
+#endif
}
void ChromeContentRendererClient::RenderFrameCreated(
@@ -1394,7 +1402,7 @@ const void* ChromeContentRendererClient::CreatePPAPIInterface(
return nacl::GetNaClPrivateInterface();
#endif // DISABLE_NACL
if (interface_name == PPB_PDF_INTERFACE)
- return PPB_PDF_Impl::GetInterface();
+ return pdf::PPB_PDF_Impl::GetInterface();
#endif
return NULL;
}

Powered by Google App Engine
This is Rietveld 408576698