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/browser/renderer_host/input/web_input_event_util.h" | 5 #include "content/browser/renderer_host/input/web_input_event_util.h" |
| 6 | 6 |
| 7 #include "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
| 8 #include "ui/events/gesture_detection/gesture_event_data.h" | 8 #include "ui/events/gesture_detection/gesture_event_data.h" |
| 9 #include "ui/events/gesture_detection/motion_event.h" | 9 #include "ui/events/gesture_detection/motion_event.h" |
| 10 | 10 |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 case ui::ET_GESTURE_TAP_CANCEL: | 324 case ui::ET_GESTURE_TAP_CANCEL: |
| 325 gesture.type = WebInputEvent::GestureTapCancel; | 325 gesture.type = WebInputEvent::GestureTapCancel; |
| 326 break; | 326 break; |
| 327 case ui::ET_GESTURE_TAP_DOWN: | 327 case ui::ET_GESTURE_TAP_DOWN: |
| 328 gesture.type = WebInputEvent::GestureTapDown; | 328 gesture.type = WebInputEvent::GestureTapDown; |
| 329 gesture.data.tapDown.width = | 329 gesture.data.tapDown.width = |
| 330 data.details.bounding_box_f().width() * scale; | 330 data.details.bounding_box_f().width() * scale; |
| 331 gesture.data.tapDown.height = | 331 gesture.data.tapDown.height = |
| 332 data.details.bounding_box_f().height() * scale; | 332 data.details.bounding_box_f().height() * scale; |
| 333 break; | 333 break; |
| 334 case ui::ET_GESTURE_BEGIN: | |
|
jdduke (slow)
2014/04/03 20:17:16
I'd really prefer this be NOTREACHED(), unless th
tdresser
2014/04/03 21:14:41
Done.
| |
| 335 case ui::ET_GESTURE_END: | |
| 336 gesture.type = WebInputEvent::Undefined; | |
| 337 break; | |
| 334 default: | 338 default: |
| 335 NOTREACHED() << "ui::EventType provided wasn't a valid gesture event."; | 339 NOTREACHED() << "ui::EventType provided wasn't a valid gesture event."; |
| 336 break; | 340 break; |
| 337 } | 341 } |
| 338 | 342 |
| 339 return gesture; | 343 return gesture; |
| 340 } | 344 } |
| 341 | 345 |
| 342 } // namespace content | 346 } // namespace content |
| OLD | NEW |