| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/input/input_router_impl.h" | 5 #include "content/browser/renderer_host/input/input_router_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/auto_reset.h" | 11 #include "base/auto_reset.h" |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
| 15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
| 16 #include "content/browser/renderer_host/input/gesture_event_queue.h" | 16 #include "content/browser/renderer_host/input/gesture_event_queue.h" |
| 17 #include "content/browser/renderer_host/input/input_ack_handler.h" | 17 #include "content/browser/renderer_host/input/input_ack_handler.h" |
| 18 #include "content/browser/renderer_host/input/input_router_client.h" | 18 #include "content/browser/renderer_host/input/input_router_client.h" |
| 19 #include "content/browser/renderer_host/input/touch_event_queue.h" | 19 #include "content/browser/renderer_host/input/touch_event_queue.h" |
| 20 #include "content/browser/renderer_host/input/touchpad_tap_suppression_controlle
r.h" | 20 #include "content/browser/renderer_host/input/touchpad_tap_suppression_controlle
r.h" |
| 21 #include "content/common/content_constants_internal.h" | 21 #include "content/common/content_constants_internal.h" |
| 22 #include "content/common/edit_command.h" | 22 #include "content/common/edit_command.h" |
| 23 #include "content/common/input/input_event_ack_state.h" | 23 #include "content/common/input/input_event_ack_state.h" |
| 24 #include "content/common/input/touch_action.h" | 24 #include "content/common/input/touch_action.h" |
| 25 #include "content/common/input/web_input_event_traits.h" | |
| 26 #include "content/common/input/web_touch_event_traits.h" | 25 #include "content/common/input/web_touch_event_traits.h" |
| 27 #include "content/common/input_messages.h" | 26 #include "content/common/input_messages.h" |
| 28 #include "content/common/view_messages.h" | 27 #include "content/common/view_messages.h" |
| 29 #include "content/public/browser/notification_service.h" | 28 #include "content/public/browser/notification_service.h" |
| 30 #include "content/public/browser/notification_types.h" | 29 #include "content/public/browser/notification_types.h" |
| 31 #include "content/public/browser/user_metrics.h" | 30 #include "content/public/browser/user_metrics.h" |
| 32 #include "content/public/common/content_switches.h" | 31 #include "content/public/common/content_switches.h" |
| 33 #include "ipc/ipc_sender.h" | 32 #include "ipc/ipc_sender.h" |
| 34 #include "ui/events/blink/blink_event_util.h" | 33 #include "ui/events/blink/blink_event_util.h" |
| 34 #include "ui/events/blink/web_input_event_traits.h" |
| 35 #include "ui/events/event.h" | 35 #include "ui/events/event.h" |
| 36 #include "ui/events/keycodes/keyboard_codes.h" | 36 #include "ui/events/keycodes/keyboard_codes.h" |
| 37 | 37 |
| 38 using base::Time; | 38 using base::Time; |
| 39 using base::TimeDelta; | 39 using base::TimeDelta; |
| 40 using base::TimeTicks; | 40 using base::TimeTicks; |
| 41 using blink::WebGestureEvent; | 41 using blink::WebGestureEvent; |
| 42 using blink::WebInputEvent; | 42 using blink::WebInputEvent; |
| 43 using blink::WebKeyboardEvent; | 43 using blink::WebKeyboardEvent; |
| 44 using blink::WebMouseEvent; | 44 using blink::WebMouseEvent; |
| 45 using blink::WebMouseWheelEvent; | 45 using blink::WebMouseWheelEvent; |
| 46 using blink::WebTouchEvent; | 46 using blink::WebTouchEvent; |
| 47 using ui::WebInputEventTraits; |
| 47 | 48 |
| 48 namespace content { | 49 namespace content { |
| 49 namespace { | 50 namespace { |
| 50 | 51 |
| 51 const char* GetEventAckName(InputEventAckState ack_result) { | 52 const char* GetEventAckName(InputEventAckState ack_result) { |
| 52 switch(ack_result) { | 53 switch(ack_result) { |
| 53 case INPUT_EVENT_ACK_STATE_UNKNOWN: return "UNKNOWN"; | 54 case INPUT_EVENT_ACK_STATE_UNKNOWN: return "UNKNOWN"; |
| 54 case INPUT_EVENT_ACK_STATE_CONSUMED: return "CONSUMED"; | 55 case INPUT_EVENT_ACK_STATE_CONSUMED: return "CONSUMED"; |
| 55 case INPUT_EVENT_ACK_STATE_NOT_CONSUMED: return "NOT_CONSUMED"; | 56 case INPUT_EVENT_ACK_STATE_NOT_CONSUMED: return "NOT_CONSUMED"; |
| 56 case INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS: return "NO_CONSUMER_EXISTS"; | 57 case INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS: return "NO_CONSUMER_EXISTS"; |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 | 633 |
| 633 flush_requested_ = false; | 634 flush_requested_ = false; |
| 634 client_->DidFlush(); | 635 client_->DidFlush(); |
| 635 } | 636 } |
| 636 | 637 |
| 637 void InputRouterImpl::SetFrameTreeNodeId(int frameTreeNodeId) { | 638 void InputRouterImpl::SetFrameTreeNodeId(int frameTreeNodeId) { |
| 638 frame_tree_node_id_ = frameTreeNodeId; | 639 frame_tree_node_id_ = frameTreeNodeId; |
| 639 } | 640 } |
| 640 | 641 |
| 641 } // namespace content | 642 } // namespace content |
| OLD | NEW |