electron/brightray/browser/browser_main_parts_mac.mm
Cheng Zhao 54997db5f2 No more need to call setrlimit
Chrome has removed the limiations on fd, this actually became the new limitation.
2015-10-20 22:38:20 +08:00

22 lines
736 B
Text

#import "browser_main_parts.h"
#import "base/logging.h"
#import "base/mac/bundle_locations.h"
#import <AppKit/AppKit.h>
namespace brightray {
// Replicates NSApplicationMain, but doesn't start a run loop.
void BrowserMainParts::InitializeMainNib() {
auto infoDictionary = base::mac::OuterBundle().infoDictionary;
auto principalClass = NSClassFromString([infoDictionary objectForKey:@"NSPrincipalClass"]);
auto application = [principalClass sharedApplication];
NSString *mainNibName = [infoDictionary objectForKey:@"NSMainNibFile"];
auto mainNib = [[NSNib alloc] initWithNibNamed:mainNibName bundle:base::mac::FrameworkBundle()];
[mainNib instantiateWithOwner:application topLevelObjects:nil];
[mainNib release];
}
}