| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |