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

Side by Side Diff: content/browser/web_contents/web_contents_android.cc

Issue 1409443002: Make Chrome and WebView replace the selected text with the processed text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved comments around Created 5 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/web_contents/web_contents_android.h" 5 #include "content/browser/web_contents/web_contents_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 258
259 void WebContentsAndroid::Copy(JNIEnv* env, jobject obj) { 259 void WebContentsAndroid::Copy(JNIEnv* env, jobject obj) {
260 web_contents_->Copy(); 260 web_contents_->Copy();
261 } 261 }
262 262
263 void WebContentsAndroid::Paste(JNIEnv* env, jobject obj) { 263 void WebContentsAndroid::Paste(JNIEnv* env, jobject obj) {
264 web_contents_->Paste(); 264 web_contents_->Paste();
265 } 265 }
266 266
267 void WebContentsAndroid::Replace(JNIEnv* env, jobject obj, jstring jstr) {
268 web_contents_->Replace(base::android::ConvertJavaStringToUTF16(env, jstr));
269 }
270
267 void WebContentsAndroid::SelectAll(JNIEnv* env, jobject obj) { 271 void WebContentsAndroid::SelectAll(JNIEnv* env, jobject obj) {
268 web_contents_->SelectAll(); 272 web_contents_->SelectAll();
269 } 273 }
270 274
271 void WebContentsAndroid::Unselect(JNIEnv* env, jobject obj) { 275 void WebContentsAndroid::Unselect(JNIEnv* env, jobject obj) {
272 web_contents_->Unselect(); 276 web_contents_->Unselect();
273 } 277 }
274 278
275 void WebContentsAndroid::InsertCSS( 279 void WebContentsAndroid::InsertCSS(
276 JNIEnv* env, jobject jobj, jstring jcss) { 280 JNIEnv* env, jobject jobj, jstring jcss) {
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 web_contents_->StopMediaSession(); 553 web_contents_->StopMediaSession();
550 } 554 }
551 555
552 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetEncoding( 556 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetEncoding(
553 JNIEnv* env, jobject obj) const { 557 JNIEnv* env, jobject obj) const {
554 return base::android::ConvertUTF8ToJavaString(env, 558 return base::android::ConvertUTF8ToJavaString(env,
555 web_contents_->GetEncoding()); 559 web_contents_->GetEncoding());
556 } 560 }
557 561
558 } // namespace content 562 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698