refactor: make shell.OpenExternal async (#17135)
This commit is contained in:
parent
0755857a0c
commit
6d96f30ed3
16 changed files with 70 additions and 140 deletions
|
@ -94,17 +94,10 @@ bool OpenItem(const base::FilePath& full_path) {
|
|||
launchIdentifiers:NULL];
|
||||
}
|
||||
|
||||
bool OpenExternal(const GURL& url, const OpenExternalOptions& options) {
|
||||
DCHECK([NSThread isMainThread]);
|
||||
NSURL* ns_url = net::NSURLWithGURL(url);
|
||||
if (ns_url)
|
||||
return OpenURL(ns_url, options.activate).empty();
|
||||
return false;
|
||||
}
|
||||
|
||||
void OpenExternal(const GURL& url,
|
||||
const OpenExternalOptions& options,
|
||||
OpenExternalCallback callback) {
|
||||
DCHECK([NSThread isMainThread]);
|
||||
NSURL* ns_url = net::NSURLWithGURL(url);
|
||||
if (!ns_url) {
|
||||
std::move(callback).Run("Invalid URL");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue