| Index: content/public/android/java/src/org/chromium/content/browser/input/FloatingPastePopupMenu.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/input/FloatingPastePopupMenu.java b/content/public/android/java/src/org/chromium/content/browser/input/FloatingPastePopupMenu.java
|
| index 3c41da5c53962a9e173365add8798777d3f9faab..eb5a69ae30566e871ca188dfd7503aae0de963d8 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/input/FloatingPastePopupMenu.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/input/FloatingPastePopupMenu.java
|
| @@ -108,6 +108,9 @@ public class FloatingPastePopupMenu implements PastePopupMenu {
|
| mode.setSubtitle(null);
|
| SelectionPopupController.initializeMenu(mContext, mode, menu);
|
| if (!mDelegate.canPaste()) menu.removeItem(R.id.select_action_menu_paste);
|
| + if (!mDelegate.canPasteAsPlainText()) {
|
| + menu.removeItem(R.id.select_action_menu_paste_as_plain_text);
|
| + }
|
| menu.removeItem(R.id.select_action_menu_select_all);
|
| menu.removeItem(R.id.select_action_menu_cut);
|
| menu.removeItem(R.id.select_action_menu_copy);
|
| @@ -122,9 +125,13 @@ public class FloatingPastePopupMenu implements PastePopupMenu {
|
|
|
| @Override
|
| public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
|
| - if (item.getItemId() == R.id.select_action_menu_paste) {
|
| + int id = item.getItemId();
|
| + if (id == R.id.select_action_menu_paste) {
|
| mDelegate.paste();
|
| mode.finish();
|
| + } else if (id == R.id.select_action_menu_paste_as_plain_text) {
|
| + mDelegate.pasteAsPlainText();
|
| + mode.finish();
|
| }
|
| return true;
|
| }
|
|
|