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

Side by Side Diff: content/browser/web_contents/web_contents_view_mac.mm

Issue 2325773003: cc: Plumb the monitor color profile to renderer for rasterization (Closed)
Patch Set: Unrevert Created 4 years, 3 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 | « content/browser/web_contents/web_contents_view_aura.cc ('k') | content/common/view_messages.h » ('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 (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 #import <Carbon/Carbon.h> 5 #import <Carbon/Carbon.h>
6 6
7 #import "content/browser/web_contents/web_contents_view_mac.h" 7 #import "content/browser/web_contents/web_contents_view_mac.h"
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 - (void)viewDidBecomeFirstResponder:(NSNotification*)notification; 75 - (void)viewDidBecomeFirstResponder:(NSNotification*)notification;
76 - (content::WebContentsImpl*)webContents; 76 - (content::WebContentsImpl*)webContents;
77 @end 77 @end
78 78
79 namespace { 79 namespace {
80 80
81 content::ScreenInfo GetNSViewScreenInfo(NSView* view) { 81 content::ScreenInfo GetNSViewScreenInfo(NSView* view) {
82 display::Display display = 82 display::Display display =
83 display::Screen::GetScreen()->GetDisplayNearestWindow(view); 83 display::Screen::GetScreen()->GetDisplayNearestWindow(view);
84 84
85 NSScreen* screen = [NSScreen deepestScreen];
86
87 content::ScreenInfo results; 85 content::ScreenInfo results;
88
89 results.device_scale_factor = static_cast<int>(display.device_scale_factor()); 86 results.device_scale_factor = static_cast<int>(display.device_scale_factor());
90 results.depth = NSBitsPerPixelFromDepth([screen depth]); 87 results.icc_profile = display.icc_profile();
91 results.depth_per_component = NSBitsPerSampleFromDepth([screen depth]); 88 results.depth = display.color_depth();
92 results.is_monochrome = 89 results.depth_per_component = display.depth_per_component();
93 [[screen colorSpace] colorSpaceModel] == NSGrayColorSpaceModel; 90 results.is_monochrome = display.is_monochrome();
94 results.rect = display.bounds(); 91 results.rect = display.bounds();
95 results.available_rect = display.work_area(); 92 results.available_rect = display.work_area();
96 results.orientation_angle = display.RotationAsDegree(); 93 results.orientation_angle = display.RotationAsDegree();
97 results.orientation_type = 94 results.orientation_type =
98 content::RenderWidgetHostViewBase::GetOrientationTypeForDesktop(display); 95 content::RenderWidgetHostViewBase::GetOrientationTypeForDesktop(display);
99 96
100 return results; 97 return results;
101 } 98 }
102 99
103 } // namespace 100 } // namespace
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 711
715 - (void)viewDidHide { 712 - (void)viewDidHide {
716 [self updateWebContentsVisibility]; 713 [self updateWebContentsVisibility];
717 } 714 }
718 715
719 - (void)viewDidUnhide { 716 - (void)viewDidUnhide {
720 [self updateWebContentsVisibility]; 717 [self updateWebContentsVisibility];
721 } 718 }
722 719
723 @end 720 @end
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698