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
|
@ -125,7 +125,7 @@ class Browser : public WindowListObserver {
|
|||
|
||||
// Creates an activity and sets it as the one currently in use.
|
||||
void SetUserActivity(const std::string& type,
|
||||
const base::DictionaryValue& user_info,
|
||||
base::DictionaryValue user_info,
|
||||
gin_helper::Arguments* args);
|
||||
|
||||
// Returns the type name of the current user activity.
|
||||
|
@ -140,7 +140,7 @@ class Browser : public WindowListObserver {
|
|||
|
||||
// Updates the current user activity
|
||||
void UpdateCurrentActivity(const std::string& type,
|
||||
const base::DictionaryValue& user_info);
|
||||
base::DictionaryValue user_info);
|
||||
|
||||
// Indicates that an user activity is about to be resumed.
|
||||
bool WillContinueUserActivity(const std::string& type);
|
||||
|
@ -151,15 +151,15 @@ class Browser : public WindowListObserver {
|
|||
|
||||
// Resumes an activity via hand-off.
|
||||
bool ContinueUserActivity(const std::string& type,
|
||||
const base::DictionaryValue& user_info);
|
||||
base::DictionaryValue user_info);
|
||||
|
||||
// Indicates that an activity was continued on another device.
|
||||
void UserActivityWasContinued(const std::string& type,
|
||||
const base::DictionaryValue& user_info);
|
||||
base::DictionaryValue user_info);
|
||||
|
||||
// Gives an oportunity to update the Handoff payload.
|
||||
bool UpdateUserActivityState(const std::string& type,
|
||||
const base::DictionaryValue& user_info);
|
||||
base::DictionaryValue user_info);
|
||||
|
||||
// Bounce the dock icon.
|
||||
enum class BounceType{
|
||||
|
@ -190,7 +190,7 @@ class Browser : public WindowListObserver {
|
|||
#endif // defined(OS_MACOSX)
|
||||
|
||||
void ShowAboutPanel();
|
||||
void SetAboutPanelOptions(const base::DictionaryValue& options);
|
||||
void SetAboutPanelOptions(base::DictionaryValue options);
|
||||
|
||||
#if defined(OS_MACOSX) || defined(OS_WIN)
|
||||
void ShowEmojiPanel();
|
||||
|
@ -244,7 +244,7 @@ class Browser : public WindowListObserver {
|
|||
|
||||
// Tell the application the loading has been done.
|
||||
void WillFinishLaunching();
|
||||
void DidFinishLaunching(const base::DictionaryValue& launch_info);
|
||||
void DidFinishLaunching(base::DictionaryValue launch_info);
|
||||
|
||||
void OnAccessibilitySupportChanged();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue