1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_GFX_COLOR_PROFILE_H_
6 #define UI_GFX_COLOR_PROFILE_H_
10 #include "ui/gfx/geometry/rect.h"
11 #include "ui/gfx/gfx_export.h"
12 #include "ui/gfx/native_widget_types.h"
16 class GFX_EXPORT ColorProfile
{
18 // On Windows, this reads a file from disk so it should not be run on the UI
23 const std::vector
<char>& profile() const { return profile_
; }
26 std::vector
<char> profile_
;
28 DISALLOW_COPY_AND_ASSIGN(ColorProfile
);
31 inline bool InvalidColorProfileLength(size_t length
) {
32 const size_t kMinProfileLength
= 128;
33 const size_t kMaxProfileLength
= 4 * 1024 * 1024;
34 return (length
< kMinProfileLength
) || (length
> kMaxProfileLength
);
39 #endif // UI_GFX_COLOR_PROFILE_H_