mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Pass argc and argv to CefInitialize
This commit is contained in:
@@ -4,13 +4,13 @@
|
||||
class AtomCefClient;
|
||||
|
||||
@interface AtomApplication : NSApplication <CefAppProtocol, NSApplicationDelegate> {
|
||||
@private
|
||||
NSWindowController *_backgroundWindowController;
|
||||
|
||||
BOOL handlingSendEvent_;
|
||||
}
|
||||
|
||||
+ (id)applicationWithArguments:(char **)argv count:(int)argc;
|
||||
+ (CefSettings)createCefSettings;
|
||||
- (const char *)resourcePath;
|
||||
- (void)open:(NSString *)path;
|
||||
- (IBAction)runSpecs:(id)sender;
|
||||
- (IBAction)runBenchmarks:(id)sender;
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
|
||||
@implementation AtomApplication
|
||||
|
||||
+ (id)sharedApplication {
|
||||
+ (id)applicationWithArguments:(char **)argv count:(int)argc {
|
||||
NSApplication *application = [super sharedApplication];
|
||||
CefInitialize(CefMainArgs(0, NULL), [self createCefSettings], new AtomCefApp);
|
||||
CefInitialize(CefMainArgs(argc, argv), [self createCefSettings], new AtomCefApp);
|
||||
|
||||
return application;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
int main(int argc, char* argv[]) {
|
||||
@autoreleasepool {
|
||||
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
|
||||
AtomApplication *application = (AtomApplication *)[AtomApplication sharedApplication];
|
||||
AtomApplication *application = [AtomApplication applicationWithArguments:argv count:argc];
|
||||
|
||||
NSString *mainNibName = [infoDictionary objectForKey:@"NSMainNibFile"];
|
||||
NSNib *mainNib = [[NSNib alloc] initWithNibNamed:mainNibName bundle:[NSBundle mainBundle]];
|
||||
|
||||
Reference in New Issue
Block a user