OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_GFX_ICC_PROFILE_H_ | 5 #ifndef UI_GFX_ICC_PROFILE_H_ |
6 #define UI_GFX_ICC_PROFILE_H_ | 6 #define UI_GFX_ICC_PROFILE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "ui/gfx/color_space.h" | 12 #include "ui/gfx/color_space.h" |
13 | 13 |
14 #if defined(OS_MACOSX) | 14 #if defined(OS_MACOSX) |
15 #include <CoreGraphics/CGColorSpace.h> | 15 #include <CoreGraphics/CGColorSpace.h> |
16 #endif | 16 #endif |
17 | 17 |
18 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size); | 18 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size); |
19 | 19 |
20 namespace mojo { | 20 namespace mojo { |
21 template <typename, typename> struct StructTraits; | 21 template <typename, typename> struct StructTraits; |
22 } | 22 } |
23 | 23 |
24 namespace gfx { | 24 namespace gfx { |
25 | 25 |
26 // Used to represent a full ICC profile, usually retrieved from a monitor. It | 26 // Used to represent a full ICC profile, usually retrieved from a monitor. It |
27 // can be lossily compressed into a ColorSpace object. This structure should | 27 // can be lossily compressed into a ColorSpace object. This structure should |
28 // only be sent from higher-privilege processes to lower-privilege processes, | 28 // only be sent from higher-privilege processes to lower-privilege processes, |
29 // as parsing this structure is not secure. | 29 // as parsing this structure is not secure. |
30 class GFX_EXPORT ICCProfile { | 30 class COLOR_SPACE_EXPORT ICCProfile { |
31 public: | 31 public: |
32 ICCProfile(); | 32 ICCProfile(); |
33 ICCProfile(ICCProfile&& other); | 33 ICCProfile(ICCProfile&& other); |
34 ICCProfile(const ICCProfile& other); | 34 ICCProfile(const ICCProfile& other); |
35 ICCProfile& operator=(ICCProfile&& other); | 35 ICCProfile& operator=(ICCProfile&& other); |
36 ICCProfile& operator=(const ICCProfile& other); | 36 ICCProfile& operator=(const ICCProfile& other); |
37 ~ICCProfile(); | 37 ~ICCProfile(); |
38 bool operator==(const ICCProfile& other) const; | 38 bool operator==(const ICCProfile& other) const; |
39 bool operator!=(const ICCProfile& other) const; | 39 bool operator!=(const ICCProfile& other) const; |
40 | 40 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); | 129 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); |
130 friend int ::LLVMFuzzerTestOneInput(const uint8_t*, size_t); | 130 friend int ::LLVMFuzzerTestOneInput(const uint8_t*, size_t); |
131 friend class ColorSpace; | 131 friend class ColorSpace; |
132 friend class ColorTransformInternal; | 132 friend class ColorTransformInternal; |
133 friend struct IPC::ParamTraits<gfx::ICCProfile>; | 133 friend struct IPC::ParamTraits<gfx::ICCProfile>; |
134 }; | 134 }; |
135 | 135 |
136 } // namespace gfx | 136 } // namespace gfx |
137 | 137 |
138 #endif // UI_GFX_ICC_PROFILE_H_ | 138 #endif // UI_GFX_ICC_PROFILE_H_ |
OLD | NEW |