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

Side by Side Diff: content/browser/android/content_view_core_impl.cc

Issue 1986783002: Text selected with double-tap should not cause vibration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added description of return value of showContextMenu Created 4 years, 7 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/android/content_view_core_impl.h" 5 #include "content/browser/android/content_view_core_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 Java_ContentViewCore_onPinchEndEventAck(env, j_obj.obj()); 591 Java_ContentViewCore_onPinchEndEventAck(env, j_obj.obj());
592 break; 592 break;
593 case WebInputEvent::GestureTap: 593 case WebInputEvent::GestureTap:
594 Java_ContentViewCore_onSingleTapEventAck( 594 Java_ContentViewCore_onSingleTapEventAck(
595 env, 595 env,
596 j_obj.obj(), 596 j_obj.obj(),
597 ack_result == INPUT_EVENT_ACK_STATE_CONSUMED, 597 ack_result == INPUT_EVENT_ACK_STATE_CONSUMED,
598 event.x * dpi_scale(), 598 event.x * dpi_scale(),
599 event.y * dpi_scale()); 599 event.y * dpi_scale());
600 break; 600 break;
601 case WebInputEvent::GestureLongPress:
602 if (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED)
603 Java_ContentViewCore_performLongPressHapticFeedback(env, j_obj.obj());
604 break;
601 default: 605 default:
602 break; 606 break;
603 } 607 }
604 } 608 }
605 609
606 bool ContentViewCoreImpl::FilterInputEvent(const blink::WebInputEvent& event) { 610 bool ContentViewCoreImpl::FilterInputEvent(const blink::WebInputEvent& event) {
607 if (event.type != WebInputEvent::GestureTap && 611 if (event.type != WebInputEvent::GestureTap &&
608 event.type != WebInputEvent::GestureDoubleTap && 612 event.type != WebInputEvent::GestureDoubleTap &&
609 event.type != WebInputEvent::GestureLongTap && 613 event.type != WebInputEvent::GestureLongTap &&
610 event.type != WebInputEvent::GestureLongPress) 614 event.type != WebInputEvent::GestureLongPress)
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 return ScopedJavaLocalRef<jobject>(); 1573 return ScopedJavaLocalRef<jobject>();
1570 1574
1571 return view->GetJavaObject(); 1575 return view->GetJavaObject();
1572 } 1576 }
1573 1577
1574 bool RegisterContentViewCore(JNIEnv* env) { 1578 bool RegisterContentViewCore(JNIEnv* env) {
1575 return RegisterNativesImpl(env); 1579 return RegisterNativesImpl(env);
1576 } 1580 }
1577 1581
1578 } // namespace content 1582 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698