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/renderer/gpu/input_handler_proxy.h" | 5 #include "content/renderer/gpu/input_handler_proxy.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "content/renderer/gpu/input_handler_proxy_client.h" | 9 #include "content/renderer/gpu/input_handler_proxy_client.h" |
10 #include "third_party/WebKit/Source/Platform/chromium/public/Platform.h" | 10 #include "third_party/WebKit/Source/Platform/chromium/public/Platform.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 client_->DidHandleInputEvent(); | 57 client_->DidHandleInputEvent(); |
58 break; | 58 break; |
59 case DidNotHandle: | 59 case DidNotHandle: |
60 client_->DidNotHandleInputEvent(true /* send_to_widget */); | 60 client_->DidNotHandleInputEvent(true /* send_to_widget */); |
61 break; | 61 break; |
62 case DropEvent: | 62 case DropEvent: |
63 client_->DidNotHandleInputEvent(false /* send_to_widget */); | 63 client_->DidNotHandleInputEvent(false /* send_to_widget */); |
64 break; | 64 break; |
65 } | 65 } |
66 if (event.modifiers & WebInputEvent::IsLastInputEventForCurrentVSync) { | 66 if (event.modifiers & WebInputEvent::IsLastInputEventForCurrentVSync) { |
67 input_handler_->DidReceiveLastInputEventForVSync( | 67 input_handler_->DidReceiveLastInputEventForBeginFrame( |
68 base::TimeTicks::FromInternalValue(event.timeStampSeconds * | 68 base::TimeTicks::FromInternalValue(event.timeStampSeconds * |
69 base::Time::kMicrosecondsPerSecond)); | 69 base::Time::kMicrosecondsPerSecond)); |
70 } | 70 } |
71 } | 71 } |
72 | 72 |
73 InputHandlerProxy::EventDisposition | 73 InputHandlerProxy::EventDisposition |
74 InputHandlerProxy::HandleInputEventInternal(const WebInputEvent& event) { | 74 InputHandlerProxy::HandleInputEventInternal(const WebInputEvent& event) { |
75 if (event.type == WebInputEvent::MouseWheel) { | 75 if (event.type == WebInputEvent::MouseWheel) { |
76 const WebMouseWheelEvent& wheel_event = | 76 const WebMouseWheelEvent& wheel_event = |
77 *static_cast<const WebMouseWheelEvent*>(&event); | 77 *static_cast<const WebMouseWheelEvent*>(&event); |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 TRACE_EVENT2("renderer", | 402 TRACE_EVENT2("renderer", |
403 "InputHandlerProxy::notifyCurrentFlingVelocity", | 403 "InputHandlerProxy::notifyCurrentFlingVelocity", |
404 "vx", | 404 "vx", |
405 velocity.width, | 405 velocity.width, |
406 "vy", | 406 "vy", |
407 velocity.height); | 407 velocity.height); |
408 input_handler_->NotifyCurrentFlingVelocity(ToClientScrollIncrement(velocity)); | 408 input_handler_->NotifyCurrentFlingVelocity(ToClientScrollIncrement(velocity)); |
409 } | 409 } |
410 | 410 |
411 } // namespace content | 411 } // namespace content |
OLD | NEW |