summaryrefslogtreecommitdiffstats
path: root/src/core/printing/pdf_web_contents_helper_client_qt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/printing/pdf_web_contents_helper_client_qt.h')
-rw-r--r--src/core/printing/pdf_web_contents_helper_client_qt.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/core/printing/pdf_web_contents_helper_client_qt.h b/src/core/printing/pdf_web_contents_helper_client_qt.h
new file mode 100644
index 000000000..ccc552986
--- /dev/null
+++ b/src/core/printing/pdf_web_contents_helper_client_qt.h
@@ -0,0 +1,27 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef PDF_WEB_CONTENTS_HELPER_CLIENT_QT_H
+#define PDF_WEB_CONTENTS_HELPER_CLIENT_QT_H
+
+#include "components/pdf/browser/pdf_web_contents_helper_client.h"
+
+// based on chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h:
+class PDFWebContentsHelperClientQt : public pdf::PDFWebContentsHelperClient
+{
+public:
+ PDFWebContentsHelperClientQt();
+ PDFWebContentsHelperClientQt(const PDFWebContentsHelperClientQt&) = delete;
+ PDFWebContentsHelperClientQt& operator=(const PDFWebContentsHelperClientQt&) = delete;
+ ~PDFWebContentsHelperClientQt() override;
+
+private:
+ // pdf::PDFWebContentsHelperClient:
+ content::RenderFrameHost* FindPdfFrame(content::WebContents *contents) override;
+ void UpdateContentRestrictions(content::WebContents *contents, int content_restrictions) override {}
+ void OnPDFHasUnsupportedFeature(content::WebContents *contents) override {}
+ void OnSaveURL(content::WebContents *contents) override {}
+ void SetPluginCanSave(content::WebContents *contents, bool can_save) override;
+};
+
+#endif // PDF_WEB_CONTENTS_HELPER_CLIENT_QT_H