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

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

Issue 2801003004: Add "Paste as plain text" into text selection toolbar overflow (Closed)
Patch Set: add comments Created 3 years, 7 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 <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
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 // Paste as if user typed the characters, which should match current style of
278 // the caret location.
279 web_contents_->PasteAndMatchStyle();
280 }
281
275 void WebContentsAndroid::Replace(JNIEnv* env, 282 void WebContentsAndroid::Replace(JNIEnv* env,
276 const JavaParamRef<jobject>& obj, 283 const JavaParamRef<jobject>& obj,
277 const JavaParamRef<jstring>& jstr) { 284 const JavaParamRef<jstring>& jstr) {
278 web_contents_->Replace(base::android::ConvertJavaStringToUTF16(env, jstr)); 285 web_contents_->Replace(base::android::ConvertJavaStringToUTF16(env, jstr));
279 } 286 }
280 287
281 void WebContentsAndroid::SelectAll(JNIEnv* env, 288 void WebContentsAndroid::SelectAll(JNIEnv* env,
282 const JavaParamRef<jobject>& obj) { 289 const JavaParamRef<jobject>& obj) {
283 web_contents_->SelectAll(); 290 web_contents_->SelectAll();
284 } 291 }
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 env, obj, callback, id, http_status_code, jurl, jbitmaps, jsizes); 720 env, obj, callback, id, http_status_code, jurl, jbitmaps, jsizes);
714 } 721 }
715 722
716 void WebContentsAndroid::SetMediaSession( 723 void WebContentsAndroid::SetMediaSession(
717 const ScopedJavaLocalRef<jobject>& j_media_session) { 724 const ScopedJavaLocalRef<jobject>& j_media_session) {
718 JNIEnv* env = base::android::AttachCurrentThread(); 725 JNIEnv* env = base::android::AttachCurrentThread();
719 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session); 726 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session);
720 } 727 }
721 728
722 } // namespace content 729 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_android.h ('k') | content/public/android/java/res/menu/select_action_menu.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698