electron_content_client.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 <vector>
  7. #include "base/files/file_path.h"
  8. #include "content/public/common/content_client.h"
  9. namespace electron {
  10. class ElectronContentClient : public content::ContentClient {
  11. public:
  12. ElectronContentClient();
  13. ~ElectronContentClient() override;
  14. protected:
  15. // content::ContentClient:
  16. std::u16string GetLocalizedString(int message_id) override;
  17. base::StringPiece GetDataResource(int resource_id,
  18. ui::ResourceScaleFactor) override;
  19. gfx::Image& GetNativeImageNamed(int resource_id) override;
  20. base::RefCountedMemory* GetDataResourceBytes(int resource_id) override;
  21. void AddAdditionalSchemes(Schemes* schemes) override;
  22. void AddPepperPlugins(
  23. std::vector<content::PepperPluginInfo>* plugins) override;
  24. void AddContentDecryptionModules(
  25. std::vector<content::CdmInfo>* cdms,
  26. std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
  27. private:
  28. DISALLOW_COPY_AND_ASSIGN(ElectronContentClient);
  29. };
  30. } // namespace electron
  31. #endif // SHELL_APP_ELECTRON_CONTENT_CLIENT_H_