chore: remove last instances of base::Bind (#18178)
* chore: remove last instances of base::Bind * MessageBoxCallback is a OnceCallback * convert permission helepr cbs to Once * convert ResponseCallback to Once
This commit is contained in:
parent
96371b6d75
commit
9af5072115
23 changed files with 122 additions and 109 deletions
|
@ -100,16 +100,17 @@ class Menu : public mate::TrackableObject<Menu>,
|
|||
bool WorksWhenHiddenAt(int index) const;
|
||||
|
||||
// Stored delegate methods.
|
||||
base::Callback<bool(v8::Local<v8::Value>, int)> is_checked_;
|
||||
base::Callback<bool(v8::Local<v8::Value>, int)> is_enabled_;
|
||||
base::Callback<bool(v8::Local<v8::Value>, int)> is_visible_;
|
||||
base::Callback<bool(v8::Local<v8::Value>, int)> works_when_hidden_;
|
||||
base::Callback<v8::Local<v8::Value>(v8::Local<v8::Value>, int, bool)>
|
||||
base::RepeatingCallback<bool(v8::Local<v8::Value>, int)> is_checked_;
|
||||
base::RepeatingCallback<bool(v8::Local<v8::Value>, int)> is_enabled_;
|
||||
base::RepeatingCallback<bool(v8::Local<v8::Value>, int)> is_visible_;
|
||||
base::RepeatingCallback<bool(v8::Local<v8::Value>, int)> works_when_hidden_;
|
||||
base::RepeatingCallback<v8::Local<v8::Value>(v8::Local<v8::Value>, int, bool)>
|
||||
get_accelerator_;
|
||||
base::Callback<bool(v8::Local<v8::Value>, int)> should_register_accelerator_;
|
||||
base::Callback<void(v8::Local<v8::Value>, v8::Local<v8::Value>, int)>
|
||||
base::RepeatingCallback<bool(v8::Local<v8::Value>, int)>
|
||||
should_register_accelerator_;
|
||||
base::RepeatingCallback<void(v8::Local<v8::Value>, v8::Local<v8::Value>, int)>
|
||||
execute_command_;
|
||||
base::Callback<void(v8::Local<v8::Value>)> menu_will_show_;
|
||||
base::RepeatingCallback<void(v8::Local<v8::Value>)> menu_will_show_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Menu);
|
||||
};
|
||||
|
|
|
@ -40,9 +40,10 @@ void RegisterSchemesAsPrivileged(v8::Local<v8::Value> val,
|
|||
|
||||
class Protocol : public mate::TrackableObject<Protocol> {
|
||||
public:
|
||||
using Handler =
|
||||
base::Callback<void(const base::DictionaryValue&, v8::Local<v8::Value>)>;
|
||||
using CompletionCallback = base::Callback<void(v8::Local<v8::Value>)>;
|
||||
using Handler = base::RepeatingCallback<void(const base::DictionaryValue&,
|
||||
v8::Local<v8::Value>)>;
|
||||
using CompletionCallback =
|
||||
base::RepeatingCallback<void(v8::Local<v8::Value>)>;
|
||||
|
||||
static mate::Handle<Protocol> Create(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context);
|
||||
|
|
|
@ -48,7 +48,8 @@ class ProtocolNS : public mate::TrackableObject<ProtocolNS> {
|
|||
~ProtocolNS() override;
|
||||
|
||||
// Callback types.
|
||||
using CompletionCallback = base::Callback<void(v8::Local<v8::Value>)>;
|
||||
using CompletionCallback =
|
||||
base::RepeatingCallback<void(v8::Local<v8::Value>)>;
|
||||
|
||||
// JS APIs.
|
||||
ProtocolError RegisterProtocol(ProtocolType type,
|
||||
|
|
|
@ -66,7 +66,8 @@ class SystemPreferences : public mate::EventEmitter<SystemPreferences>
|
|||
|
||||
#elif defined(OS_MACOSX)
|
||||
using NotificationCallback =
|
||||
base::Callback<void(const std::string&, const base::DictionaryValue&)>;
|
||||
base::RepeatingCallback<void(const std::string&,
|
||||
const base::DictionaryValue&)>;
|
||||
|
||||
void PostNotification(const std::string& name,
|
||||
const base::DictionaryValue& user_info,
|
||||
|
|
|
@ -211,7 +211,8 @@ class TopLevelWindow : public mate::TrackableObject<TopLevelWindow>,
|
|||
void SetIcon(mate::Handle<NativeImage> icon);
|
||||
#endif
|
||||
#if defined(OS_WIN)
|
||||
typedef base::Callback<void(v8::Local<v8::Value>, v8::Local<v8::Value>)>
|
||||
typedef base::RepeatingCallback<void(v8::Local<v8::Value>,
|
||||
v8::Local<v8::Value>)>
|
||||
MessageCallback;
|
||||
bool HookWindowMessage(UINT message, const MessageCallback& callback);
|
||||
bool IsWindowMessageHooked(UINT message);
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
#include "atom/browser/atom_browser_context.h"
|
||||
#include "atom/browser/net/atom_network_delegate.h"
|
||||
#include "atom/common/native_mate_converters/callback.h"
|
||||
#include "atom/common/native_mate_converters/net_converter.h"
|
||||
#include "atom/common/native_mate_converters/once_callback.h"
|
||||
#include "atom/common/native_mate_converters/value_converter.h"
|
||||
#include "base/task/post_task.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
|
|
|
@ -28,7 +28,7 @@ class FrameSubscriber : public content::WebContentsObserver,
|
|||
public viz::mojom::FrameSinkVideoConsumer {
|
||||
public:
|
||||
using FrameCaptureCallback =
|
||||
base::Callback<void(const gfx::Image&, const gfx::Rect&)>;
|
||||
base::RepeatingCallback<void(const gfx::Image&, const gfx::Rect&)>;
|
||||
|
||||
FrameSubscriber(content::WebContents* web_contents,
|
||||
const FrameCaptureCallback& callback,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue