Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 2931443003: Add support for Android spellcheck menu in Chrome/WebViews (Closed)
Patch Set: Fix dependency Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after
2265 2270
2266 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); 2271 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor();
2267 if (!compositor) 2272 if (!compositor)
2268 return; 2273 return;
2269 2274
2270 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( 2275 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>(
2271 overscroll_refresh_handler, compositor, view_.GetDipScale()); 2276 overscroll_refresh_handler, compositor, view_.GetDipScale());
2272 } 2277 }
2273 2278
2274 } // namespace content 2279 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698