clang-format objc files (#12673)
This commit is contained in:
parent
94236bf4eb
commit
12a57ff1c2
54 changed files with 1298 additions and 1033 deletions
|
@ -9,7 +9,8 @@ namespace brightray {
|
|||
namespace {
|
||||
|
||||
std::string ApplicationInfoDictionaryValue(NSString* key) {
|
||||
return base::SysNSStringToUTF8([MainApplicationBundle().infoDictionary objectForKey:key]);
|
||||
return base::SysNSStringToUTF8(
|
||||
[MainApplicationBundle().infoDictionary objectForKey:key]);
|
||||
}
|
||||
|
||||
std::string ApplicationInfoDictionaryValue(CFStringRef key) {
|
||||
|
|
|
@ -17,7 +17,8 @@ namespace {
|
|||
|
||||
bool HasMainProcessKey() {
|
||||
NSDictionary* info_dictionary = [base::mac::MainBundle() infoDictionary];
|
||||
return [[info_dictionary objectForKey:@"ElectronMainProcess"] boolValue] != NO;
|
||||
return
|
||||
[[info_dictionary objectForKey:@"ElectronMainProcess"] boolValue] != NO;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -48,7 +49,8 @@ base::FilePath MainApplicationBundlePath() {
|
|||
}
|
||||
|
||||
NSBundle* MainApplicationBundle() {
|
||||
return [NSBundle bundleWithPath:base::mac::FilePathToNSString(MainApplicationBundlePath())];
|
||||
return [NSBundle bundleWithPath:base::mac::FilePathToNSString(
|
||||
MainApplicationBundlePath())];
|
||||
}
|
||||
|
||||
} // namespace brightray
|
||||
|
|
|
@ -43,16 +43,18 @@ void LoadCommonResources() {
|
|||
}
|
||||
|
||||
void MainDelegate::OverrideFrameworkBundlePath() {
|
||||
base::FilePath helper_path = GetFrameworksPath().Append(GetApplicationName() + " Framework.framework");
|
||||
base::FilePath helper_path =
|
||||
GetFrameworksPath().Append(GetApplicationName() + " Framework.framework");
|
||||
|
||||
base::mac::SetOverrideFrameworkBundlePath(helper_path);
|
||||
}
|
||||
|
||||
void MainDelegate::OverrideChildProcessPath() {
|
||||
base::FilePath helper_path = GetFrameworksPath().Append(GetApplicationName() + " Helper.app")
|
||||
.Append("Contents")
|
||||
.Append("MacOS")
|
||||
.Append(GetApplicationName() + " Helper");
|
||||
base::FilePath helper_path = GetFrameworksPath()
|
||||
.Append(GetApplicationName() + " Helper.app")
|
||||
.Append("Contents")
|
||||
.Append("MacOS")
|
||||
.Append(GetApplicationName() + " Helper");
|
||||
|
||||
PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue