| 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_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 | 941 |
| 942 if (touch_editing_client_) { | 942 if (touch_editing_client_) { |
| 943 touch_editing_client_->OnSelectionOrCursorChanged(selection_anchor_rect_, | 943 touch_editing_client_->OnSelectionOrCursorChanged(selection_anchor_rect_, |
| 944 selection_focus_rect_); | 944 selection_focus_rect_); |
| 945 } | 945 } |
| 946 } | 946 } |
| 947 | 947 |
| 948 void RenderWidgetHostViewAura::CopyFromCompositingSurface( | 948 void RenderWidgetHostViewAura::CopyFromCompositingSurface( |
| 949 const gfx::Rect& src_subrect, | 949 const gfx::Rect& src_subrect, |
| 950 const gfx::Size& dst_size, | 950 const gfx::Size& dst_size, |
| 951 CopyFromCompositingSurfaceCallback& callback, | 951 ReadbackRequestCallback& callback, |
| 952 const SkColorType color_type) { | 952 const SkColorType color_type) { |
| 953 delegated_frame_host_->CopyFromCompositingSurface( | 953 delegated_frame_host_->CopyFromCompositingSurface( |
| 954 src_subrect, dst_size, callback, color_type); | 954 src_subrect, dst_size, callback, color_type); |
| 955 } | 955 } |
| 956 | 956 |
| 957 void RenderWidgetHostViewAura::CopyFromCompositingSurfaceToVideoFrame( | 957 void RenderWidgetHostViewAura::CopyFromCompositingSurfaceToVideoFrame( |
| 958 const gfx::Rect& src_subrect, | 958 const gfx::Rect& src_subrect, |
| 959 const scoped_refptr<media::VideoFrame>& target, | 959 const scoped_refptr<media::VideoFrame>& target, |
| 960 const base::Callback<void(bool)>& callback) { | 960 const base::Callback<void(bool)>& callback) { |
| 961 delegated_frame_host_->CopyFromCompositingSurfaceToVideoFrame( | 961 delegated_frame_host_->CopyFromCompositingSurfaceToVideoFrame( |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1253 CopyFromCompositingSurface( | 1253 CopyFromCompositingSurface( |
| 1254 disambiguation_target_rect_, | 1254 disambiguation_target_rect_, |
| 1255 zoomed_size, | 1255 zoomed_size, |
| 1256 base::Bind(&RenderWidgetHostViewAura::DisambiguationPopupRendered, | 1256 base::Bind(&RenderWidgetHostViewAura::DisambiguationPopupRendered, |
| 1257 base::internal::SupportsWeakPtrBase::StaticAsWeakPtr | 1257 base::internal::SupportsWeakPtrBase::StaticAsWeakPtr |
| 1258 <RenderWidgetHostViewAura>(this)), | 1258 <RenderWidgetHostViewAura>(this)), |
| 1259 kN32_SkColorType); | 1259 kN32_SkColorType); |
| 1260 } | 1260 } |
| 1261 | 1261 |
| 1262 void RenderWidgetHostViewAura::DisambiguationPopupRendered( | 1262 void RenderWidgetHostViewAura::DisambiguationPopupRendered( |
| 1263 bool success, | 1263 const SkBitmap& result, |
| 1264 const SkBitmap& result) { | 1264 ReadbackResponse response) { |
| 1265 if (!success || disambiguation_scroll_offset_ != last_scroll_offset_) | 1265 if ((response != READBACK_SUCCESS) || |
| 1266 disambiguation_scroll_offset_ != last_scroll_offset_) |
| 1266 return; | 1267 return; |
| 1267 | 1268 |
| 1268 // Use RenderViewHostDelegate to get to the WebContentsViewAura, which will | 1269 // Use RenderViewHostDelegate to get to the WebContentsViewAura, which will |
| 1269 // actually show the disambiguation popup. | 1270 // actually show the disambiguation popup. |
| 1270 RenderViewHostDelegate* delegate = NULL; | 1271 RenderViewHostDelegate* delegate = NULL; |
| 1271 if (host_->IsRenderView()) | 1272 if (host_->IsRenderView()) |
| 1272 delegate = RenderViewHost::From(host_)->GetDelegate(); | 1273 delegate = RenderViewHost::From(host_)->GetDelegate(); |
| 1273 RenderViewHostDelegateView* delegate_view = NULL; | 1274 RenderViewHostDelegateView* delegate_view = NULL; |
| 1274 if (delegate) { | 1275 if (delegate) { |
| 1275 delegate_view = delegate->GetDelegateView(); | 1276 delegate_view = delegate->GetDelegateView(); |
| (...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2551 | 2552 |
| 2552 //////////////////////////////////////////////////////////////////////////////// | 2553 //////////////////////////////////////////////////////////////////////////////// |
| 2553 // RenderWidgetHostViewBase, public: | 2554 // RenderWidgetHostViewBase, public: |
| 2554 | 2555 |
| 2555 // static | 2556 // static |
| 2556 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2557 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2557 GetScreenInfoForWindow(results, NULL); | 2558 GetScreenInfoForWindow(results, NULL); |
| 2558 } | 2559 } |
| 2559 | 2560 |
| 2560 } // namespace content | 2561 } // namespace content |
| OLD | NEW |