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

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

Issue 1113573002: Maintain minimal error response. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments. Created 5 years, 7 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 10
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 } 1233 }
1234 1234
1235 bool RenderWidgetHostViewMac::IsPopup() const { 1235 bool RenderWidgetHostViewMac::IsPopup() const {
1236 return popup_type_ != blink::WebPopupTypeNone; 1236 return popup_type_ != blink::WebPopupTypeNone;
1237 } 1237 }
1238 1238
1239 void RenderWidgetHostViewMac::CopyFromCompositingSurface( 1239 void RenderWidgetHostViewMac::CopyFromCompositingSurface(
1240 const gfx::Rect& src_subrect, 1240 const gfx::Rect& src_subrect,
1241 const gfx::Size& dst_size, 1241 const gfx::Size& dst_size,
1242 ReadbackRequestCallback& callback, 1242 ReadbackRequestCallback& callback,
1243 const SkColorType color_type) { 1243 const SkColorType preferred_color_type) {
1244 if (delegated_frame_host_) { 1244 if (delegated_frame_host_) {
1245 delegated_frame_host_->CopyFromCompositingSurface( 1245 delegated_frame_host_->CopyFromCompositingSurface(
1246 src_subrect, dst_size, callback, color_type); 1246 src_subrect, dst_size, callback, preferred_color_type);
1247 } 1247 }
1248 } 1248 }
1249 1249
1250 void RenderWidgetHostViewMac::CopyFromCompositingSurfaceToVideoFrame( 1250 void RenderWidgetHostViewMac::CopyFromCompositingSurfaceToVideoFrame(
1251 const gfx::Rect& src_subrect, 1251 const gfx::Rect& src_subrect,
1252 const scoped_refptr<media::VideoFrame>& target, 1252 const scoped_refptr<media::VideoFrame>& target,
1253 const base::Callback<void(bool)>& callback) { 1253 const base::Callback<void(bool)>& callback) {
1254 if (delegated_frame_host_) { 1254 if (delegated_frame_host_) {
1255 delegated_frame_host_->CopyFromCompositingSurfaceToVideoFrame( 1255 delegated_frame_host_->CopyFromCompositingSurfaceToVideoFrame(
1256 src_subrect, target, callback); 1256 src_subrect, target, callback);
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 return; 1702 return;
1703 1703
1704 // Wait for a frame of the right size to come in. 1704 // Wait for a frame of the right size to come in.
1705 if (browser_compositor_) 1705 if (browser_compositor_)
1706 browser_compositor_->accelerated_widget_mac()->BeginPumpingFrames(); 1706 browser_compositor_->accelerated_widget_mac()->BeginPumpingFrames();
1707 render_widget_host_->PauseForPendingResizeOrRepaints(); 1707 render_widget_host_->PauseForPendingResizeOrRepaints();
1708 if (browser_compositor_) 1708 if (browser_compositor_)
1709 browser_compositor_->accelerated_widget_mac()->EndPumpingFrames(); 1709 browser_compositor_->accelerated_widget_mac()->EndPumpingFrames();
1710 } 1710 }
1711 1711
1712 SkColorType RenderWidgetHostViewMac::PreferredReadbackFormat() {
1713 return kN32_SkColorType;
1714 }
1715
1716 //////////////////////////////////////////////////////////////////////////////// 1712 ////////////////////////////////////////////////////////////////////////////////
1717 // gfx::DisplayObserver, public: 1713 // gfx::DisplayObserver, public:
1718 1714
1719 void RenderWidgetHostViewMac::OnDisplayAdded(const gfx::Display& display) { 1715 void RenderWidgetHostViewMac::OnDisplayAdded(const gfx::Display& display) {
1720 } 1716 }
1721 1717
1722 void RenderWidgetHostViewMac::OnDisplayRemoved(const gfx::Display& display) { 1718 void RenderWidgetHostViewMac::OnDisplayRemoved(const gfx::Display& display) {
1723 } 1719 }
1724 1720
1725 void RenderWidgetHostViewMac::OnDisplayMetricsChanged( 1721 void RenderWidgetHostViewMac::OnDisplayMetricsChanged(
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after
3485 3481
3486 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3482 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3487 // regions that are not draggable. (See ControlRegionView in 3483 // regions that are not draggable. (See ControlRegionView in
3488 // native_app_window_cocoa.mm). This requires the render host view to be 3484 // native_app_window_cocoa.mm). This requires the render host view to be
3489 // draggable by default. 3485 // draggable by default.
3490 - (BOOL)mouseDownCanMoveWindow { 3486 - (BOOL)mouseDownCanMoveWindow {
3491 return YES; 3487 return YES;
3492 } 3488 }
3493 3489
3494 @end 3490 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698