| 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 <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 | 10 |
| (...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 const gfx::Rect& src_subrect, | 1304 const gfx::Rect& src_subrect, |
| 1305 const gfx::Size& dst_size, | 1305 const gfx::Size& dst_size, |
| 1306 const ReadbackRequestCallback& callback, | 1306 const ReadbackRequestCallback& callback, |
| 1307 const SkColorType preferred_color_type) { | 1307 const SkColorType preferred_color_type) { |
| 1308 DCHECK(delegated_frame_host_); | 1308 DCHECK(delegated_frame_host_); |
| 1309 delegated_frame_host_->CopyFromCompositingSurface( | 1309 delegated_frame_host_->CopyFromCompositingSurface( |
| 1310 src_subrect, dst_size, callback, preferred_color_type); | 1310 src_subrect, dst_size, callback, preferred_color_type); |
| 1311 } | 1311 } |
| 1312 | 1312 |
| 1313 void RenderWidgetHostViewMac::CopyFromCompositingSurfaceToVideoFrame( | 1313 void RenderWidgetHostViewMac::CopyFromCompositingSurfaceToVideoFrame( |
| 1314 const gfx::Rect& src_subrect, | 1314 const gfx::Rect& src_subrect, |
| 1315 const scoped_refptr<media::VideoFrame>& target, | 1315 const scoped_refptr<media::VideoFrame>& target, |
| 1316 const base::Callback<void(bool)>& callback) { | 1316 const base::Callback<void(const gfx::Rect&, bool)>& callback) { |
| 1317 DCHECK(delegated_frame_host_); | 1317 DCHECK(delegated_frame_host_); |
| 1318 delegated_frame_host_->CopyFromCompositingSurfaceToVideoFrame( | 1318 delegated_frame_host_->CopyFromCompositingSurfaceToVideoFrame( |
| 1319 src_subrect, target, callback); | 1319 src_subrect, target, callback); |
| 1320 } | 1320 } |
| 1321 | 1321 |
| 1322 bool RenderWidgetHostViewMac::CanCopyToVideoFrame() const { | 1322 bool RenderWidgetHostViewMac::CanCopyToVideoFrame() const { |
| 1323 DCHECK(delegated_frame_host_); | 1323 DCHECK(delegated_frame_host_); |
| 1324 return delegated_frame_host_->CanCopyToVideoFrame(); | 1324 return delegated_frame_host_->CanCopyToVideoFrame(); |
| 1325 } | 1325 } |
| 1326 | 1326 |
| (...skipping 2162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3489 | 3489 |
| 3490 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3490 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
| 3491 // regions that are not draggable. (See ControlRegionView in | 3491 // regions that are not draggable. (See ControlRegionView in |
| 3492 // native_app_window_cocoa.mm). This requires the render host view to be | 3492 // native_app_window_cocoa.mm). This requires the render host view to be |
| 3493 // draggable by default. | 3493 // draggable by default. |
| 3494 - (BOOL)mouseDownCanMoveWindow { | 3494 - (BOOL)mouseDownCanMoveWindow { |
| 3495 return YES; | 3495 return YES; |
| 3496 } | 3496 } |
| 3497 | 3497 |
| 3498 @end | 3498 @end |
| OLD | NEW |