| 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_win.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
| 6 | 6 |
| 7 #include <InputScope.h> | 7 #include <InputScope.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 const base::Callback<void(bool, const SkBitmap&)>& callback) { | 819 const base::Callback<void(bool, const SkBitmap&)>& callback) { |
| 820 base::ScopedClosureRunner scoped_callback_runner( | 820 base::ScopedClosureRunner scoped_callback_runner( |
| 821 base::Bind(callback, false, SkBitmap())); | 821 base::Bind(callback, false, SkBitmap())); |
| 822 if (!accelerated_surface_.get()) | 822 if (!accelerated_surface_.get()) |
| 823 return; | 823 return; |
| 824 | 824 |
| 825 if (dst_size.IsEmpty()) | 825 if (dst_size.IsEmpty()) |
| 826 return; | 826 return; |
| 827 | 827 |
| 828 scoped_callback_runner.Release(); | 828 scoped_callback_runner.Release(); |
| 829 accelerated_surface_->AsyncCopyTo( | 829 accelerated_surface_->AsyncCopyTo(src_subrect, dst_size, callback); |
| 830 src_subrect, | 830 } |
| 831 dst_size, | 831 |
| 832 callback); | 832 void RenderWidgetHostViewWin::CopyFromCompositingSurfaceToVideoFrame( |
| 833 const gfx::Rect& src_subrect, |
| 834 const gfx::Size& dst_size, |
| 835 const base::Callback<void(media::VideoFrame*)>& callback) { |
| 836 base::ScopedClosureRunner scoped_callback_runner( |
| 837 base::Bind(callback, media::VideoFrame::CreateEmptyFrame())); |
| 838 if (!accelerated_surface_.get()) |
| 839 return; |
| 840 |
| 841 if (dst_size.IsEmpty()) |
| 842 return; |
| 843 |
| 844 scoped_callback_runner.Release(); |
| 845 accelerated_surface_->AsyncCopyToVideoFrame(src_subrect, dst_size, callback); |
| 833 } | 846 } |
| 834 | 847 |
| 835 void RenderWidgetHostViewWin::SetBackground(const SkBitmap& background) { | 848 void RenderWidgetHostViewWin::SetBackground(const SkBitmap& background) { |
| 836 RenderWidgetHostViewBase::SetBackground(background); | 849 RenderWidgetHostViewBase::SetBackground(background); |
| 837 render_widget_host_->SetBackground(background); | 850 render_widget_host_->SetBackground(background); |
| 838 } | 851 } |
| 839 | 852 |
| 840 void RenderWidgetHostViewWin::ProcessAckedTouchEvent( | 853 void RenderWidgetHostViewWin::ProcessAckedTouchEvent( |
| 841 const WebKit::WebTouchEvent& touch, InputEventAckState ack_result) { | 854 const WebKit::WebTouchEvent& touch, InputEventAckState ack_result) { |
| 842 DCHECK(touch_events_enabled_); | 855 DCHECK(touch_events_enabled_); |
| (...skipping 2227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3070 return new RenderWidgetHostViewWin(widget); | 3083 return new RenderWidgetHostViewWin(widget); |
| 3071 } | 3084 } |
| 3072 | 3085 |
| 3073 // static | 3086 // static |
| 3074 void RenderWidgetHostViewPort::GetDefaultScreenInfo( | 3087 void RenderWidgetHostViewPort::GetDefaultScreenInfo( |
| 3075 WebKit::WebScreenInfo* results) { | 3088 WebKit::WebScreenInfo* results) { |
| 3076 GetScreenInfoForWindow(results, 0); | 3089 GetScreenInfoForWindow(results, 0); |
| 3077 } | 3090 } |
| 3078 | 3091 |
| 3079 } // namespace content | 3092 } // namespace content |
| OLD | NEW |