mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Expose the NSArrayToListValue converter.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
|
||||
namespace base {
|
||||
class Value;
|
||||
class ListValue;
|
||||
class DictionaryValue;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ NSDictionary* DictionaryValueToNSDictionary(const base::DictionaryValue& value);
|
||||
std::unique_ptr<base::DictionaryValue> NSDictionaryToDictionaryValue(
|
||||
NSDictionary* dict);
|
||||
|
||||
std::unique_ptr<base::ListValue> NSArrayToListValue(NSArray* arr);
|
||||
|
||||
} // namespace atom
|
||||
|
||||
#endif // ATOM_BROWSER_MAC_DICT_UTIL_H_
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
|
||||
namespace atom {
|
||||
|
||||
namespace {
|
||||
|
||||
std::unique_ptr<base::ListValue> NSArrayToListValue(NSArray* arr) {
|
||||
if (!arr)
|
||||
return nullptr;
|
||||
@@ -51,8 +49,6 @@ std::unique_ptr<base::ListValue> NSArrayToListValue(NSArray* arr) {
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
NSDictionary* DictionaryValueToNSDictionary(const base::DictionaryValue& value) {
|
||||
std::string json;
|
||||
if (!base::JSONWriter::Write(value, &json))
|
||||
|
||||
Reference in New Issue
Block a user