Delete OverrideChildProcessPath and OverrideFrameworkBundlePath altogether
This commit is contained in:
parent
091357ad8e
commit
8eab230fe1
3 changed files with 0 additions and 52 deletions
1
atom.gyp
1
atom.gyp
|
@ -58,7 +58,6 @@
|
||||||
'atom/app/atom_content_client.h',
|
'atom/app/atom_content_client.h',
|
||||||
'atom/app/atom_main_delegate.cc',
|
'atom/app/atom_main_delegate.cc',
|
||||||
'atom/app/atom_main_delegate.h',
|
'atom/app/atom_main_delegate.h',
|
||||||
'atom/app/atom_main_delegate_mac.mm',
|
|
||||||
'atom/browser/api/atom_api_app.cc',
|
'atom/browser/api/atom_api_app.cc',
|
||||||
'atom/browser/api/atom_api_app.h',
|
'atom/browser/api/atom_api_app.h',
|
||||||
'atom/browser/api/atom_api_auto_updater.cc',
|
'atom/browser/api/atom_api_auto_updater.cc',
|
||||||
|
|
|
@ -26,10 +26,6 @@ class AtomMainDelegate : public brightray::MainDelegate {
|
||||||
scoped_ptr<brightray::ContentClient> CreateContentClient() override;
|
scoped_ptr<brightray::ContentClient> CreateContentClient() override;
|
||||||
void AddDataPackFromPath(
|
void AddDataPackFromPath(
|
||||||
ui::ResourceBundle* bundle, const base::FilePath& pak_dir) override;
|
ui::ResourceBundle* bundle, const base::FilePath& pak_dir) override;
|
||||||
#if defined(OS_MACOSX)
|
|
||||||
void OverrideChildProcessPath() override;
|
|
||||||
void OverrideFrameworkBundlePath() override;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
brightray::ContentClient content_client_;
|
brightray::ContentClient content_client_;
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
// Copyright (c) 2013 GitHub, Inc.
|
|
||||||
// Use of this source code is governed by the MIT license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
#include "atom/app/atom_main_delegate.h"
|
|
||||||
|
|
||||||
#include "base/mac/bundle_locations.h"
|
|
||||||
#include "base/files/file_path.h"
|
|
||||||
#include "base/path_service.h"
|
|
||||||
#include "brightray/common/mac/main_application_bundle.h"
|
|
||||||
#include "content/public/common/content_paths.h"
|
|
||||||
|
|
||||||
namespace atom {
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
base::FilePath GetFrameworksPath() {
|
|
||||||
return brightray::MainApplicationBundlePath().Append("Contents")
|
|
||||||
.Append("Frameworks");
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string GetApplicationName() {
|
|
||||||
std::string name = brightray::MainApplicationBundlePath().BaseName().AsUTF8Unsafe();
|
|
||||||
return name.substr(0, name.length() - 4/*.app*/);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
void AtomMainDelegate::OverrideFrameworkBundlePath() {
|
|
||||||
base::FilePath bundlePath = GetFrameworksPath();
|
|
||||||
std::string app_name = GetApplicationName();
|
|
||||||
|
|
||||||
base::mac::SetOverrideFrameworkBundlePath(bundlePath
|
|
||||||
.Append(app_name + " Framework.framework"));
|
|
||||||
}
|
|
||||||
|
|
||||||
void AtomMainDelegate::OverrideChildProcessPath() {
|
|
||||||
std::string app_name = GetApplicationName();
|
|
||||||
|
|
||||||
base::FilePath helper_path = GetFrameworksPath().Append(app_name + " Helper.app")
|
|
||||||
.Append("Contents")
|
|
||||||
.Append("MacOS")
|
|
||||||
.Append(app_name + " Helper");
|
|
||||||
PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace atom
|
|
Loading…
Add table
Add a link
Reference in a new issue