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

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

Issue 2309983002: Allow selection change update before beginBatchEdit (Closed)
Patch Set: polish up a bit Created 4 years, 3 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 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1294 1294
1295 void ContentViewCoreImpl::UpdateImeAdapter(long native_ime_adapter, 1295 void ContentViewCoreImpl::UpdateImeAdapter(long native_ime_adapter,
1296 int text_input_type, 1296 int text_input_type,
1297 int text_input_flags, 1297 int text_input_flags,
1298 const std::string& text, 1298 const std::string& text,
1299 int selection_start, 1299 int selection_start,
1300 int selection_end, 1300 int selection_end,
1301 int composition_start, 1301 int composition_start,
1302 int composition_end, 1302 int composition_end,
1303 bool show_ime_if_needed, 1303 bool show_ime_if_needed,
1304 bool is_non_ime_change) { 1304 bool is_non_ime_change,
1305 bool in_batch_edit_mode) {
1305 JNIEnv* env = AttachCurrentThread(); 1306 JNIEnv* env = AttachCurrentThread();
1306 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 1307 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
1307 if (obj.is_null()) 1308 if (obj.is_null())
1308 return; 1309 return;
1309 1310
1310 ScopedJavaLocalRef<jstring> jstring_text = ConvertUTF8ToJavaString(env, text); 1311 ScopedJavaLocalRef<jstring> jstring_text = ConvertUTF8ToJavaString(env, text);
1311 Java_ContentViewCore_updateImeAdapter( 1312 Java_ContentViewCore_updateImeAdapter(
1312 env, obj, native_ime_adapter, text_input_type, text_input_flags, 1313 env, obj, native_ime_adapter, text_input_type, text_input_flags,
1313 jstring_text, selection_start, selection_end, composition_start, 1314 jstring_text, selection_start, selection_end, composition_start,
1314 composition_end, show_ime_if_needed, is_non_ime_change); 1315 composition_end, show_ime_if_needed, is_non_ime_change,
1316 in_batch_edit_mode);
1315 } 1317 }
1316 1318
1317 void ContentViewCoreImpl::SetAccessibilityEnabled( 1319 void ContentViewCoreImpl::SetAccessibilityEnabled(
1318 JNIEnv* env, 1320 JNIEnv* env,
1319 const JavaParamRef<jobject>& obj, 1321 const JavaParamRef<jobject>& obj,
1320 bool enabled) { 1322 bool enabled) {
1321 SetAccessibilityEnabledInternal(enabled); 1323 SetAccessibilityEnabledInternal(enabled);
1322 } 1324 }
1323 1325
1324 void ContentViewCoreImpl::SetTextTrackSettings( 1326 void ContentViewCoreImpl::SetTextTrackSettings(
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 return ScopedJavaLocalRef<jobject>(); 1604 return ScopedJavaLocalRef<jobject>();
1603 1605
1604 return view->GetJavaObject(); 1606 return view->GetJavaObject();
1605 } 1607 }
1606 1608
1607 bool RegisterContentViewCore(JNIEnv* env) { 1609 bool RegisterContentViewCore(JNIEnv* env) {
1608 return RegisterNativesImpl(env); 1610 return RegisterNativesImpl(env);
1609 } 1611 }
1610 1612
1611 } // namespace content 1613 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698