pepper_helper.h 990 B

12345678910111213141516171819202122232425262728
  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_PEPPER_HELPER_H_
  5. #define ELECTRON_SHELL_RENDERER_PEPPER_HELPER_H_
  6. #include "base/compiler_specific.h"
  7. #include "base/component_export.h"
  8. #include "content/public/renderer/render_frame_observer.h"
  9. // This class listens for Pepper creation events from the RenderFrame and
  10. // attaches the parts required for plugin support.
  11. class PepperHelper : public content::RenderFrameObserver {
  12. public:
  13. explicit PepperHelper(content::RenderFrame* render_frame);
  14. ~PepperHelper() override;
  15. // disable copy
  16. PepperHelper(const PepperHelper&) = delete;
  17. PepperHelper& operator=(const PepperHelper&) = delete;
  18. // RenderFrameObserver.
  19. void DidCreatePepperPlugin(content::RendererPpapiHost* host) override;
  20. void OnDestruct() override;
  21. };
  22. #endif // ELECTRON_SHELL_RENDERER_PEPPER_HELPER_H_