Make the node environment constrained in browser_main_parts.

This commit is contained in:
Cheng Zhao 2014-06-30 14:16:16 +08:00
parent 1d359cb8aa
commit 6a891be0e4
6 changed files with 24 additions and 21 deletions

View file

@ -14,7 +14,6 @@
#include "base/path_service.h"
#include "content/public/common/content_switches.h"
#include "ui/base/resource/resource_bundle.h"
#include "vendor/brightray/common/content_client.h"
namespace atom {
@ -49,13 +48,12 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
base::debug::EnableInProcessStackDumping();
#endif
content_client_.reset(new brightray::ContentClient);
SetContentClient(content_client_.get());
#if defined(OS_MACOSX)
OverrideChildProcessPath();
OverrideFrameworkBundlePath();
#endif
SetContentClient(&content_client_);
return false;
}

View file

@ -6,6 +6,7 @@
#define ATOM_APP_ATOM_MAIN_DELEGATE_H_
#include "brightray/common/main_delegate.h"
#include "brightray/common/content_client.h"
namespace atom {
@ -30,7 +31,7 @@ class AtomMainDelegate : public brightray::MainDelegate {
virtual content::ContentRendererClient*
CreateContentRendererClient() OVERRIDE;
scoped_ptr<brightray::ContentClient> content_client_;
brightray::ContentClient content_client_;
scoped_ptr<content::ContentBrowserClient> browser_client_;
scoped_ptr<content::ContentRendererClient> renderer_client_;