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

Side by Side Diff: ui/gfx/icc_profile.h

Issue 2381493003: Move ViewMsg_New to mojom (Closed)
Patch Set: . Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « services/shell/public/cpp/capabilities_struct_traits.h ('k') | ui/gfx/ipc/color/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 {
21 template <typename, typename> struct StructTraits;
22 }
23
20 namespace gfx { 24 namespace gfx {
21 25
26 namespace mojom {
27 class ICCProfileDataView;
28 }
29
22 // Used to represent a full ICC profile, usually retrieved from a monitor. It 30 // Used to represent a full ICC profile, usually retrieved from a monitor. It
23 // can be lossily compressed into a ColorSpace object. This structure should 31 // can be lossily compressed into a ColorSpace object. This structure should
24 // only be sent from higher-privilege processes to lower-privilege processes, 32 // only be sent from higher-privilege processes to lower-privilege processes,
25 // as parsing this structure is not secure. 33 // as parsing this structure is not secure.
26 class GFX_EXPORT ICCProfile { 34 class GFX_EXPORT ICCProfile {
27 public: 35 public:
28 ICCProfile(); 36 ICCProfile();
29 ICCProfile(ICCProfile&& other); 37 ICCProfile(ICCProfile&& other);
30 ICCProfile(const ICCProfile& other); 38 ICCProfile(const ICCProfile& other);
31 ICCProfile& operator=(ICCProfile&& other); 39 ICCProfile& operator=(ICCProfile&& other);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 78
71 // This globally identifies this ICC profile. It is used to look up this ICC 79 // This globally identifies this ICC profile. It is used to look up this ICC
72 // profile from a ColorSpace object created from it. 80 // profile from a ColorSpace object created from it.
73 uint64_t id_ = 0; 81 uint64_t id_ = 0;
74 82
75 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, BT709toSRGBICC); 83 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, BT709toSRGBICC);
76 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); 84 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace);
77 friend int ::LLVMFuzzerTestOneInput(const uint8_t*, size_t); 85 friend int ::LLVMFuzzerTestOneInput(const uint8_t*, size_t);
78 friend class ColorSpace; 86 friend class ColorSpace;
79 friend struct IPC::ParamTraits<gfx::ICCProfile>; 87 friend struct IPC::ParamTraits<gfx::ICCProfile>;
88 friend struct mojo::StructTraits<gfx::mojom::ICCProfileDataView,
89 gfx::ICCProfile>;
80 }; 90 };
81 91
82 } // namespace gfx 92 } // namespace gfx
83 93
84 #endif // UI_GFX_ICC_PROFILE_H_ 94 #endif // UI_GFX_ICC_PROFILE_H_
OLDNEW
« no previous file with comments | « services/shell/public/cpp/capabilities_struct_traits.h ('k') | ui/gfx/ipc/color/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698