refactor: pass base::Value by value in JS API implementations (#20809)
* refactor: move the arg instead of const reference it * refactor: avoid unnecessary copies of base::Value in arg * refactor: pass-by-value in dict_util * refactor: avoid unnecessary reference
This commit is contained in:
parent
c03ed6d3a1
commit
0ab9cc30d2
26 changed files with 108 additions and 144 deletions
|
@ -62,24 +62,22 @@ class SystemPreferences : public gin_helper::EventEmitter<SystemPreferences>
|
|||
void OnFinishLaunching(const base::DictionaryValue& launch_info) override;
|
||||
|
||||
#elif defined(OS_MACOSX)
|
||||
using NotificationCallback =
|
||||
base::RepeatingCallback<void(const std::string&,
|
||||
const base::DictionaryValue&,
|
||||
const std::string&)>;
|
||||
using NotificationCallback = base::RepeatingCallback<
|
||||
void(const std::string&, base::DictionaryValue, const std::string&)>;
|
||||
|
||||
void PostNotification(const std::string& name,
|
||||
const base::DictionaryValue& user_info,
|
||||
base::DictionaryValue user_info,
|
||||
gin_helper::Arguments* args);
|
||||
int SubscribeNotification(const std::string& name,
|
||||
const NotificationCallback& callback);
|
||||
void UnsubscribeNotification(int id);
|
||||
void PostLocalNotification(const std::string& name,
|
||||
const base::DictionaryValue& user_info);
|
||||
base::DictionaryValue user_info);
|
||||
int SubscribeLocalNotification(const std::string& name,
|
||||
const NotificationCallback& callback);
|
||||
void UnsubscribeLocalNotification(int request_id);
|
||||
void PostWorkspaceNotification(const std::string& name,
|
||||
const base::DictionaryValue& user_info);
|
||||
base::DictionaryValue user_info);
|
||||
int SubscribeWorkspaceNotification(const std::string& name,
|
||||
const NotificationCallback& callback);
|
||||
void UnsubscribeWorkspaceNotification(int request_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue