Chromium Code Reviews| 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/common/input/web_input_event_traits.h" | 5 #include "content/common/input/web_input_event_traits.h" |
| 6 | 6 |
| 7 #include <bitset> | 7 #include <bitset> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 | 10 |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 332 case WebInputEvent::MouseEnter: | 332 case WebInputEvent::MouseEnter: |
| 333 case WebInputEvent::MouseLeave: | 333 case WebInputEvent::MouseLeave: |
| 334 case WebInputEvent::ContextMenu: | 334 case WebInputEvent::ContextMenu: |
| 335 return true; | 335 return true; |
| 336 default: | 336 default: |
| 337 break; | 337 break; |
| 338 } | 338 } |
| 339 return false; | 339 return false; |
| 340 } | 340 } |
| 341 | 341 |
| 342 bool WebInputEventTraits::IsNewTouchSequence(const WebTouchEvent& event) { | |
| 343 if (event.type != WebInputEvent::TouchStart) | |
| 344 return false; | |
| 345 if (!event.touchesLength) | |
|
Rick Byers
2014/02/18 22:01:15
This case should never happen, right? Maybe DHCEC
tdresser
2014/02/20 18:37:56
Done.
| |
| 346 return false; | |
| 347 for (size_t i = 0; i < event.touchesLength; i++) { | |
| 348 if (event.touches[i].state != blink::WebTouchPoint::StatePressed) | |
| 349 return false; | |
| 350 } | |
| 351 return true; | |
| 352 } | |
| 353 | |
| 342 } // namespace content | 354 } // namespace content |
| OLD | NEW |