diff --git a/atom/app/atom_main_delegate.cc b/atom/app/atom_main_delegate.cc index 51f8abda5141..e4015e57be4b 100644 --- a/atom/app/atom_main_delegate.cc +++ b/atom/app/atom_main_delegate.cc @@ -13,6 +13,7 @@ #include "atom/common/google_api_key.h" #include "atom/common/options_switches.h" #include "atom/renderer/atom_renderer_client.h" +#include "atom/renderer/atom_sandboxed_renderer_client.h" #include "atom/utility/atom_content_utility_client.h" #include "base/command_line.h" #include "base/debug/stack_trace.h" @@ -149,7 +150,7 @@ content::ContentRendererClient* AtomMainDelegate::CreateContentRendererClient() { if (base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kEnableSandbox)) { - renderer_client_.reset(new content::ContentRendererClient); + renderer_client_.reset(new AtomSandboxedRendererClient); } else { renderer_client_.reset(new AtomRendererClient); } diff --git a/atom/renderer/atom_sandboxed_renderer_client.cc b/atom/renderer/atom_sandboxed_renderer_client.cc new file mode 100644 index 000000000000..3aae5e2db68a --- /dev/null +++ b/atom/renderer/atom_sandboxed_renderer_client.cc @@ -0,0 +1,15 @@ +// Copyright (c) 2016 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include "atom/renderer/atom_sandboxed_renderer_client.h" + +namespace atom { + +AtomSandboxedRendererClient::AtomSandboxedRendererClient() { +} + +AtomSandboxedRendererClient::~AtomSandboxedRendererClient() { +} + +} // namespace atom diff --git a/atom/renderer/atom_sandboxed_renderer_client.h b/atom/renderer/atom_sandboxed_renderer_client.h new file mode 100644 index 000000000000..c4b4289d8ed7 --- /dev/null +++ b/atom/renderer/atom_sandboxed_renderer_client.h @@ -0,0 +1,22 @@ +// Copyright (c) 2016 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. +#ifndef ATOM_RENDERER_ATOM_SANDBOXED_RENDERER_CLIENT_H_ +#define ATOM_RENDERER_ATOM_SANDBOXED_RENDERER_CLIENT_H_ + +#include "content/public/renderer/content_renderer_client.h" + +namespace atom { + +class AtomSandboxedRendererClient : public content::ContentRendererClient { + public: + AtomSandboxedRendererClient(); + virtual ~AtomSandboxedRendererClient(); + + private: + DISALLOW_COPY_AND_ASSIGN(AtomSandboxedRendererClient); +}; + +} // namespace atom + +#endif // ATOM_RENDERER_ATOM_SANDBOXED_RENDERER_CLIENT_H_ diff --git a/filenames.gypi b/filenames.gypi index 88a8dc0510e1..c2667b1b0300 100644 --- a/filenames.gypi +++ b/filenames.gypi @@ -433,6 +433,8 @@ 'atom/renderer/atom_render_view_observer.h', 'atom/renderer/atom_renderer_client.cc', 'atom/renderer/atom_renderer_client.h', + 'atom/renderer/atom_sandboxed_renderer_client.cc', + 'atom/renderer/atom_sandboxed_renderer_client.h', 'atom/renderer/guest_view_container.cc', 'atom/renderer/guest_view_container.h', 'atom/renderer/node_array_buffer_bridge.cc',