electron/shell/browser/mac/dict_util.h
Cheng Zhao 0ab9cc30d2
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
2019-10-30 14:30:59 +09:00

24 lines
683 B
Objective-C

// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef SHELL_BROWSER_MAC_DICT_UTIL_H_
#define SHELL_BROWSER_MAC_DICT_UTIL_H_
#import <Foundation/Foundation.h>
namespace base {
class ListValue;
class DictionaryValue;
} // namespace base
namespace electron {
NSArray* ListValueToNSArray(const base::ListValue& value);
base::ListValue NSArrayToListValue(NSArray* arr);
NSDictionary* DictionaryValueToNSDictionary(const base::DictionaryValue& value);
base::DictionaryValue NSDictionaryToDictionaryValue(NSDictionary* dict);
} // namespace electron
#endif // SHELL_BROWSER_MAC_DICT_UTIL_H_