refactor: rename the atom namespace to electron
This commit is contained in:
parent
8c4496a9c9
commit
34c4c8d508
531 changed files with 1456 additions and 1428 deletions
|
@ -81,7 +81,7 @@ bool CreateDialogThread(RunState* run_state) {
|
|||
return true;
|
||||
}
|
||||
|
||||
void OnDialogOpened(atom::util::Promise promise,
|
||||
void OnDialogOpened(electron::util::Promise promise,
|
||||
bool canceled,
|
||||
std::vector<base::FilePath> paths) {
|
||||
mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate());
|
||||
|
@ -92,7 +92,7 @@ void OnDialogOpened(atom::util::Promise promise,
|
|||
|
||||
void RunOpenDialogInNewThread(const RunState& run_state,
|
||||
const DialogSettings& settings,
|
||||
atom::util::Promise promise) {
|
||||
electron::util::Promise promise) {
|
||||
std::vector<base::FilePath> paths;
|
||||
bool result = ShowOpenDialogSync(settings, &paths);
|
||||
run_state.ui_task_runner->PostTask(
|
||||
|
@ -101,7 +101,7 @@ void RunOpenDialogInNewThread(const RunState& run_state,
|
|||
run_state.ui_task_runner->DeleteSoon(FROM_HERE, run_state.dialog_thread);
|
||||
}
|
||||
|
||||
void OnSaveDialogDone(atom::util::Promise promise,
|
||||
void OnSaveDialogDone(electron::util::Promise promise,
|
||||
bool canceled,
|
||||
const base::FilePath path) {
|
||||
mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate());
|
||||
|
@ -112,7 +112,7 @@ void OnSaveDialogDone(atom::util::Promise promise,
|
|||
|
||||
void RunSaveDialogInNewThread(const RunState& run_state,
|
||||
const DialogSettings& settings,
|
||||
atom::util::Promise promise) {
|
||||
electron::util::Promise promise) {
|
||||
base::FilePath path;
|
||||
bool result = ShowSaveDialogSync(settings, &path);
|
||||
run_state.ui_task_runner->PostTask(
|
||||
|
@ -160,10 +160,10 @@ static void SetDefaultFolder(IFileDialog* dialog,
|
|||
|
||||
static HRESULT ShowFileDialog(IFileDialog* dialog,
|
||||
const DialogSettings& settings) {
|
||||
atom::UnresponsiveSuppressor suppressor;
|
||||
electron::UnresponsiveSuppressor suppressor;
|
||||
HWND parent_window =
|
||||
settings.parent_window
|
||||
? static_cast<atom::NativeWindowViews*>(settings.parent_window)
|
||||
? static_cast<electron::NativeWindowViews*>(settings.parent_window)
|
||||
->GetAcceleratedWidget()
|
||||
: NULL;
|
||||
|
||||
|
@ -272,7 +272,7 @@ bool ShowOpenDialogSync(const DialogSettings& settings,
|
|||
}
|
||||
|
||||
void ShowOpenDialog(const DialogSettings& settings,
|
||||
atom::util::Promise promise) {
|
||||
electron::util::Promise promise) {
|
||||
mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate());
|
||||
RunState run_state;
|
||||
if (!CreateDialogThread(&run_state)) {
|
||||
|
@ -317,7 +317,7 @@ bool ShowSaveDialogSync(const DialogSettings& settings, base::FilePath* path) {
|
|||
}
|
||||
|
||||
void ShowSaveDialog(const DialogSettings& settings,
|
||||
atom::util::Promise promise) {
|
||||
electron::util::Promise promise) {
|
||||
RunState run_state;
|
||||
if (!CreateDialogThread(&run_state)) {
|
||||
mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue