File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 11
11
12
12
@interface App : NSObject
13
13
14
+ - (id )initWithBundleIdentifier : (NSString *)bundleIdentifier ;
14
15
- (void )listWindows : (Arguments *)args ;
15
16
- (void )listTabs : (Arguments *)args ;
16
17
- (void )listTabsLinks : (Arguments *)args ;
Original file line number Diff line number Diff line change 11
11
12
12
13
13
static NSInteger const kMaxLaunchTimeInSeconds = 15 ;
14
- static NSString * const kVersion = @" 1.6 .0" ;
14
+ static NSString * const kVersion = @" 1.7 .0" ;
15
15
static NSString * const kJsPrintSource = @" (function() { return document.getElementsByTagName('html')[0].outerHTML })();" ;
16
16
17
17
18
- @implementation App
18
+ @implementation App {
19
+ NSString *bundleIdentifier;
20
+ }
21
+
22
+ - (id )initWithBundleIdentifier : (NSString *)bundleIdentifier {
23
+ self = [super init ];
24
+ self->bundleIdentifier = bundleIdentifier;
25
+ return self;
26
+ }
19
27
20
28
21
29
- (chromeApplication *)chrome {
22
- chromeApplication *chrome = [SBApplication applicationWithBundleIdentifier: @" com.google.Chrome " ];
30
+ chromeApplication *chrome = [SBApplication applicationWithBundleIdentifier: self ->bundleIdentifier ];
23
31
24
32
if ([chrome isRunning ]) {
25
33
return chrome;
Original file line number Diff line number Diff line change 12
12
13
13
int main (int argc, const char * argv[])
14
14
{
15
- App *app = [[App alloc ] init ];
15
+ NSString *bundleIdentifier = [[[NSProcessInfo processInfo ] environment ] objectForKey: @" CHROME_BUNDLE_IDENTIFIER" ];
16
+ if (!bundleIdentifier) {
17
+ bundleIdentifier = @" com.google.Chrome" ;
18
+ }
19
+
20
+ App *app = [[App alloc ] initWithBundleIdentifier: bundleIdentifier];
16
21
Argonaut *argonaut = [[Argonaut alloc ] init ];
17
22
18
23
[argonaut add: @" -h" target: argonaut action: @selector (printUsage: ) description: @" Print help" ];
You can’t perform that action at this time.
0 commit comments