Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Unified Diff: components/mus/public/cpp/lib/property_type_converters.cc

Issue 1953183002: Support the ignored_by_shelf flag for Mus windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix deps and limit mus to MOJO_SHELL_CLIENT. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « chrome/browser/ui/views/status_bubble_views.cc ('k') | components/mus/public/cpp/property_type_converters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698