chore: Bind=>BindRepeating for constructors (#17924)
This commit is contained in:
parent
aed0b1ee54
commit
02c7b92095
10 changed files with 15 additions and 11 deletions
|
@ -219,7 +219,7 @@ class App : public AtomBrowserClient::Delegate,
|
|||
#endif
|
||||
|
||||
#if defined(MAS_BUILD)
|
||||
base::Callback<void()> StartAccessingSecurityScopedResource(
|
||||
base::RepeatingCallback<void()> StartAccessingSecurityScopedResource(
|
||||
mate::Arguments* args);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ void OnStopAccessingSecurityScopedResource(NSURL* bookmarkUrl) {
|
|||
}
|
||||
|
||||
// Get base64 encoded NSData, create a bookmark for it and start accessing it.
|
||||
base::Callback<void()> App::StartAccessingSecurityScopedResource(
|
||||
base::RepeatingCallback<void()> App::StartAccessingSecurityScopedResource(
|
||||
mate::Arguments* args) {
|
||||
std::string data;
|
||||
args->GetNext(&data);
|
||||
|
@ -55,7 +55,8 @@ base::Callback<void()> App::StartAccessingSecurityScopedResource(
|
|||
[bookmarkUrl retain];
|
||||
|
||||
// Return a js callback which will close the bookmark.
|
||||
return base::Bind(&OnStopAccessingSecurityScopedResource, bookmarkUrl);
|
||||
return base::BindRepeating(&OnStopAccessingSecurityScopedResource,
|
||||
bookmarkUrl);
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
|
|
@ -91,7 +91,8 @@ void AutoUpdater::OnUpdateDownloaded(const std::string& release_notes,
|
|||
const std::string& url) {
|
||||
Emit("update-downloaded", release_notes, release_name, release_date, url,
|
||||
// Keep compatibility with old APIs.
|
||||
base::Bind(&AutoUpdater::QuitAndInstall, base::Unretained(this)));
|
||||
base::BindRepeating(&AutoUpdater::QuitAndInstall,
|
||||
base::Unretained(this)));
|
||||
}
|
||||
|
||||
void AutoUpdater::OnWindowAllClosed() {
|
||||
|
|
|
@ -165,7 +165,7 @@ void Initialize(v8::Local<v8::Object> exports,
|
|||
v8::Local<v8::Context> context,
|
||||
void* priv) {
|
||||
v8::Isolate* isolate = context->GetIsolate();
|
||||
BrowserView::SetConstructor(isolate, base::Bind(&BrowserView::New));
|
||||
BrowserView::SetConstructor(isolate, base::BindRepeating(&BrowserView::New));
|
||||
|
||||
mate::Dictionary browser_view(isolate, BrowserView::GetConstructor(isolate)
|
||||
->GetFunction(context)
|
||||
|
|
|
@ -241,7 +241,7 @@ void Initialize(v8::Local<v8::Object> exports,
|
|||
v8::Local<v8::Context> context,
|
||||
void* priv) {
|
||||
v8::Isolate* isolate = context->GetIsolate();
|
||||
Menu::SetConstructor(isolate, base::Bind(&Menu::New));
|
||||
Menu::SetConstructor(isolate, base::BindRepeating(&Menu::New));
|
||||
|
||||
mate::Dictionary dict(isolate, exports);
|
||||
dict.Set(
|
||||
|
|
|
@ -51,7 +51,7 @@ void Initialize(v8::Local<v8::Object> exports,
|
|||
void* priv) {
|
||||
v8::Isolate* isolate = context->GetIsolate();
|
||||
|
||||
URLRequest::SetConstructor(isolate, base::Bind(URLRequest::New));
|
||||
URLRequest::SetConstructor(isolate, base::BindRepeating(URLRequest::New));
|
||||
|
||||
mate::Dictionary dict(isolate, exports);
|
||||
dict.Set("net", Net::Create(isolate));
|
||||
|
|
|
@ -258,7 +258,8 @@ void Initialize(v8::Local<v8::Object> exports,
|
|||
v8::Local<v8::Context> context,
|
||||
void* priv) {
|
||||
v8::Isolate* isolate = context->GetIsolate();
|
||||
Notification::SetConstructor(isolate, base::Bind(&Notification::New));
|
||||
Notification::SetConstructor(isolate,
|
||||
base::BindRepeating(&Notification::New));
|
||||
|
||||
mate::Dictionary dict(isolate, exports);
|
||||
dict.Set("Notification", Notification::GetConstructor(isolate)
|
||||
|
|
|
@ -1190,7 +1190,8 @@ void Initialize(v8::Local<v8::Object> exports,
|
|||
v8::Local<v8::Context> context,
|
||||
void* priv) {
|
||||
v8::Isolate* isolate = context->GetIsolate();
|
||||
TopLevelWindow::SetConstructor(isolate, base::Bind(&TopLevelWindow::New));
|
||||
TopLevelWindow::SetConstructor(isolate,
|
||||
base::BindRepeating(&TopLevelWindow::New));
|
||||
|
||||
mate::Dictionary constructor(isolate, TopLevelWindow::GetConstructor(isolate)
|
||||
->GetFunction(context)
|
||||
|
|
|
@ -262,7 +262,7 @@ void Initialize(v8::Local<v8::Object> exports,
|
|||
v8::Local<v8::Context> context,
|
||||
void* priv) {
|
||||
v8::Isolate* isolate = context->GetIsolate();
|
||||
Tray::SetConstructor(isolate, base::Bind(&Tray::New));
|
||||
Tray::SetConstructor(isolate, base::BindRepeating(&Tray::New));
|
||||
|
||||
mate::Dictionary dict(isolate, exports);
|
||||
dict.Set(
|
||||
|
|
|
@ -73,7 +73,7 @@ void Initialize(v8::Local<v8::Object> exports,
|
|||
v8::Local<v8::Context> context,
|
||||
void* priv) {
|
||||
v8::Isolate* isolate = context->GetIsolate();
|
||||
View::SetConstructor(isolate, base::Bind(&View::New));
|
||||
View::SetConstructor(isolate, base::BindRepeating(&View::New));
|
||||
|
||||
mate::Dictionary constructor(
|
||||
isolate,
|
||||
|
|
Loading…
Reference in a new issue