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

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

Issue 23801003: input: Make the OverscrollController less intrusive, and some code cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 3 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 | Annotate | Revision Log
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/immediate_input_router.h" 5 #include "content/browser/renderer_host/input/immediate_input_router.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "content/browser/renderer_host/input/gesture_event_filter.h" 9 #include "content/browser/renderer_host/input/gesture_event_filter.h"
10 #include "content/browser/renderer_host/input/input_ack_handler.h" 10 #include "content/browser/renderer_host/input/input_ack_handler.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // still events in the touch-queue. In such cases, the new events should still 280 // still events in the touch-queue. In such cases, the new events should still
281 // get into the queue. 281 // get into the queue.
282 return has_touch_handler_ || !touch_event_queue_->empty(); 282 return has_touch_handler_ || !touch_event_queue_->empty();
283 } 283 }
284 284
285 bool ImmediateInputRouter::ShouldForwardGestureEvent( 285 bool ImmediateInputRouter::ShouldForwardGestureEvent(
286 const GestureEventWithLatencyInfo& touch_event) const { 286 const GestureEventWithLatencyInfo& touch_event) const {
287 return gesture_event_filter_->ShouldForward(touch_event); 287 return gesture_event_filter_->ShouldForward(touch_event);
288 } 288 }
289 289
290 bool ImmediateInputRouter::HasQueuedGestureEvents() const {
291 return gesture_event_filter_->HasQueuedGestureEvents();
292 }
293
294 bool ImmediateInputRouter::OnMessageReceived(const IPC::Message& message) { 290 bool ImmediateInputRouter::OnMessageReceived(const IPC::Message& message) {
295 bool handled = true; 291 bool handled = true;
296 bool message_is_ok = true; 292 bool message_is_ok = true;
297 IPC_BEGIN_MESSAGE_MAP_EX(ImmediateInputRouter, message, message_is_ok) 293 IPC_BEGIN_MESSAGE_MAP_EX(ImmediateInputRouter, message, message_is_ok)
298 IPC_MESSAGE_HANDLER(InputHostMsg_HandleInputEvent_ACK, OnInputEventAck) 294 IPC_MESSAGE_HANDLER(InputHostMsg_HandleInputEvent_ACK, OnInputEventAck)
299 IPC_MESSAGE_HANDLER(ViewHostMsg_MoveCaret_ACK, OnMsgMoveCaretAck) 295 IPC_MESSAGE_HANDLER(ViewHostMsg_MoveCaret_ACK, OnMsgMoveCaretAck)
300 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectRange_ACK, OnSelectRangeAck) 296 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectRange_ACK, OnSelectRangeAck)
301 IPC_MESSAGE_HANDLER(ViewHostMsg_HasTouchEventHandlers, 297 IPC_MESSAGE_HANDLER(ViewHostMsg_HasTouchEventHandlers,
302 OnHasTouchEventHandlers) 298 OnHasTouchEventHandlers)
303 IPC_MESSAGE_UNHANDLED(handled = false) 299 IPC_MESSAGE_UNHANDLED(handled = false)
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 if (gesture_event.event.type == WebInputEvent::GestureScrollBegin) 565 if (gesture_event.event.type == WebInputEvent::GestureScrollBegin)
570 touch_event_queue_->set_no_touch_move_to_renderer(true); 566 touch_event_queue_->set_no_touch_move_to_renderer(true);
571 567
572 if (gesture_event.event.type == WebInputEvent::GestureScrollEnd || 568 if (gesture_event.event.type == WebInputEvent::GestureScrollEnd ||
573 gesture_event.event.type == WebInputEvent::GestureFlingStart) { 569 gesture_event.event.type == WebInputEvent::GestureFlingStart) {
574 touch_event_queue_->set_no_touch_move_to_renderer(false); 570 touch_event_queue_->set_no_touch_move_to_renderer(false);
575 } 571 }
576 } 572 }
577 573
578 } // namespace content 574 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/immediate_input_router.h ('k') | content/browser/renderer_host/input/input_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698