mac: Always use "Atom" as name when find helper process. Fixes #89.
This commit is contained in:
parent
f38eb1b66f
commit
cec640f572
1 changed files with 31 additions and 0 deletions
|
@ -10,6 +10,27 @@
|
||||||
#include "content/public/common/content_switches.h"
|
#include "content/public/common/content_switches.h"
|
||||||
#include "renderer/atom_renderer_client.h"
|
#include "renderer/atom_renderer_client.h"
|
||||||
|
|
||||||
|
#if defined(OS_MACOSX)
|
||||||
|
|
||||||
|
#include "base/mac/bundle_locations.h"
|
||||||
|
#include "base/path_service.h"
|
||||||
|
#include "content/public/common/content_paths.h"
|
||||||
|
|
||||||
|
namespace brightray {
|
||||||
|
base::FilePath MainApplicationBundlePath();
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
base::FilePath GetFrameworksPath() {
|
||||||
|
return brightray::MainApplicationBundlePath().Append("Contents")
|
||||||
|
.Append("Frameworks");
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#endif // defined(OS_MACOSX)
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
AtomMainDelegate::AtomMainDelegate() {
|
AtomMainDelegate::AtomMainDelegate() {
|
||||||
|
@ -40,6 +61,16 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||||
void AtomMainDelegate::PreSandboxStartup() {
|
void AtomMainDelegate::PreSandboxStartup() {
|
||||||
brightray::MainDelegate::PreSandboxStartup();
|
brightray::MainDelegate::PreSandboxStartup();
|
||||||
|
|
||||||
|
#if defined(OS_MACOSX)
|
||||||
|
// Override the path to helper process, since third party users may want to
|
||||||
|
// change the application name.
|
||||||
|
base::FilePath helper_path = GetFrameworksPath().Append("Atom Helper.app")
|
||||||
|
.Append("Contents")
|
||||||
|
.Append("MacOS")
|
||||||
|
.Append("Atom Helper");
|
||||||
|
PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
|
||||||
|
#endif // defined(OS_MACOSX)
|
||||||
|
|
||||||
// Disable renderer sandbox for most of node's functions.
|
// Disable renderer sandbox for most of node's functions.
|
||||||
CommandLine* command_line = CommandLine::ForCurrentProcess();
|
CommandLine* command_line = CommandLine::ForCurrentProcess();
|
||||||
command_line->AppendSwitch(switches::kNoSandbox);
|
command_line->AppendSwitch(switches::kNoSandbox);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue