electron_pdf_web_contents_helper_client.h 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. // Copyright (c) 2015 Slack Technologies, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef ELECTRON_SHELL_BROWSER_ELECTRON_PDF_WEB_CONTENTS_HELPER_CLIENT_H_
  5. #define ELECTRON_SHELL_BROWSER_ELECTRON_PDF_WEB_CONTENTS_HELPER_CLIENT_H_
  6. #include "components/pdf/browser/pdf_web_contents_helper_client.h"
  7. namespace content {
  8. class WebContents;
  9. }
  10. class ElectronPDFWebContentsHelperClient
  11. : public pdf::PDFWebContentsHelperClient {
  12. public:
  13. ElectronPDFWebContentsHelperClient();
  14. ~ElectronPDFWebContentsHelperClient() override;
  15. private:
  16. // pdf::PDFWebContentsHelperClient
  17. content::RenderFrameHost* FindPdfFrame(
  18. content::WebContents* contents) override;
  19. void UpdateContentRestrictions(content::RenderFrameHost* render_frame_host,
  20. int content_restrictions) override;
  21. void OnPDFHasUnsupportedFeature(content::WebContents* contents) override;
  22. void OnSaveURL(content::WebContents* contents) override;
  23. void SetPluginCanSave(content::RenderFrameHost* render_frame_host,
  24. bool can_save) override;
  25. };
  26. #endif // ELECTRON_SHELL_BROWSER_ELECTRON_PDF_WEB_CONTENTS_HELPER_CLIENT_H_