| 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 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1737 | 1737 | 
| 1738 void RenderWidgetHostViewAndroid::SendMouseEvent( | 1738 void RenderWidgetHostViewAndroid::SendMouseEvent( | 
| 1739     const ui::MotionEventAndroid& motion_event, | 1739     const ui::MotionEventAndroid& motion_event, | 
| 1740     int action_button) { | 1740     int action_button) { | 
| 1741   blink::WebInputEvent::Type webMouseEventType = | 1741   blink::WebInputEvent::Type webMouseEventType = | 
| 1742       ui::ToWebMouseEventType(motion_event.GetAction()); | 1742       ui::ToWebMouseEventType(motion_event.GetAction()); | 
| 1743 | 1743 | 
| 1744   blink::WebMouseEvent mouse_event = WebMouseEventBuilder::Build( | 1744   blink::WebMouseEvent mouse_event = WebMouseEventBuilder::Build( | 
| 1745       webMouseEventType, | 1745       webMouseEventType, | 
| 1746       ui::EventTimeStampToSeconds(motion_event.GetEventTime()), | 1746       ui::EventTimeStampToSeconds(motion_event.GetEventTime()), | 
| 1747       motion_event.GetX(0), | 1747       motion_event.GetX(0), motion_event.GetY(0), motion_event.GetFlags(), | 
| 1748       motion_event.GetY(0), |  | 
| 1749       motion_event.GetFlags(), |  | 
| 1750       motion_event.GetButtonState() ? 1 : 0 /* click count */, | 1748       motion_event.GetButtonState() ? 1 : 0 /* click count */, | 
| 1751       motion_event.GetPointerId(0), | 1749       motion_event.GetPointerId(0), motion_event.GetPressure(0), | 
| 1752       motion_event.GetPressure(0), | 1750       motion_event.GetOrientation(0), motion_event.GetTiltX(0), | 
| 1753       motion_event.GetOrientation(0), | 1751       motion_event.GetTiltY(0), action_button, motion_event.GetToolType(0)); | 
| 1754       motion_event.GetTilt(0), |  | 
| 1755       action_button, |  | 
| 1756       motion_event.GetToolType(0)); |  | 
| 1757 | 1752 | 
| 1758   if (!host_ || !host_->delegate()) | 1753   if (!host_ || !host_->delegate()) | 
| 1759     return; | 1754     return; | 
| 1760 | 1755 | 
| 1761   if (SiteIsolationPolicy::AreCrossProcessFramesPossible() && | 1756   if (SiteIsolationPolicy::AreCrossProcessFramesPossible() && | 
| 1762       host_->delegate()->GetInputEventRouter()) { | 1757       host_->delegate()->GetInputEventRouter()) { | 
| 1763     host_->delegate()->GetInputEventRouter()->RouteMouseEvent( | 1758     host_->delegate()->GetInputEventRouter()->RouteMouseEvent( | 
| 1764         this, &mouse_event, ui::LatencyInfo()); | 1759         this, &mouse_event, ui::LatencyInfo()); | 
| 1765   } else { | 1760   } else { | 
| 1766     host_->ForwardMouseEvent(mouse_event); | 1761     host_->ForwardMouseEvent(mouse_event); | 
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2195 | 2190 | 
| 2196   ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2191   ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 
| 2197   if (!compositor) | 2192   if (!compositor) | 
| 2198     return; | 2193     return; | 
| 2199 | 2194 | 
| 2200   overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2195   overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 
| 2201       overscroll_refresh_handler, compositor, view_.GetDipScale()); | 2196       overscroll_refresh_handler, compositor, view_.GetDipScale()); | 
| 2202 } | 2197 } | 
| 2203 | 2198 | 
| 2204 }  // namespace content | 2199 }  // namespace content | 
| OLD | NEW | 
|---|