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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 20045007: Use DidOverscrollParams in the browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 2 Created 6 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_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
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)
467 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStopFlinging, OnFlingingStopped) 466 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStopFlinging, OnFlingingStopped)
468 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) 467 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect)
469 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateIsDelayed, OnUpdateIsDelayed) 468 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateIsDelayed, OnUpdateIsDelayed)
470 IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnFocus) 469 IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnFocus)
471 IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnBlur) 470 IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnBlur)
472 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor) 471 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor)
473 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTouchEventEmulationEnabled, 472 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTouchEventEmulationEnabled,
474 OnSetTouchEventEmulationEnabled) 473 OnSetTouchEventEmulationEnabled)
475 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputTypeChanged, 474 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputTypeChanged,
476 OnTextInputTypeChanged) 475 OnTextInputTypeChanged)
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1503 &ack.resources); 1502 &ack.resources);
1504 } else if (frame->software_frame_data) { 1503 } else if (frame->software_frame_data) {
1505 ack.last_software_frame_id = frame->software_frame_data->id; 1504 ack.last_software_frame_id = frame->software_frame_data->id;
1506 } 1505 }
1507 SendSwapCompositorFrameAck(routing_id_, output_surface_id, 1506 SendSwapCompositorFrameAck(routing_id_, output_surface_id,
1508 process_->GetID(), ack); 1507 process_->GetID(), ack);
1509 } 1508 }
1510 return true; 1509 return true;
1511 } 1510 }
1512 1511
1513 void RenderWidgetHostImpl::OnOverscrolled(
1514 gfx::Vector2dF accumulated_overscroll,
1515 gfx::Vector2dF current_fling_velocity) {
1516 if (view_)
1517 view_->OnOverscrolled(accumulated_overscroll, current_fling_velocity);
1518 }
1519
1520 void RenderWidgetHostImpl::OnFlingingStopped() { 1512 void RenderWidgetHostImpl::OnFlingingStopped() {
1521 if (view_) 1513 if (view_)
1522 view_->DidStopFlinging(); 1514 view_->DidStopFlinging();
1523 } 1515 }
1524 1516
1525 void RenderWidgetHostImpl::OnUpdateRect( 1517 void RenderWidgetHostImpl::OnUpdateRect(
1526 const ViewHostMsg_UpdateRect_Params& params) { 1518 const ViewHostMsg_UpdateRect_Params& params) {
1527 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnUpdateRect"); 1519 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnUpdateRect");
1528 TimeTicks paint_start = TimeTicks::Now(); 1520 TimeTicks paint_start = TimeTicks::Now();
1529 1521
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
2354 } 2346 }
2355 } 2347 }
2356 2348
2357 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() { 2349 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() {
2358 if (view_) 2350 if (view_)
2359 return view_->PreferredReadbackFormat(); 2351 return view_->PreferredReadbackFormat();
2360 return SkBitmap::kARGB_8888_Config; 2352 return SkBitmap::kARGB_8888_Config;
2361 } 2353 }
2362 2354
2363 } // namespace content 2355 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698