Add atom::AtomSandboxedRendererClient class
This commit is contained in:
parent
06cc9a44fe
commit
a7b6332ed0
4 changed files with 41 additions and 1 deletions
|
@ -13,6 +13,7 @@
|
||||||
#include "atom/common/google_api_key.h"
|
#include "atom/common/google_api_key.h"
|
||||||
#include "atom/common/options_switches.h"
|
#include "atom/common/options_switches.h"
|
||||||
#include "atom/renderer/atom_renderer_client.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 "atom/utility/atom_content_utility_client.h"
|
||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
#include "base/debug/stack_trace.h"
|
#include "base/debug/stack_trace.h"
|
||||||
|
@ -149,7 +150,7 @@ content::ContentRendererClient*
|
||||||
AtomMainDelegate::CreateContentRendererClient() {
|
AtomMainDelegate::CreateContentRendererClient() {
|
||||||
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||||
switches::kEnableSandbox)) {
|
switches::kEnableSandbox)) {
|
||||||
renderer_client_.reset(new content::ContentRendererClient);
|
renderer_client_.reset(new AtomSandboxedRendererClient);
|
||||||
} else {
|
} else {
|
||||||
renderer_client_.reset(new AtomRendererClient);
|
renderer_client_.reset(new AtomRendererClient);
|
||||||
}
|
}
|
||||||
|
|
15
atom/renderer/atom_sandboxed_renderer_client.cc
Normal file
15
atom/renderer/atom_sandboxed_renderer_client.cc
Normal file
|
@ -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
|
22
atom/renderer/atom_sandboxed_renderer_client.h
Normal file
22
atom/renderer/atom_sandboxed_renderer_client.h
Normal file
|
@ -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_
|
|
@ -433,6 +433,8 @@
|
||||||
'atom/renderer/atom_render_view_observer.h',
|
'atom/renderer/atom_render_view_observer.h',
|
||||||
'atom/renderer/atom_renderer_client.cc',
|
'atom/renderer/atom_renderer_client.cc',
|
||||||
'atom/renderer/atom_renderer_client.h',
|
'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.cc',
|
||||||
'atom/renderer/guest_view_container.h',
|
'atom/renderer/guest_view_container.h',
|
||||||
'atom/renderer/node_array_buffer_bridge.cc',
|
'atom/renderer/node_array_buffer_bridge.cc',
|
||||||
|
|
Loading…
Reference in a new issue