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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java

Issue 2263423002: Implement accessible cut, copy and paste actions on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java b/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java
index 2157ce4357ac8de8c728523e4c98868f16852340..fd77ec37dc708b1a1e8eac450b0a6398f5511b59 100644
--- a/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java
+++ b/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java
@@ -301,6 +301,24 @@ public class BrowserAccessibilityManager {
return scrollForward(virtualViewId);
case AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD:
return scrollBackward(virtualViewId);
+ case AccessibilityNodeInfo.ACTION_CUT:
+ if (mContentViewCore != null && mContentViewCore.getWebContents() != null) {
+ mContentViewCore.getWebContents().cut();
+ return true;
+ }
+ return false;
+ case AccessibilityNodeInfo.ACTION_COPY:
+ if (mContentViewCore != null && mContentViewCore.getWebContents() != null) {
+ mContentViewCore.getWebContents().copy();
+ return true;
+ }
+ return false;
+ case AccessibilityNodeInfo.ACTION_PASTE:
+ if (mContentViewCore != null && mContentViewCore.getWebContents() != null) {
+ mContentViewCore.getWebContents().paste();
+ return true;
+ }
+ return false;
default:
break;
}
@@ -798,6 +816,9 @@ public class BrowserAccessibilityManager {
if (editableText && enabled) {
node.addAction(ACTION_SET_TEXT);
node.addAction(AccessibilityNodeInfo.ACTION_SET_SELECTION);
+ node.addAction(AccessibilityNodeInfo.ACTION_CUT);
+ node.addAction(AccessibilityNodeInfo.ACTION_COPY);
+ node.addAction(AccessibilityNodeInfo.ACTION_PASTE);
}
if (canScrollForward) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698