| 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 2162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2173 const blink::WebFloatSize& velocity) { | 2173 const blink::WebFloatSize& velocity) { |
| 2174 DidOverscrollParams params; | 2174 DidOverscrollParams params; |
| 2175 params.accumulated_overscroll = gfx::Vector2dF( | 2175 params.accumulated_overscroll = gfx::Vector2dF( |
| 2176 accumulatedRootOverScroll.width, accumulatedRootOverScroll.height); | 2176 accumulatedRootOverScroll.width, accumulatedRootOverScroll.height); |
| 2177 params.latest_overscroll_delta = | 2177 params.latest_overscroll_delta = |
| 2178 gfx::Vector2dF(unusedDelta.width, unusedDelta.height); | 2178 gfx::Vector2dF(unusedDelta.width, unusedDelta.height); |
| 2179 // TODO(sataya.m): don't negate velocity once http://crbug.com/499743 is | 2179 // TODO(sataya.m): don't negate velocity once http://crbug.com/499743 is |
| 2180 // fixed. | 2180 // fixed. |
| 2181 params.current_fling_velocity = | 2181 params.current_fling_velocity = |
| 2182 gfx::Vector2dF(-velocity.width, -velocity.height); | 2182 gfx::Vector2dF(-velocity.width, -velocity.height); |
| 2183 params.causal_event_viewport_point = gfx::PointF(position.x, position.y); | 2183 params.causal_event_viewport_point = gfx::Point(position.x, position.y); |
| 2184 | 2184 |
| 2185 // If we're currently handling an event, stash the overscroll data such that | 2185 // If we're currently handling an event, stash the overscroll data such that |
| 2186 // it can be bundled in the event ack. | 2186 // it can be bundled in the event ack. |
| 2187 if (handling_event_overscroll_) { | 2187 if (handling_event_overscroll_) { |
| 2188 handling_event_overscroll_->reset(new DidOverscrollParams(params)); | 2188 handling_event_overscroll_->reset(new DidOverscrollParams(params)); |
| 2189 return; | 2189 return; |
| 2190 } | 2190 } |
| 2191 | 2191 |
| 2192 Send(new InputHostMsg_DidOverscroll(routing_id_, params)); | 2192 Send(new InputHostMsg_DidOverscroll(routing_id_, params)); |
| 2193 } | 2193 } |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2410 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2410 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2411 video_hole_frames_.AddObserver(frame); | 2411 video_hole_frames_.AddObserver(frame); |
| 2412 } | 2412 } |
| 2413 | 2413 |
| 2414 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2414 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2415 video_hole_frames_.RemoveObserver(frame); | 2415 video_hole_frames_.RemoveObserver(frame); |
| 2416 } | 2416 } |
| 2417 #endif // defined(VIDEO_HOLE) | 2417 #endif // defined(VIDEO_HOLE) |
| 2418 | 2418 |
| 2419 } // namespace content | 2419 } // namespace content |
| OLD | NEW |