electron_renderer_pepper_host_factory.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright (c) 2012 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 ELECTRON_SHELL_RENDERER_ELECTRON_RENDERER_PEPPER_HOST_FACTORY_H_
  5. #define ELECTRON_SHELL_RENDERER_ELECTRON_RENDERER_PEPPER_HOST_FACTORY_H_
  6. #include <memory>
  7. #include "base/compiler_specific.h"
  8. #include "ppapi/host/host_factory.h"
  9. namespace content {
  10. class RendererPpapiHost;
  11. }
  12. class ElectronRendererPepperHostFactory : public ppapi::host::HostFactory {
  13. public:
  14. explicit ElectronRendererPepperHostFactory(content::RendererPpapiHost* host);
  15. ~ElectronRendererPepperHostFactory() override;
  16. // disable copy
  17. ElectronRendererPepperHostFactory(const ElectronRendererPepperHostFactory&) =
  18. delete;
  19. ElectronRendererPepperHostFactory& operator=(
  20. const ElectronRendererPepperHostFactory&) = delete;
  21. // ppapi::host::HostFactory
  22. std::unique_ptr<ppapi::host::ResourceHost> CreateResourceHost(
  23. ppapi::host::PpapiHost* host,
  24. PP_Resource resource,
  25. PP_Instance instance,
  26. const IPC::Message& message) override;
  27. private:
  28. // Not owned by this object.
  29. content::RendererPpapiHost* host_;
  30. };
  31. #endif // ELECTRON_SHELL_RENDERER_ELECTRON_RENDERER_PEPPER_HOST_FACTORY_H_