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

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

Issue 2703643004: [TTS] Add an ACK message to SelectWordAroundCaret. (Closed)
Patch Set: Changed to send the message on all platforms, not just Android. Created 3 years, 10 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 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 void ContentViewCoreImpl::OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip) { 1489 void ContentViewCoreImpl::OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip) {
1490 JNIEnv* env = AttachCurrentThread(); 1490 JNIEnv* env = AttachCurrentThread();
1491 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 1491 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
1492 if (obj.is_null()) 1492 if (obj.is_null())
1493 return; 1493 return;
1494 Java_ContentViewCore_onShowUnhandledTapUIIfNeeded( 1494 Java_ContentViewCore_onShowUnhandledTapUIIfNeeded(
1495 env, obj, static_cast<jint>(x_dip * dpi_scale()), 1495 env, obj, static_cast<jint>(x_dip * dpi_scale()),
1496 static_cast<jint>(y_dip * dpi_scale())); 1496 static_cast<jint>(y_dip * dpi_scale()));
1497 } 1497 }
1498 1498
1499 void ContentViewCoreImpl::OnSelectWordAroundCaretAck(bool did_select,
1500 int start_adjust,
1501 int end_adjust) {
1502 JNIEnv* env = AttachCurrentThread();
1503 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
1504 if (obj.is_null())
1505 return;
1506 Java_ContentViewCore_onSelectWordAroundCaretAck(env, obj, did_select,
1507 start_adjust, end_adjust);
1508 }
1509
1499 void ContentViewCoreImpl::HidePopupsAndPreserveSelection() { 1510 void ContentViewCoreImpl::HidePopupsAndPreserveSelection() {
1500 JNIEnv* env = AttachCurrentThread(); 1511 JNIEnv* env = AttachCurrentThread();
1501 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 1512 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
1502 if (obj.is_null()) 1513 if (obj.is_null())
1503 return; 1514 return;
1504 1515
1505 Java_ContentViewCore_hidePopupsAndPreserveSelection(env, obj); 1516 Java_ContentViewCore_hidePopupsAndPreserveSelection(env, obj);
1506 } 1517 }
1507 1518
1508 void ContentViewCoreImpl::WebContentsDestroyed() { 1519 void ContentViewCoreImpl::WebContentsDestroyed() {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 return ScopedJavaLocalRef<jobject>(); 1562 return ScopedJavaLocalRef<jobject>();
1552 1563
1553 return view->GetJavaObject(); 1564 return view->GetJavaObject();
1554 } 1565 }
1555 1566
1556 bool RegisterContentViewCore(JNIEnv* env) { 1567 bool RegisterContentViewCore(JNIEnv* env) {
1557 return RegisterNativesImpl(env); 1568 return RegisterNativesImpl(env);
1558 } 1569 }
1559 1570
1560 } // namespace content 1571 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/renderer_host/render_widget_host_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698