| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/render_widget_host_view_android.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
| 6 | 6 |
| 7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1725 | 1725 |
| 1726 RenderWidgetHostImpl* target_host = host_; | 1726 RenderWidgetHostImpl* target_host = host_; |
| 1727 | 1727 |
| 1728 // If there are multiple widgets on the page (such as when there are | 1728 // If there are multiple widgets on the page (such as when there are |
| 1729 // out-of-process iframes), pick the one that should process this event. | 1729 // out-of-process iframes), pick the one that should process this event. |
| 1730 if (host_->delegate()) | 1730 if (host_->delegate()) |
| 1731 target_host = host_->delegate()->GetFocusedRenderWidgetHost(host_); | 1731 target_host = host_->delegate()->GetFocusedRenderWidgetHost(host_); |
| 1732 if (!target_host) | 1732 if (!target_host) |
| 1733 return; | 1733 return; |
| 1734 | 1734 |
| 1735 target_host->ForwardKeyboardEvent(event); | 1735 ui::LatencyInfo latency_info(ui::SourceEventType::KEY_PRESS); |
| 1736 latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); |
| 1737 target_host->ForwardKeyboardEventWithLatencyInfo(event, latency_info); |
| 1736 } | 1738 } |
| 1737 | 1739 |
| 1738 void RenderWidgetHostViewAndroid::SendMouseEvent( | 1740 void RenderWidgetHostViewAndroid::SendMouseEvent( |
| 1739 const ui::MotionEventAndroid& motion_event, | 1741 const ui::MotionEventAndroid& motion_event, |
| 1740 int action_button) { | 1742 int action_button) { |
| 1741 blink::WebInputEvent::Type webMouseEventType = | 1743 blink::WebInputEvent::Type webMouseEventType = |
| 1742 ui::ToWebMouseEventType(motion_event.GetAction()); | 1744 ui::ToWebMouseEventType(motion_event.GetAction()); |
| 1743 | 1745 |
| 1744 blink::WebMouseEvent mouse_event = WebMouseEventBuilder::Build( | 1746 blink::WebMouseEvent mouse_event = WebMouseEventBuilder::Build( |
| 1745 webMouseEventType, | 1747 webMouseEventType, |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2191 | 2193 |
| 2192 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2194 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
| 2193 if (!compositor) | 2195 if (!compositor) |
| 2194 return; | 2196 return; |
| 2195 | 2197 |
| 2196 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2198 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
| 2197 overscroll_refresh_handler, compositor, view_.GetDipScale()); | 2199 overscroll_refresh_handler, compositor, view_.GetDipScale()); |
| 2198 } | 2200 } |
| 2199 | 2201 |
| 2200 } // namespace content | 2202 } // namespace content |
| OLD | NEW |