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 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1682 | 1682 |
1683 RenderWidgetHostImpl* target_host = host_; | 1683 RenderWidgetHostImpl* target_host = host_; |
1684 | 1684 |
1685 // If there are multiple widgets on the page (such as when there are | 1685 // If there are multiple widgets on the page (such as when there are |
1686 // out-of-process iframes), pick the one that should process this event. | 1686 // out-of-process iframes), pick the one that should process this event. |
1687 if (host_->delegate()) | 1687 if (host_->delegate()) |
1688 target_host = host_->delegate()->GetFocusedRenderWidgetHost(host_); | 1688 target_host = host_->delegate()->GetFocusedRenderWidgetHost(host_); |
1689 if (!target_host) | 1689 if (!target_host) |
1690 return; | 1690 return; |
1691 | 1691 |
1692 target_host->ForwardKeyboardEvent(event); | 1692 ui::LatencyInfo latency_info(ui::SourceEventType::KEY); |
| 1693 latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0); |
| 1694 target_host->ForwardKeyboardEventWithLatencyInfo(event, latency_info); |
1693 } | 1695 } |
1694 | 1696 |
1695 void RenderWidgetHostViewAndroid::SendMouseEvent( | 1697 void RenderWidgetHostViewAndroid::SendMouseEvent( |
1696 const ui::MotionEventAndroid& motion_event, | 1698 const ui::MotionEventAndroid& motion_event, |
1697 int action_button) { | 1699 int action_button) { |
1698 blink::WebInputEvent::Type webMouseEventType = | 1700 blink::WebInputEvent::Type webMouseEventType = |
1699 ui::ToWebMouseEventType(motion_event.GetAction()); | 1701 ui::ToWebMouseEventType(motion_event.GetAction()); |
1700 | 1702 |
1701 blink::WebMouseEvent mouse_event = WebMouseEventBuilder::Build( | 1703 blink::WebMouseEvent mouse_event = WebMouseEventBuilder::Build( |
1702 webMouseEventType, | 1704 webMouseEventType, |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2124 | 2126 |
2125 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2127 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
2126 if (!compositor) | 2128 if (!compositor) |
2127 return; | 2129 return; |
2128 | 2130 |
2129 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2131 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
2130 overscroll_refresh_handler, compositor, view_.GetDipScale()); | 2132 overscroll_refresh_handler, compositor, view_.GetDipScale()); |
2131 } | 2133 } |
2132 | 2134 |
2133 } // namespace content | 2135 } // namespace content |
OLD | NEW |