Initialize resource bundle on browser process separately

This commit is contained in:
Cheng Zhao 2016-01-08 12:06:06 +08:00
parent 5f6a8a7c24
commit ec4c5e58ff
4 changed files with 5 additions and 24 deletions

View file

@ -13,20 +13,14 @@
namespace atom {
void AtomBrowserMainParts::PreMainMessageLoopStart() {
// Initialize locale setting.
l10n_util::OverrideLocaleWithCocoaLocale();
// Force the NSApplication subclass to be used.
NSApplication* application = [AtomApplication sharedApplication];
[AtomApplication sharedApplication];
// Set our own application delegate.
AtomApplicationDelegate* delegate = [[AtomApplicationDelegate alloc] init];
[NSApp setDelegate:(id<NSFileManagerDelegate>)delegate];
NSBundle* frameworkBundle = base::mac::FrameworkBundle();
NSNib* mainNib = [[NSNib alloc] initWithNibNamed:@"MainMenu"
bundle:frameworkBundle];
[mainNib instantiateWithOwner:application topLevelObjects:nil];
[mainNib release];
brightray::BrowserMainParts::PreMainMessageLoopStart();
// Prevent Cocoa from turning command-line arguments into
// |-application:openFiles:|, since we already handle them directly.