OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/smooth_scroll_gesture_controller.h" | 5 #include "content/browser/renderer_host/smooth_scroll_gesture_controller.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "content/common/view_messages.h" | 9 #include "content/common/view_messages.h" |
10 #include "content/port/browser/render_widget_host_view_port.h" | 10 #include "content/port/browser/render_widget_host_view_port.h" |
11 #include "content/port/browser/smooth_scroll_gesture.h" | 11 #include "content/port/browser/smooth_scroll_gesture.h" |
12 #include "content/public/browser/render_widget_host.h" | 12 #include "content/public/browser/render_widget_host.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 // How many milliseconds apart synthetic scroll messages should be sent. | 18 // How many milliseconds apart synthetic scroll messages should be sent. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 void SmoothScrollGestureController::OnTimer() { | 52 void SmoothScrollGestureController::OnTimer() { |
53 base::TimeTicks now = base::TimeTicks::Now(); | 53 base::TimeTicks now = base::TimeTicks::Now(); |
54 if (!pending_smooth_scroll_gesture_->ForwardInputEvents(now, rwh_)) { | 54 if (!pending_smooth_scroll_gesture_->ForwardInputEvents(now, rwh_)) { |
55 timer_.Stop(); | 55 timer_.Stop(); |
56 pending_smooth_scroll_gesture_ = NULL; | 56 pending_smooth_scroll_gesture_ = NULL; |
57 rwh_->Send(new ViewMsg_SmoothScrollCompleted(rwh_->GetRoutingID())); | 57 rwh_->Send(new ViewMsg_SmoothScrollCompleted(rwh_->GetRoutingID())); |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
61 } // namespace content | 61 } // namespace content |
OLD | NEW |