| Index: components/mus/public/cpp/lib/property_type_converters.cc
|
| diff --git a/components/mus/public/cpp/lib/property_type_converters.cc b/components/mus/public/cpp/lib/property_type_converters.cc
|
| index 9503b9be985f9961a884645c7cd37d292c493236..17cacf1f24991dbc0e13ac13b9f5f1928023b6d1 100644
|
| --- a/components/mus/public/cpp/lib/property_type_converters.cc
|
| +++ b/components/mus/public/cpp/lib/property_type_converters.cc
|
| @@ -189,4 +189,19 @@ SkBitmap TypeConverter<SkBitmap, std::vector<uint8_t>>::Convert(
|
| return bitmap;
|
| }
|
|
|
| +// static
|
| +std::vector<uint8_t> TypeConverter<std::vector<uint8_t>, bool>::Convert(
|
| + bool input) {
|
| + std::vector<uint8_t> vec(1);
|
| + vec[0] = input ? 1 : 0;
|
| + return vec;
|
| +}
|
| +
|
| +// static
|
| +bool TypeConverter<bool, std::vector<uint8_t>>::Convert(
|
| + const std::vector<uint8_t>& input) {
|
| + // Empty vectors are interpreted as false.
|
| + return !input.empty() && (input[0] == 1);
|
| +}
|
| +
|
| } // namespace mojo
|
|
|