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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 2119723002: Color: Add SetColorSpace member to gfx::GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plumb_2
Patch Set: Add mac plumbing Created 4 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
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 "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 <objc/runtime.h> 7 #import <objc/runtime.h>
8 #include <OpenGL/gl.h> 8 #include <OpenGL/gl.h>
9 #include <QuartzCore/QuartzCore.h> 9 #include <QuartzCore/QuartzCore.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 3111 matching lines...) Expand 10 before | Expand all | Expand 10 after
3122 if (hasOpenMouseDown_) { 3122 if (hasOpenMouseDown_) {
3123 WebMouseEvent event; 3123 WebMouseEvent event;
3124 event.type = WebInputEvent::MouseUp; 3124 event.type = WebInputEvent::MouseUp;
3125 event.button = WebMouseEvent::ButtonLeft; 3125 event.button = WebMouseEvent::ButtonLeft;
3126 renderWidgetHostView_->ForwardMouseEvent(event); 3126 renderWidgetHostView_->ForwardMouseEvent(event);
3127 3127
3128 hasOpenMouseDown_ = NO; 3128 hasOpenMouseDown_ = NO;
3129 } 3129 }
3130 } 3130 }
3131 3131
3132 - (void)viewDidChangeBackingProperties {
3133 NSScreen* screen = [[self window] screen];
3134 if (screen && renderWidgetHostView_->browser_compositor_) {
enne (OOO) 2016/07/01 17:31:23 Doesn't the browser compositor always exist?
ccameron 2016/07/01 18:53:16 There is a brief moment during shutdown when it is
3135 renderWidgetHostView_->browser_compositor_->SetDisplayColorSpace(
3136 gfx::ColorSpace::FromCGColorSpace([[screen colorSpace] CGColorSpace]));
3137 }
3138 }
3139
3132 - (void)undo:(id)sender { 3140 - (void)undo:(id)sender {
3133 WebContents* web_contents = renderWidgetHostView_->GetWebContents(); 3141 WebContents* web_contents = renderWidgetHostView_->GetWebContents();
3134 if (web_contents) 3142 if (web_contents)
3135 web_contents->Undo(); 3143 web_contents->Undo();
3136 } 3144 }
3137 3145
3138 - (void)redo:(id)sender { 3146 - (void)redo:(id)sender {
3139 WebContents* web_contents = renderWidgetHostView_->GetWebContents(); 3147 WebContents* web_contents = renderWidgetHostView_->GetWebContents();
3140 if (web_contents) 3148 if (web_contents)
3141 web_contents->Redo(); 3149 web_contents->Redo();
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
3300 3308
3301 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3309 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3302 // regions that are not draggable. (See ControlRegionView in 3310 // regions that are not draggable. (See ControlRegionView in
3303 // native_app_window_cocoa.mm). This requires the render host view to be 3311 // native_app_window_cocoa.mm). This requires the render host view to be
3304 // draggable by default. 3312 // draggable by default.
3305 - (BOOL)mouseDownCanMoveWindow { 3313 - (BOOL)mouseDownCanMoveWindow {
3306 return YES; 3314 return YES;
3307 } 3315 }
3308 3316
3309 @end 3317 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/browser_compositor_view_mac.mm ('k') | gpu/ipc/client/gpu_memory_buffer_impl_io_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698