atom_sandboxed_renderer_client.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright (c) 2016 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 ATOM_RENDERER_ATOM_SANDBOXED_RENDERER_CLIENT_H_
  5. #define ATOM_RENDERER_ATOM_SANDBOXED_RENDERER_CLIENT_H_
  6. #include <string>
  7. #include <vector>
  8. #include "atom/renderer/renderer_client_base.h"
  9. namespace atom {
  10. class AtomSandboxedRendererClient : public RendererClientBase {
  11. public:
  12. AtomSandboxedRendererClient();
  13. ~AtomSandboxedRendererClient() override;
  14. void InvokeIpcCallback(v8::Handle<v8::Context> context,
  15. const std::string& callback_name,
  16. std::vector<v8::Handle<v8::Value>> args);
  17. // atom::RendererClientBase:
  18. void DidCreateScriptContext(v8::Handle<v8::Context> context,
  19. content::RenderFrame* render_frame) override;
  20. void WillReleaseScriptContext(v8::Handle<v8::Context> context,
  21. content::RenderFrame* render_frame) override;
  22. void SetupMainWorldOverrides(v8::Handle<v8::Context> context) override {}
  23. // content::ContentRendererClient:
  24. void RenderFrameCreated(content::RenderFrame*) override;
  25. void RenderViewCreated(content::RenderView*) override;
  26. private:
  27. DISALLOW_COPY_AND_ASSIGN(AtomSandboxedRendererClient);
  28. };
  29. } // namespace atom
  30. #endif // ATOM_RENDERER_ATOM_SANDBOXED_RENDERER_CLIENT_H_