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