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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 2722273002: Add Select All to Android floating insertion menu (Closed)
Patch Set: moving input location 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index f8ad7357c8d0c075dc04e4cd5ae1f609f908460e..c11dfc09377cf6a32208701e41bb6807ebc7e8db 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -53,6 +53,7 @@
#include "jni/ContentViewCore_jni.h"
#include "jni/DragEvent_jni.h"
#include "third_party/WebKit/public/platform/WebInputEvent.h"
+#include "third_party/WebKit/public/web/WebContextMenuData.h"
#include "ui/android/view_android.h"
#include "ui/android/window_android.h"
#include "ui/base/clipboard/clipboard.h"
@@ -75,6 +76,7 @@ using base::android::ConvertUTF8ToJavaString;
using base::android::JavaParamRef;
using base::android::JavaRef;
using base::android::ScopedJavaLocalRef;
+using blink::WebContextMenuData;
using blink::WebGestureEvent;
using blink::WebInputEvent;
using ui::MotionEventAndroid;
@@ -630,8 +632,11 @@ bool ContentViewCoreImpl::ShowPastePopup(const ContextMenuParams& params) {
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
if (obj.is_null())
return false;
+ const bool can_select_all =
+ !!(params.edit_flags & WebContextMenuData::kCanSelectAll);
Java_ContentViewCore_showPastePopup(env, obj, params.selection_start.x(),
- params.selection_start.y());
+ params.selection_start.y(),
+ can_select_all);
return true;
}
« no previous file with comments | « content/browser/DEPS ('k') | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698