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_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 OnQueueSyntheticGesture) | 456 OnQueueSyntheticGesture) |
457 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnRenderViewReady) | 457 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnRenderViewReady) |
458 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderProcessGone, OnRenderProcessGone) | 458 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderProcessGone, OnRenderProcessGone) |
459 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) | 459 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) |
460 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateScreenRects_ACK, | 460 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateScreenRects_ACK, |
461 OnUpdateScreenRectsAck) | 461 OnUpdateScreenRectsAck) |
462 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) | 462 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) |
463 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText) | 463 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText) |
464 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_SwapCompositorFrame, | 464 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_SwapCompositorFrame, |
465 msg_is_ok = OnSwapCompositorFrame(msg)) | 465 msg_is_ok = OnSwapCompositorFrame(msg)) |
466 IPC_MESSAGE_HANDLER(ViewHostMsg_DidOverscroll, OnOverscrolled) | 466 IPC_MESSAGE_HANDLER(ViewHostMsg_DidOverscroll, OnDidOverscroll) |
467 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStopFlinging, OnFlingingStopped) | 467 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStopFlinging, OnFlingingStopped) |
468 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) | 468 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) |
469 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateIsDelayed, OnUpdateIsDelayed) | 469 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateIsDelayed, OnUpdateIsDelayed) |
470 IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnFocus) | 470 IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnFocus) |
471 IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnBlur) | 471 IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnBlur) |
472 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor) | 472 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor) |
473 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTouchEventEmulationEnabled, | 473 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTouchEventEmulationEnabled, |
474 OnSetTouchEventEmulationEnabled) | 474 OnSetTouchEventEmulationEnabled) |
475 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputTypeChanged, | 475 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputTypeChanged, |
476 OnTextInputTypeChanged) | 476 OnTextInputTypeChanged) |
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1542 &ack.resources); | 1542 &ack.resources); |
1543 } else if (frame->software_frame_data) { | 1543 } else if (frame->software_frame_data) { |
1544 ack.last_software_frame_id = frame->software_frame_data->id; | 1544 ack.last_software_frame_id = frame->software_frame_data->id; |
1545 } | 1545 } |
1546 SendSwapCompositorFrameAck(routing_id_, output_surface_id, | 1546 SendSwapCompositorFrameAck(routing_id_, output_surface_id, |
1547 process_->GetID(), ack); | 1547 process_->GetID(), ack); |
1548 } | 1548 } |
1549 return true; | 1549 return true; |
1550 } | 1550 } |
1551 | 1551 |
1552 void RenderWidgetHostImpl::OnOverscrolled( | 1552 void RenderWidgetHostImpl::OnDidOverscroll(const DidOverscrollParams& params) { |
1553 gfx::Vector2dF accumulated_overscroll, | |
1554 gfx::Vector2dF current_fling_velocity) { | |
1555 if (view_) | 1553 if (view_) |
1556 view_->OnOverscrolled(accumulated_overscroll, current_fling_velocity); | 1554 view_->DidOverscroll(params); |
1557 } | 1555 } |
1558 | 1556 |
1559 void RenderWidgetHostImpl::OnFlingingStopped() { | 1557 void RenderWidgetHostImpl::OnFlingingStopped() { |
1560 if (view_) | 1558 if (view_) |
1561 view_->DidStopFlinging(); | 1559 view_->DidStopFlinging(); |
1562 } | 1560 } |
1563 | 1561 |
1564 void RenderWidgetHostImpl::OnUpdateRect( | 1562 void RenderWidgetHostImpl::OnUpdateRect( |
1565 const ViewHostMsg_UpdateRect_Params& params) { | 1563 const ViewHostMsg_UpdateRect_Params& params) { |
1566 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnUpdateRect"); | 1564 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnUpdateRect"); |
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2393 } | 2391 } |
2394 } | 2392 } |
2395 | 2393 |
2396 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() { | 2394 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() { |
2397 if (view_) | 2395 if (view_) |
2398 return view_->PreferredReadbackFormat(); | 2396 return view_->PreferredReadbackFormat(); |
2399 return SkBitmap::kARGB_8888_Config; | 2397 return SkBitmap::kARGB_8888_Config; |
2400 } | 2398 } |
2401 | 2399 |
2402 } // namespace content | 2400 } // namespace content |
OLD | NEW |