refactor: migrates util::Promise to gin (#20871)
* refactor: use gin in Promise * refactor: separate Promise impl that returns nothing * refactor: use Promise<void> for promise that returns nothing * fix: methods should be able to run on both browser and renderer process * fix: should not pass base::StringPiece across threads * refactor: no more need to use different ResolvePromise for empty Promise * refactor: move Promise to gin_helper
This commit is contained in:
parent
bff113760a
commit
eaf2c61bef
48 changed files with 483 additions and 479 deletions
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include "base/files/file_path.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/promise_util.h"
|
||||
#include "shell/common/gin_helper/promise.h"
|
||||
|
||||
namespace electron {
|
||||
class NativeWindow;
|
||||
|
@ -65,12 +65,12 @@ bool ShowOpenDialogSync(const DialogSettings& settings,
|
|||
std::vector<base::FilePath>* paths);
|
||||
|
||||
void ShowOpenDialog(const DialogSettings& settings,
|
||||
electron::util::Promise<gin_helper::Dictionary> promise);
|
||||
gin_helper::Promise<gin_helper::Dictionary> promise);
|
||||
|
||||
bool ShowSaveDialogSync(const DialogSettings& settings, base::FilePath* path);
|
||||
|
||||
void ShowSaveDialog(const DialogSettings& settings,
|
||||
electron::util::Promise<gin_helper::Dictionary> promise);
|
||||
gin_helper::Promise<gin_helper::Dictionary> promise);
|
||||
|
||||
} // namespace file_dialog
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue