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

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

Issue 2801003004: Add "Paste as plain text" into text selection toolbar overflow (Closed)
Patch Set: check more styles Created 3 years, 8 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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 return false; 623 return false;
624 624
625 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); 625 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid();
626 if (!view) 626 if (!view)
627 return false; 627 return false;
628 628
629 JNIEnv* env = AttachCurrentThread(); 629 JNIEnv* env = AttachCurrentThread();
630 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 630 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
631 if (obj.is_null()) 631 if (obj.is_null())
632 return false; 632 return false;
633 Java_ContentViewCore_setCanEditRichly(
amaralp 2017/04/13 20:40:17 You can pass an extra boolean to ContentViewCore.s
Shimi Zhang 2017/04/15 01:17:15 Done.
634 env, obj,
635 (params.edit_flags & blink::WebContextMenuData::kCanEditRichly) > 0);
633 Java_ContentViewCore_showPastePopup(env, obj, params.selection_start.x(), 636 Java_ContentViewCore_showPastePopup(env, obj, params.selection_start.x(),
634 params.selection_start.y()); 637 params.selection_start.y());
635 return true; 638 return true;
636 } 639 }
637 640
638 void ContentViewCoreImpl::ShowDisambiguationPopup( 641 void ContentViewCoreImpl::ShowDisambiguationPopup(
639 const gfx::Rect& rect_pixels, 642 const gfx::Rect& rect_pixels,
640 const SkBitmap& zoomed_bitmap) { 643 const SkBitmap& zoomed_bitmap) {
641 JNIEnv* env = AttachCurrentThread(); 644 JNIEnv* env = AttachCurrentThread();
642 645
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1346 return ScopedJavaLocalRef<jobject>(); 1349 return ScopedJavaLocalRef<jobject>();
1347 1350
1348 return view->GetJavaObject(); 1351 return view->GetJavaObject();
1349 } 1352 }
1350 1353
1351 bool RegisterContentViewCore(JNIEnv* env) { 1354 bool RegisterContentViewCore(JNIEnv* env) {
1352 return RegisterNativesImpl(env); 1355 return RegisterNativesImpl(env);
1353 } 1356 }
1354 1357
1355 } // namespace content 1358 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698