Chromium Code Reviews| 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" |
| 11 #include "content/browser/renderer_host/render_view_host_impl.h" | 11 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 12 #include "content/common/browser_plugin/browser_plugin_messages.h" | 12 #include "content/common/browser_plugin/browser_plugin_messages.h" |
| 13 #include "content/common/frame_messages.h" | 13 #include "content/common/frame_messages.h" |
| 14 #include "content/common/gpu/gpu_messages.h" | 14 #include "content/common/gpu/gpu_messages.h" |
| 15 #include "content/common/host_shared_bitmap_manager.h" | 15 #include "content/common/host_shared_bitmap_manager.h" |
| 16 #include "content/common/input/web_touch_event_traits.h" | |
| 16 #include "content/common/view_messages.h" | 17 #include "content/common/view_messages.h" |
| 17 #include "content/common/webplugin_geometry.h" | 18 #include "content/common/webplugin_geometry.h" |
| 18 #include "content/public/common/content_switches.h" | 19 #include "content/public/common/content_switches.h" |
| 19 #include "skia/ext/platform_canvas.h" | 20 #include "skia/ext/platform_canvas.h" |
| 20 #include "third_party/WebKit/public/platform/WebScreenInfo.h" | 21 #include "third_party/WebKit/public/platform/WebScreenInfo.h" |
| 21 | 22 |
| 22 #if defined(OS_MACOSX) | 23 #if defined(OS_MACOSX) |
| 23 #import "content/browser/renderer_host/render_widget_host_view_mac_dictionary_he lper.h" | 24 #import "content/browser/renderer_host/render_widget_host_view_mac_dictionary_he lper.h" |
| 24 #endif | 25 #endif |
| 25 | 26 |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 524 ui::GestureEvent* event) { | 525 ui::GestureEvent* event) { |
| 525 ForwardGestureEventToRenderer(event); | 526 ForwardGestureEventToRenderer(event); |
| 526 } | 527 } |
| 527 | 528 |
| 528 void RenderWidgetHostViewGuest::DispatchCancelTouchEvent( | 529 void RenderWidgetHostViewGuest::DispatchCancelTouchEvent( |
| 529 ui::TouchEvent* event) { | 530 ui::TouchEvent* event) { |
| 530 if (!host_) | 531 if (!host_) |
| 531 return; | 532 return; |
| 532 | 533 |
| 533 blink::WebTouchEvent cancel_event; | 534 blink::WebTouchEvent cancel_event; |
| 534 cancel_event.type = blink::WebInputEvent::TouchCancel; | 535 // FIXME: This event has no touches in it. Don't we need to know what |
| 535 cancel_event.timeStampSeconds = event->time_stamp().InSecondsF(); | 536 // touches are currently active in order to cancel them all properly? |
| 537 WebTouchEventTraits::ResetType(&cancel_event, | |
| 538 blink::WebInputEvent::TouchCancel, | |
| 539 event->time_stamp().InSecondsF(), | |
| 540 WebTouchEventTraits::IGNORE_TOUCHES_STATE); | |
| 536 host_->ForwardTouchEventWithLatencyInfo(cancel_event, *event->latency()); | 541 host_->ForwardTouchEventWithLatencyInfo(cancel_event, *event->latency()); |
|
jdduke (slow)
2014/04/23 21:55:47
Hmm, yeah, at the least this should be touchesLeng
Rick Byers
2014/04/23 23:15:35
But then there's the question of what the co-ordin
jdduke (slow)
2014/04/23 23:29:49
Sounds good, yeah, I'm not super familiar with th
| |
| 537 } | 542 } |
| 538 | 543 |
| 539 bool RenderWidgetHostViewGuest::ForwardGestureEventToRenderer( | 544 bool RenderWidgetHostViewGuest::ForwardGestureEventToRenderer( |
| 540 ui::GestureEvent* gesture) { | 545 ui::GestureEvent* gesture) { |
| 541 #if defined(USE_AURA) | 546 #if defined(USE_AURA) |
| 542 if (!host_) | 547 if (!host_) |
| 543 return false; | 548 return false; |
| 544 | 549 |
| 545 if ((gesture->type() == ui::ET_GESTURE_PINCH_BEGIN || | 550 if ((gesture->type() == ui::ET_GESTURE_PINCH_BEGIN || |
| 546 gesture->type() == ui::ET_GESTURE_PINCH_UPDATE || | 551 gesture->type() == ui::ET_GESTURE_PINCH_UPDATE || |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 580 ++g_it) { | 585 ++g_it) { |
| 581 ForwardGestureEventToRenderer(*g_it); | 586 ForwardGestureEventToRenderer(*g_it); |
| 582 } | 587 } |
| 583 } | 588 } |
| 584 | 589 |
| 585 SkBitmap::Config RenderWidgetHostViewGuest::PreferredReadbackFormat() { | 590 SkBitmap::Config RenderWidgetHostViewGuest::PreferredReadbackFormat() { |
| 586 return SkBitmap::kARGB_8888_Config; | 591 return SkBitmap::kARGB_8888_Config; |
| 587 } | 592 } |
| 588 | 593 |
| 589 } // namespace content | 594 } // namespace content |
| OLD | NEW |