electron_content_client.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright (c) 2014 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef SHELL_APP_ELECTRON_CONTENT_CLIENT_H_
  5. #define SHELL_APP_ELECTRON_CONTENT_CLIENT_H_
  6. #include <set>
  7. #include <string>
  8. #include <vector>
  9. #include "base/files/file_path.h"
  10. #include "content/public/common/content_client.h"
  11. namespace electron {
  12. class ElectronContentClient : public content::ContentClient {
  13. public:
  14. ElectronContentClient();
  15. ~ElectronContentClient() override;
  16. protected:
  17. // content::ContentClient:
  18. std::u16string GetLocalizedString(int message_id) override;
  19. base::StringPiece GetDataResource(int resource_id, ui::ScaleFactor) override;
  20. gfx::Image& GetNativeImageNamed(int resource_id) override;
  21. base::RefCountedMemory* GetDataResourceBytes(int resource_id) override;
  22. void AddAdditionalSchemes(Schemes* schemes) override;
  23. void AddPepperPlugins(
  24. std::vector<content::PepperPluginInfo>* plugins) override;
  25. void AddContentDecryptionModules(
  26. std::vector<content::CdmInfo>* cdms,
  27. std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
  28. private:
  29. DISALLOW_COPY_AND_ASSIGN(ElectronContentClient);
  30. };
  31. } // namespace electron
  32. #endif // SHELL_APP_ELECTRON_CONTENT_CLIENT_H_