| 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 "content/browser/renderer_host/render_widget_host_view_mac.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h" |
| 6 | 6 |
| 7 #import <Carbon/Carbon.h> | 7 #import <Carbon/Carbon.h> |
| 8 #import <objc/runtime.h> | 8 #import <objc/runtime.h> |
| 9 #include <OpenGL/gl.h> | 9 #include <OpenGL/gl.h> |
| 10 #include <QuartzCore/QuartzCore.h> | 10 #include <QuartzCore/QuartzCore.h> |
| (...skipping 3298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3309 NSScreen* screen = [[self window] screen]; | 3309 NSScreen* screen = [[self window] screen]; |
| 3310 if (screen) { | 3310 if (screen) { |
| 3311 CGColorSpaceRef color_space = [[screen colorSpace] CGColorSpace]; | 3311 CGColorSpaceRef color_space = [[screen colorSpace] CGColorSpace]; |
| 3312 // On Sierra, we need to operate in a single screen's color space because | 3312 // On Sierra, we need to operate in a single screen's color space because |
| 3313 // IOSurfaces do not opt-out of color correction. | 3313 // IOSurfaces do not opt-out of color correction. |
| 3314 // https://crbug.com/654488 | 3314 // https://crbug.com/654488 |
| 3315 if (base::mac::IsAtLeastOS10_12()) | 3315 if (base::mac::IsAtLeastOS10_12()) |
| 3316 color_space = base::mac::GetSystemColorSpace(); | 3316 color_space = base::mac::GetSystemColorSpace(); |
| 3317 gfx::ICCProfile icc_profile = | 3317 gfx::ICCProfile icc_profile = |
| 3318 gfx::ICCProfile::FromCGColorSpace(color_space); | 3318 gfx::ICCProfile::FromCGColorSpace(color_space); |
| 3319 renderWidgetHostView_->browser_compositor_->SetDisplayColorSpace( | 3319 renderWidgetHostView_->browser_compositor_->SetDisplayColorProfile( |
| 3320 icc_profile.GetColorSpace()); | 3320 icc_profile); |
| 3321 } | 3321 } |
| 3322 } | 3322 } |
| 3323 | 3323 |
| 3324 - (void)undo:(id)sender { | 3324 - (void)undo:(id)sender { |
| 3325 WebContents* web_contents = renderWidgetHostView_->GetWebContents(); | 3325 WebContents* web_contents = renderWidgetHostView_->GetWebContents(); |
| 3326 if (web_contents) | 3326 if (web_contents) |
| 3327 web_contents->Undo(); | 3327 web_contents->Undo(); |
| 3328 } | 3328 } |
| 3329 | 3329 |
| 3330 - (void)redo:(id)sender { | 3330 - (void)redo:(id)sender { |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3490 | 3490 |
| 3491 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3491 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
| 3492 // regions that are not draggable. (See ControlRegionView in | 3492 // regions that are not draggable. (See ControlRegionView in |
| 3493 // native_app_window_cocoa.mm). This requires the render host view to be | 3493 // native_app_window_cocoa.mm). This requires the render host view to be |
| 3494 // draggable by default. | 3494 // draggable by default. |
| 3495 - (BOOL)mouseDownCanMoveWindow { | 3495 - (BOOL)mouseDownCanMoveWindow { |
| 3496 return YES; | 3496 return YES; |
| 3497 } | 3497 } |
| 3498 | 3498 |
| 3499 @end | 3499 @end |
| OLD | NEW |