pdf_web_contents_helper_client.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_CLIENT_H_
  5. #define COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_CLIENT_H_
  6. namespace content {
  7. class RenderFrameHost;
  8. class WebContents;
  9. }
  10. namespace pdf {
  11. class PDFWebContentsHelperClient {
  12. public:
  13. virtual ~PDFWebContentsHelperClient() = default;
  14. virtual content::RenderFrameHost* FindPdfFrame(
  15. content::WebContents* contents) = 0;
  16. virtual void UpdateContentRestrictions(content::WebContents* contents,
  17. int content_restrictions) = 0;
  18. virtual void OnPDFHasUnsupportedFeature(content::WebContents* contents) = 0;
  19. virtual void OnSaveURL(content::WebContents* contents) = 0;
  20. // Sets whether the PDF plugin can handle file saving internally.
  21. virtual void SetPluginCanSave(content::WebContents* contents,
  22. bool can_save) = 0;
  23. };
  24. } // namespace pdf
  25. #endif // COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_CLIENT_H_