OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/bind_helpers.h" | 5 #include "base/bind_helpers.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 9 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
10 #include "content/browser/frame_host/render_widget_host_view_guest.h" | 10 #include "content/browser/frame_host/render_widget_host_view_guest.h" |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 } | 526 } |
527 | 527 |
528 void RenderWidgetHostViewGuest::DispatchCancelTouchEvent( | 528 void RenderWidgetHostViewGuest::DispatchCancelTouchEvent( |
529 ui::TouchEvent* event) { | 529 ui::TouchEvent* event) { |
530 if (!host_) | 530 if (!host_) |
531 return; | 531 return; |
532 | 532 |
533 blink::WebTouchEvent cancel_event; | 533 blink::WebTouchEvent cancel_event; |
534 cancel_event.type = blink::WebInputEvent::TouchCancel; | 534 cancel_event.type = blink::WebInputEvent::TouchCancel; |
535 cancel_event.timeStampSeconds = event->time_stamp().InSecondsF(); | 535 cancel_event.timeStampSeconds = event->time_stamp().InSecondsF(); |
| 536 cancel_event.cancelable = false; |
536 host_->ForwardTouchEventWithLatencyInfo(cancel_event, *event->latency()); | 537 host_->ForwardTouchEventWithLatencyInfo(cancel_event, *event->latency()); |
537 } | 538 } |
538 | 539 |
539 bool RenderWidgetHostViewGuest::ForwardGestureEventToRenderer( | 540 bool RenderWidgetHostViewGuest::ForwardGestureEventToRenderer( |
540 ui::GestureEvent* gesture) { | 541 ui::GestureEvent* gesture) { |
541 #if defined(USE_AURA) | 542 #if defined(USE_AURA) |
542 if (!host_) | 543 if (!host_) |
543 return false; | 544 return false; |
544 | 545 |
545 if ((gesture->type() == ui::ET_GESTURE_PINCH_BEGIN || | 546 if ((gesture->type() == ui::ET_GESTURE_PINCH_BEGIN || |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 ++g_it) { | 581 ++g_it) { |
581 ForwardGestureEventToRenderer(*g_it); | 582 ForwardGestureEventToRenderer(*g_it); |
582 } | 583 } |
583 } | 584 } |
584 | 585 |
585 SkBitmap::Config RenderWidgetHostViewGuest::PreferredReadbackFormat() { | 586 SkBitmap::Config RenderWidgetHostViewGuest::PreferredReadbackFormat() { |
586 return SkBitmap::kARGB_8888_Config; | 587 return SkBitmap::kARGB_8888_Config; |
587 } | 588 } |
588 | 589 |
589 } // namespace content | 590 } // namespace content |
OLD | NEW |