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

Side by Side Diff: content/shell/renderer/test_runner/helper/layout_test_helper_mac.mm

Issue 124863002: Fix build on OSX. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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 | « no previous file | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /* 5 /*
6 * Copyright (C) 2010 Google Inc. All rights reserved. 6 * Copyright (C) 2010 Google Inc. All rights reserved.
7 * Copyright (C) 2012 Apple Inc. 7 * Copyright (C) 2012 Apple Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are 10 * modification, are permitted provided that the following conditions are
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 50 MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
51 51
52 CFURLRef user_color_profile_url; 52 CFURLRef user_color_profile_url;
53 53
54 void InstallLayoutTestColorProfile() { 54 void InstallLayoutTestColorProfile() {
55 // To make sure we get consistent colors (not dependent on the chosen color 55 // To make sure we get consistent colors (not dependent on the chosen color
56 // space of the main display), we force the generic RGB color profile. 56 // space of the main display), we force the generic RGB color profile.
57 // This causes a change the user can see. 57 // This causes a change the user can see.
58 58
59 CFUUIDRef main_display_id = 59 CFUUIDRef main_display_id =
60 CGDisplayCreateUUIDFromDisplayID(CGmain_display_id()); 60 CGDisplayCreateUUIDFromDisplayID(CGMainDisplayID());
tfarina 2014/01/06 12:13:50 ops, looks like I missed on spot :( Thanks for fi
61 61
62 if (!user_color_profile_url) { 62 if (!user_color_profile_url) {
63 CFDictionaryRef device_info = ColorSyncDeviceCopyDeviceInfo( 63 CFDictionaryRef device_info = ColorSyncDeviceCopyDeviceInfo(
64 kColorSyncDisplayDeviceClass, main_display_id); 64 kColorSyncDisplayDeviceClass, main_display_id);
65 65
66 if (!device_info) { 66 if (!device_info) {
67 NSLog(@"No display attached to system; not setting main display's color " 67 NSLog(@"No display attached to system; not setting main display's color "
68 "profile."); 68 "profile.");
69 CFRelease(main_display_id); 69 CFRelease(main_display_id);
70 return; 70 return;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 254
255 // Wait for any key (or signal). 255 // Wait for any key (or signal).
256 getchar(); 256 getchar();
257 257
258 // Restore the profile. 258 // Restore the profile.
259 RestoreUserColorProfile(); 259 RestoreUserColorProfile();
260 260
261 [pool release]; 261 [pool release];
262 return 0; 262 return 0;
263 } 263 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698