| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #include "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 #include "ui/gfx/color_profile.h" | 6 #include "ui/gfx/color_profile.h" |
| 7 | 7 |
| 8 namespace gfx { | 8 namespace gfx { |
| 9 | 9 |
| 10 #if defined(OS_WIN) || (defined(OS_MACOSX) && !defined(OS_IOS)) | 10 namespace { |
| 11 void ReadColorProfile(std::vector<char>* profile); | 11 static const size_t kMinProfileLength = 128; |
| 12 #else | 12 static const size_t kMaxProfileLength = 4 * 1024 * 1024; |
| 13 void ReadColorProfile(std::vector<char>* profile) { } | 13 } |
| 14 GFX_EXPORT bool GetDisplayColorProfile(const gfx::Rect& bounds, | 14 |
| 15 std::vector<char>* profile) { | 15 ColorProfile::ColorProfile() = default; |
| 16 // TODO(port): consider screen color profile support. | 16 ColorProfile::ColorProfile(ColorProfile&& other) = default; |
| 17 return false; | 17 ColorProfile::ColorProfile(const ColorProfile& other) = default; |
| 18 ColorProfile& ColorProfile::operator=(const ColorProfile& other) = default; |
| 19 ColorProfile::~ColorProfile() = default; |
| 20 |
| 21 #if !defined(OS_WIN) && !defined(OS_MACOSX) |
| 22 // static |
| 23 ColorProfile ColorProfile::GetFromBestMonitor() { |
| 24 return ColorProfile(); |
| 18 } | 25 } |
| 19 #endif | 26 #endif |
| 20 | 27 |
| 21 ColorProfile::ColorProfile() { | 28 // static |
| 22 // TODO: support multiple monitors. | 29 bool ColorProfile::IsValidProfileLength(size_t length) { |
| 23 ReadColorProfile(&profile_); | 30 return length >= kMinProfileLength && length <= kMaxProfileLength; |
| 24 } | |
| 25 | |
| 26 ColorProfile::~ColorProfile() { | |
| 27 } | 31 } |
| 28 | 32 |
| 29 } // namespace gfx | 33 } // namespace gfx |
| OLD | NEW |