without_activation -> activate
This commit is contained in:
parent
52db43eee5
commit
f5bed87199
6 changed files with 24 additions and 18 deletions
|
@ -119,7 +119,7 @@ void OpenItem(const base::FilePath& full_path) {
|
|||
}
|
||||
}
|
||||
|
||||
bool OpenExternal(const GURL& url, const bool without_activation) {
|
||||
bool OpenExternal(const GURL& url, bool activate) {
|
||||
DCHECK([NSThread isMainThread]);
|
||||
NSURL* ns_url = net::NSURLWithGURL(url);
|
||||
if (!ns_url) {
|
||||
|
@ -137,8 +137,8 @@ bool OpenExternal(const GURL& url, const bool without_activation) {
|
|||
CFRelease(openingApp); // NOT A BUG; LSGetApplicationForURL retains for us
|
||||
|
||||
NSUInteger launchOptions = NSWorkspaceLaunchDefault;
|
||||
if (without_activation)
|
||||
launchOptions = launchOptions | NSWorkspaceLaunchWithoutActivation;
|
||||
if (!activate)
|
||||
launchOptions |= NSWorkspaceLaunchWithoutActivation;
|
||||
|
||||
return [[NSWorkspace sharedWorkspace] openURLs: @[ns_url]
|
||||
withAppBundleIdentifier: nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue