| 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 <stdint.h> | 7 #include <stdint.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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 } | 265 } |
| 266 | 266 |
| 267 void WebContentsAndroid::Copy(JNIEnv* env, const JavaParamRef<jobject>& obj) { | 267 void WebContentsAndroid::Copy(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
| 268 web_contents_->Copy(); | 268 web_contents_->Copy(); |
| 269 } | 269 } |
| 270 | 270 |
| 271 void WebContentsAndroid::Paste(JNIEnv* env, const JavaParamRef<jobject>& obj) { | 271 void WebContentsAndroid::Paste(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
| 272 web_contents_->Paste(); | 272 web_contents_->Paste(); |
| 273 } | 273 } |
| 274 | 274 |
| 275 void WebContentsAndroid::PasteAsPlainText(JNIEnv* env, |
| 276 const JavaParamRef<jobject>& obj) { |
| 277 web_contents_->PasteAndMatchStyle(); |
| 278 } |
| 279 |
| 275 void WebContentsAndroid::Replace(JNIEnv* env, | 280 void WebContentsAndroid::Replace(JNIEnv* env, |
| 276 const JavaParamRef<jobject>& obj, | 281 const JavaParamRef<jobject>& obj, |
| 277 const JavaParamRef<jstring>& jstr) { | 282 const JavaParamRef<jstring>& jstr) { |
| 278 web_contents_->Replace(base::android::ConvertJavaStringToUTF16(env, jstr)); | 283 web_contents_->Replace(base::android::ConvertJavaStringToUTF16(env, jstr)); |
| 279 } | 284 } |
| 280 | 285 |
| 281 void WebContentsAndroid::SelectAll(JNIEnv* env, | 286 void WebContentsAndroid::SelectAll(JNIEnv* env, |
| 282 const JavaParamRef<jobject>& obj) { | 287 const JavaParamRef<jobject>& obj) { |
| 283 web_contents_->SelectAll(); | 288 web_contents_->SelectAll(); |
| 284 } | 289 } |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 env, obj, callback, id, http_status_code, jurl, jbitmaps, jsizes); | 718 env, obj, callback, id, http_status_code, jurl, jbitmaps, jsizes); |
| 714 } | 719 } |
| 715 | 720 |
| 716 void WebContentsAndroid::SetMediaSession( | 721 void WebContentsAndroid::SetMediaSession( |
| 717 const ScopedJavaLocalRef<jobject>& j_media_session) { | 722 const ScopedJavaLocalRef<jobject>& j_media_session) { |
| 718 JNIEnv* env = base::android::AttachCurrentThread(); | 723 JNIEnv* env = base::android::AttachCurrentThread(); |
| 719 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session); | 724 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session); |
| 720 } | 725 } |
| 721 | 726 |
| 722 } // namespace content | 727 } // namespace content |
| OLD | NEW |