| 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 "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 SendMoveCaret(next_move_caret_.Pass()); | 491 SendMoveCaret(next_move_caret_.Pass()); |
| 492 } | 492 } |
| 493 | 493 |
| 494 void InputRouterImpl::OnSelectRangeAck() { | 494 void InputRouterImpl::OnSelectRangeAck() { |
| 495 select_range_pending_ = false; | 495 select_range_pending_ = false; |
| 496 if (next_selection_range_) | 496 if (next_selection_range_) |
| 497 SendSelectRange(next_selection_range_.Pass()); | 497 SendSelectRange(next_selection_range_.Pass()); |
| 498 } | 498 } |
| 499 | 499 |
| 500 void InputRouterImpl::OnHasTouchEventHandlers(bool has_handlers) { | 500 void InputRouterImpl::OnHasTouchEventHandlers(bool has_handlers) { |
| 501 if (has_handlers == touch_event_queue_->has_handlers()) | |
| 502 return; | |
| 503 touch_event_queue_->OnHasTouchEventHandlers(has_handlers); | 501 touch_event_queue_->OnHasTouchEventHandlers(has_handlers); |
| 504 client_->OnHasTouchEventHandlers(has_handlers); | 502 client_->OnHasTouchEventHandlers(has_handlers); |
| 505 } | 503 } |
| 506 | 504 |
| 507 void InputRouterImpl::OnSetTouchAction( | 505 void InputRouterImpl::OnSetTouchAction( |
| 508 content::TouchAction touch_action) { | 506 content::TouchAction touch_action) { |
| 509 // Synthetic touchstart events should get filtered out in RenderWidget. | 507 // Synthetic touchstart events should get filtered out in RenderWidget. |
| 510 DCHECK(touch_event_queue_->IsPendingAckTouchStart()); | 508 DCHECK(touch_event_queue_->IsPendingAckTouchStart()); |
| 511 | 509 |
| 512 touch_action_filter_.OnSetTouchAction(touch_action); | 510 touch_action_filter_.OnSetTouchAction(touch_action); |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 break; | 716 break; |
| 719 } | 717 } |
| 720 } | 718 } |
| 721 | 719 |
| 722 bool InputRouterImpl::IsInOverscrollGesture() const { | 720 bool InputRouterImpl::IsInOverscrollGesture() const { |
| 723 OverscrollController* controller = client_->GetOverscrollController(); | 721 OverscrollController* controller = client_->GetOverscrollController(); |
| 724 return controller && controller->overscroll_mode() != OVERSCROLL_NONE; | 722 return controller && controller->overscroll_mode() != OVERSCROLL_NONE; |
| 725 } | 723 } |
| 726 | 724 |
| 727 } // namespace content | 725 } // namespace content |
| OLD | NEW |