Chromium Code Reviews| 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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 2210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2221 const blink::WebFloatSize& accumulatedRootOverScroll, | 2221 const blink::WebFloatSize& accumulatedRootOverScroll, |
| 2222 const blink::WebFloatPoint& position, | 2222 const blink::WebFloatPoint& position, |
| 2223 const blink::WebFloatSize& velocity) { | 2223 const blink::WebFloatSize& velocity) { |
| 2224 DidOverscrollParams params; | 2224 DidOverscrollParams params; |
| 2225 // TODO(jdduke): Consider bundling the overscroll with the input event ack to | 2225 // TODO(jdduke): Consider bundling the overscroll with the input event ack to |
| 2226 // save an IPC. | 2226 // save an IPC. |
| 2227 params.accumulated_overscroll = gfx::Vector2dF( | 2227 params.accumulated_overscroll = gfx::Vector2dF( |
| 2228 accumulatedRootOverScroll.width, accumulatedRootOverScroll.height); | 2228 accumulatedRootOverScroll.width, accumulatedRootOverScroll.height); |
| 2229 params.latest_overscroll_delta = | 2229 params.latest_overscroll_delta = |
| 2230 gfx::Vector2dF(unusedDelta.width, unusedDelta.height); | 2230 gfx::Vector2dF(unusedDelta.width, unusedDelta.height); |
| 2231 // TODO(sataya.m): ratify velocity once http://crbug.com/499743 is fixed. | |
|
jdduke (slow)
2015/06/12 15:57:38
Nit: "Ratify", thought it's not quite clear what r
| |
| 2231 params.current_fling_velocity = | 2232 params.current_fling_velocity = |
| 2232 gfx::Vector2dF(velocity.width, velocity.height); | 2233 gfx::Vector2dF(-velocity.width, -velocity.height); |
| 2233 params.causal_event_viewport_point = gfx::PointF(position.x, position.y); | 2234 params.causal_event_viewport_point = gfx::PointF(position.x, position.y); |
| 2234 Send(new InputHostMsg_DidOverscroll(routing_id_, params)); | 2235 Send(new InputHostMsg_DidOverscroll(routing_id_, params)); |
| 2235 } | 2236 } |
| 2236 | 2237 |
| 2237 void RenderWidget::StartCompositor() { | 2238 void RenderWidget::StartCompositor() { |
| 2238 // For widgets that are never visible, we don't need the compositor to run | 2239 // For widgets that are never visible, we don't need the compositor to run |
| 2239 // at all. | 2240 // at all. |
| 2240 if (never_visible_) | 2241 if (never_visible_) |
| 2241 return; | 2242 return; |
| 2242 // In tests without a RenderThreadImpl, don't set ready as this kicks | 2243 // In tests without a RenderThreadImpl, don't set ready as this kicks |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2454 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2455 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2455 video_hole_frames_.AddObserver(frame); | 2456 video_hole_frames_.AddObserver(frame); |
| 2456 } | 2457 } |
| 2457 | 2458 |
| 2458 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2459 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2459 video_hole_frames_.RemoveObserver(frame); | 2460 video_hole_frames_.RemoveObserver(frame); |
| 2460 } | 2461 } |
| 2461 #endif // defined(VIDEO_HOLE) | 2462 #endif // defined(VIDEO_HOLE) |
| 2462 | 2463 |
| 2463 } // namespace content | 2464 } // namespace content |
| OLD | NEW |