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

Side by Side Diff: ui/gfx/color_profile.cc

Issue 10804019: Fix cros compile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « ui/gfx/color_profile.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/gfx/color_profile.h" 5 #include "ui/gfx/color_profile.h"
6 6
7 #include "base/basictypes.h"
8
9 namespace gfx { 7 namespace gfx {
10 8
11 #if defined(OS_WIN) || defined(OS_MAC) 9 #if defined(OS_WIN) || defined(OS_MAC)
12 void ReadColorProfile(std::vector<char>* profile); 10 void ReadColorProfile(std::vector<char>* profile);
13 #else 11 #else
14 void ReadColorProfile(std::vector<char>* profile) { } 12 void ReadColorProfile(std::vector<char>* profile) { }
15 #endif 13 #endif
16 14
17 void GetColorProfile(std::vector<char>* profile) { 15 void GetColorProfile(std::vector<char>* profile) {
18 // Called from the FILE thread on Windows and IO thread elsewhere. 16 // Called from the FILE thread on Windows and IO thread elsewhere.
19 17
20 // TODO: support multiple monitors. 18 // TODO: support multiple monitors.
21 CR_DEFINE_STATIC_LOCAL(std::vector<char>, screen_profile, ()); 19 CR_DEFINE_STATIC_LOCAL(std::vector<char>, screen_profile, ());
22 static bool initialized = false; 20 static bool initialized = false;
23 21
24 profile->clear(); 22 profile->clear();
25 if (!initialized) { 23 if (!initialized) {
26 initialized = true; 24 initialized = true;
27 ReadColorProfile(&screen_profile); 25 ReadColorProfile(&screen_profile);
28 } 26 }
29 27
30 profile->assign(screen_profile.begin(), screen_profile.end()); 28 profile->assign(screen_profile.begin(), screen_profile.end());
31 } 29 }
32 30
33 } // namespace gfx 31 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/color_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698