summaryrefslogtreecommitdiffstats
path: root/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp')
-rw-r--r--src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp b/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp
index 4acf69043..33c744f13 100644
--- a/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp
+++ b/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp
@@ -44,9 +44,13 @@
#include "pepper_renderer_host_factory_qt.h"
#include "pepper_flash_renderer_host_qt.h"
+#include "qtwebenginecoreglobal_p.h"
#include "base/memory/ptr_util.h"
#include "chrome/renderer/pepper/pepper_flash_font_file_host.h"
+#if QT_CONFIG(webengine_printing_and_pdf)
+#include "components/pdf/renderer/pepper_pdf_host.h"
+#endif // QT_CONFIG(webengine_printing_and_pdf)
#include "content/public/renderer/renderer_ppapi_host.h"
#include "ppapi/host/ppapi_host.h"
#include "ppapi/host/resource_host.h"
@@ -100,7 +104,7 @@ std::unique_ptr<ppapi::host::ResourceHost> PepperRendererHostFactoryQt::CreateRe
// We should either rename PPB_FlashFont_File to PPB_FontFile_Private or get
// rid of its use in PDF if possible.
if (host_->GetPpapiHost()->permissions().HasPermission(ppapi::PERMISSION_FLASH)
- || host_->GetPpapiHost()->permissions().HasPermission(ppapi::PERMISSION_PRIVATE)) {
+ || host_->GetPpapiHost()->permissions().HasPermission(ppapi::PERMISSION_PDF)) {
switch (message.type()) {
case PpapiHostMsg_FlashFontFile_Create::ID: {
ppapi::proxy::SerializedFontDescription description;
@@ -115,14 +119,14 @@ std::unique_ptr<ppapi::host::ResourceHost> PepperRendererHostFactoryQt::CreateRe
}
}
- if (host_->GetPpapiHost()->permissions().HasPermission(ppapi::PERMISSION_PRIVATE)) {
+#if QT_CONFIG(webengine_printing_and_pdf)
+ if (host_->GetPpapiHost()->permissions().HasPermission(ppapi::PERMISSION_PDF)) {
switch (message.type()) {
case PpapiHostMsg_PDF_Create::ID:
- // Not implemented
- break;
+ return std::make_unique<pdf::PepperPDFHost>(host_, instance, resource);
}
}
-
+#endif // QT_CONFIG(webengine_printing_and_pdf)
return nullptr;
}