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

Unified Diff: ui/gfx/mojo/icc_profile_struct_traits.h

Issue 2502703002: Add more robust gfx::ColorSpace<->gfx::ICCProfile conversion (Closed)
Patch Set: Created 4 years, 1 month 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: ui/gfx/mojo/icc_profile_struct_traits.h
diff --git a/ui/gfx/mojo/icc_profile_struct_traits.h b/ui/gfx/mojo/icc_profile_struct_traits.h
index 23ceda9dcfcf94caa6b0caf2f1397d6c663f4aac..47d68b6359df1baa973a307fc2031e2a13e1bfb3 100644
--- a/ui/gfx/mojo/icc_profile_struct_traits.h
+++ b/ui/gfx/mojo/icc_profile_struct_traits.h
@@ -17,7 +17,12 @@ namespace mojo {
template <>
struct StructTraits<gfx::mojom::ICCProfileDataView, gfx::ICCProfile> {
- static bool valid(const gfx::ICCProfile& profile) { return profile.valid_; }
+ static gfx::ICCProfile::Type type(const gfx::ICCProfile& profile) {
+ return profile.type_;
+ }
+ static gfx::ColorSpace color_space(const gfx::ICCProfile& profile) {
+ return profile.color_space_;
+ }
static base::StringPiece data(const gfx::ICCProfile& profile) {
return base::StringPiece(profile.data_.data(), profile.data_.size());
}

Powered by Google App Engine
This is Rietveld 408576698