Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(588)

Side by Side Diff: content/browser/renderer_host/input/input_router_impl.cc

Issue 1685823002: Cleanup checking for wheel gesture flags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/common/input/input_event_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
14 #include "content/browser/renderer_host/input/gesture_event_queue.h" 14 #include "content/browser/renderer_host/input/gesture_event_queue.h"
15 #include "content/browser/renderer_host/input/input_ack_handler.h" 15 #include "content/browser/renderer_host/input/input_ack_handler.h"
16 #include "content/browser/renderer_host/input/input_router_client.h" 16 #include "content/browser/renderer_host/input/input_router_client.h"
17 #include "content/browser/renderer_host/input/touch_event_queue.h" 17 #include "content/browser/renderer_host/input/touch_event_queue.h"
18 #include "content/browser/renderer_host/input/touchpad_tap_suppression_controlle r.h" 18 #include "content/browser/renderer_host/input/touchpad_tap_suppression_controlle r.h"
19 #include "content/common/content_constants_internal.h" 19 #include "content/common/content_constants_internal.h"
20 #include "content/common/edit_command.h" 20 #include "content/common/edit_command.h"
21 #include "content/common/input/input_event_ack_state.h" 21 #include "content/common/input/input_event_ack_state.h"
22 #include "content/common/input/input_event_utils.h"
22 #include "content/common/input/touch_action.h" 23 #include "content/common/input/touch_action.h"
23 #include "content/common/input/web_touch_event_traits.h" 24 #include "content/common/input/web_touch_event_traits.h"
24 #include "content/common/input_messages.h" 25 #include "content/common/input_messages.h"
25 #include "content/common/view_messages.h" 26 #include "content/common/view_messages.h"
26 #include "content/public/browser/notification_service.h" 27 #include "content/public/browser/notification_service.h"
27 #include "content/public/browser/notification_types.h" 28 #include "content/public/browser/notification_types.h"
28 #include "content/public/browser/user_metrics.h" 29 #include "content/public/browser/user_metrics.h"
29 #include "content/public/common/content_switches.h" 30 #include "content/public/common/content_switches.h"
30 #include "ipc/ipc_sender.h" 31 #include "ipc/ipc_sender.h"
31 #include "ui/events/blink/blink_event_util.h" 32 #include "ui/events/blink/blink_event_util.h"
(...skipping 18 matching lines...) Expand all
50 case INPUT_EVENT_ACK_STATE_UNKNOWN: return "UNKNOWN"; 51 case INPUT_EVENT_ACK_STATE_UNKNOWN: return "UNKNOWN";
51 case INPUT_EVENT_ACK_STATE_CONSUMED: return "CONSUMED"; 52 case INPUT_EVENT_ACK_STATE_CONSUMED: return "CONSUMED";
52 case INPUT_EVENT_ACK_STATE_NOT_CONSUMED: return "NOT_CONSUMED"; 53 case INPUT_EVENT_ACK_STATE_NOT_CONSUMED: return "NOT_CONSUMED";
53 case INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS: return "NO_CONSUMER_EXISTS"; 54 case INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS: return "NO_CONSUMER_EXISTS";
54 case INPUT_EVENT_ACK_STATE_IGNORED: return "IGNORED"; 55 case INPUT_EVENT_ACK_STATE_IGNORED: return "IGNORED";
55 } 56 }
56 DLOG(WARNING) << "Unhandled InputEventAckState in GetEventAckName."; 57 DLOG(WARNING) << "Unhandled InputEventAckState in GetEventAckName.";
57 return ""; 58 return "";
58 } 59 }
59 60
60 bool UseGestureBasedWheelScrolling() {
61 return base::CommandLine::ForCurrentProcess()->HasSwitch(
62 switches::kEnableWheelGestures);
63 }
64
65 } // namespace 61 } // namespace
66 62
67 InputRouterImpl::Config::Config() { 63 InputRouterImpl::Config::Config() {
68 } 64 }
69 65
70 InputRouterImpl::InputRouterImpl(IPC::Sender* sender, 66 InputRouterImpl::InputRouterImpl(IPC::Sender* sender,
71 InputRouterClient* client, 67 InputRouterClient* client,
72 InputAckHandler* ack_handler, 68 InputAckHandler* ack_handler,
73 int routing_id, 69 int routing_id,
74 const Config& config) 70 const Config& config)
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 return; 615 return;
620 616
621 if (HasPendingEvents()) 617 if (HasPendingEvents())
622 return; 618 return;
623 619
624 flush_requested_ = false; 620 flush_requested_ = false;
625 client_->DidFlush(); 621 client_->DidFlush();
626 } 622 }
627 623
628 } // namespace content 624 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/input/input_event_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698