| 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 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 return weak_ptr_factory_.GetWeakPtr(); | 933 return weak_ptr_factory_.GetWeakPtr(); |
| 934 } | 934 } |
| 935 | 935 |
| 936 bool RenderWidgetHostViewAndroid::OnTouchEvent( | 936 bool RenderWidgetHostViewAndroid::OnTouchEvent( |
| 937 const ui::MotionEvent& event) { | 937 const ui::MotionEvent& event) { |
| 938 if (!host_ || !host_->delegate()) | 938 if (!host_ || !host_->delegate()) |
| 939 return false; | 939 return false; |
| 940 | 940 |
| 941 ComputeEventLatencyOSTouchHistograms(event); | 941 ComputeEventLatencyOSTouchHistograms(event); |
| 942 | 942 |
| 943 // Receiving any other touch event before the double-tap timeout expires |
| 944 // cancels opening the spellcheck menu. |
| 945 if (ime_adapter_android_) |
| 946 ime_adapter_android_->StopSpellCheckMenuTimer(); |
| 947 |
| 943 // If a browser-based widget consumes the touch event, it's critical that | 948 // If a browser-based widget consumes the touch event, it's critical that |
| 944 // touch event interception be disabled. This avoids issues with | 949 // touch event interception be disabled. This avoids issues with |
| 945 // double-handling for embedder-detected gestures like side swipe. | 950 // double-handling for embedder-detected gestures like side swipe. |
| 946 if (touch_selection_controller_ && | 951 if (touch_selection_controller_ && |
| 947 touch_selection_controller_->WillHandleTouchEvent(event)) { | 952 touch_selection_controller_->WillHandleTouchEvent(event)) { |
| 948 RequestDisallowInterceptTouchEvent(); | 953 RequestDisallowInterceptTouchEvent(); |
| 949 return true; | 954 return true; |
| 950 } | 955 } |
| 951 | 956 |
| 952 if (stylus_text_selector_.OnTouchEvent(event)) { | 957 if (stylus_text_selector_.OnTouchEvent(event)) { |
| (...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2280 | 2285 |
| 2281 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2286 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
| 2282 if (!compositor) | 2287 if (!compositor) |
| 2283 return; | 2288 return; |
| 2284 | 2289 |
| 2285 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2290 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
| 2286 overscroll_refresh_handler, compositor, view_.GetDipScale()); | 2291 overscroll_refresh_handler, compositor, view_.GetDipScale()); |
| 2287 } | 2292 } |
| 2288 | 2293 |
| 2289 } // namespace content | 2294 } // namespace content |
| OLD | NEW |