| 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 28 matching lines...) Expand all Loading... |
| 39 input_handler_ = NULL; | 39 input_handler_ = NULL; |
| 40 DCHECK(client_); | 40 DCHECK(client_); |
| 41 client_->WillShutdown(); | 41 client_->WillShutdown(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void InputHandlerProxy::SetClient(InputHandlerProxyClient* client) { | 44 void InputHandlerProxy::SetClient(InputHandlerProxyClient* client) { |
| 45 DCHECK(!client_ || !client); | 45 DCHECK(!client_ || !client); |
| 46 client_ = client; | 46 client_ = client; |
| 47 } | 47 } |
| 48 | 48 |
| 49 void InputHandlerProxy::SetRootLayerScrollOffsetDelegate( |
| 50 cc::LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) { |
| 51 input_handler_->SetRootLayerScrollOffsetDelegate( |
| 52 root_layer_scroll_offset_delegate); |
| 53 } |
| 54 |
| 49 void InputHandlerProxy::HandleInputEvent(const WebInputEvent& event) { | 55 void InputHandlerProxy::HandleInputEvent(const WebInputEvent& event) { |
| 50 DCHECK(client_); | 56 DCHECK(client_); |
| 51 DCHECK(input_handler_); | 57 DCHECK(input_handler_); |
| 52 | 58 |
| 53 InputHandlerProxy::EventDisposition disposition = | 59 InputHandlerProxy::EventDisposition disposition = |
| 54 HandleInputEventInternal(event); | 60 HandleInputEventInternal(event); |
| 55 switch (disposition) { | 61 switch (disposition) { |
| 56 case DidHandle: | 62 case DidHandle: |
| 57 client_->DidHandleInputEvent(); | 63 client_->DidHandleInputEvent(); |
| 58 break; | 64 break; |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 TRACE_EVENT2("renderer", | 408 TRACE_EVENT2("renderer", |
| 403 "InputHandlerProxy::notifyCurrentFlingVelocity", | 409 "InputHandlerProxy::notifyCurrentFlingVelocity", |
| 404 "vx", | 410 "vx", |
| 405 velocity.width, | 411 velocity.width, |
| 406 "vy", | 412 "vy", |
| 407 velocity.height); | 413 velocity.height); |
| 408 input_handler_->NotifyCurrentFlingVelocity(ToClientScrollIncrement(velocity)); | 414 input_handler_->NotifyCurrentFlingVelocity(ToClientScrollIncrement(velocity)); |
| 409 } | 415 } |
| 410 | 416 |
| 411 } // namespace content | 417 } // namespace content |
| OLD | NEW |