Shell openExternal can take optional callback (macOS)
This commit is contained in:
parent
1b5b29901c
commit
b266533dfc
6 changed files with 85 additions and 10 deletions
|
@ -6,6 +6,7 @@
|
|||
#define ATOM_COMMON_PLATFORM_UTIL_H_
|
||||
|
||||
#include "build/build_config.h"
|
||||
#include "base/callback_forward.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include "base/strings/string16.h"
|
||||
|
@ -27,6 +28,8 @@ bool ShowItemInFolder(const base::FilePath& full_path);
|
|||
// Must be called from the UI thread.
|
||||
bool OpenItem(const base::FilePath& full_path);
|
||||
|
||||
typedef base::Callback<void(bool opened)> OpenExternalCallback;
|
||||
|
||||
// Open the given external protocol URL in the desktop's default manner.
|
||||
// (For example, mailto: URLs in the default mail user agent.)
|
||||
bool OpenExternal(
|
||||
|
@ -37,6 +40,15 @@ bool OpenExternal(
|
|||
#endif
|
||||
bool activate);
|
||||
|
||||
bool OpenExternal(
|
||||
#if defined(OS_WIN)
|
||||
const base::string16& url,
|
||||
#else
|
||||
const GURL& url,
|
||||
#endif
|
||||
bool activate,
|
||||
const OpenExternalCallback& callback);
|
||||
|
||||
// Move a file to trash.
|
||||
bool MoveItemToTrash(const base::FilePath& full_path);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue