[cr150][plaster][android] Migrate `AUTOPLAY` patches This PR migrates several java patches for `AUTOPLAY` to plaster. It uses the same previous techniques, where we match the enum block and add at the end. The only innovation in this PR as an approach for plaster is the replacement of the value `NUM_ENTRIES` with `+1` for whatever keys we are inserting, while at the same time using the previous value of `NUM_ENTRIES` as the starting value for the first key. Resolved https://github.com/brave/brave-browser/issues/55385
40 lines
1.8 KiB
Diff
40 lines
1.8 KiB
Diff
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java
|
|
index 0e7032634735c6f32404e69e3f302170bd66cb47..5bba71b4fbf6f9e0bcf0de3b0ce55b0eecfa0cdf 100644
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java
|
|
@@ -78,6 +78,7 @@ class ChromeContextMenuItem {
|
|
Item.PRINT_PAGE,
|
|
Item.VIEW_PAGE_SOURCE,
|
|
Item.INSPECT_ELEMENT,
|
|
+ Item.COPY_CLEAN_LINK,
|
|
})
|
|
@Retention(RetentionPolicy.SOURCE)
|
|
public @interface Item {
|
|
@@ -135,8 +136,9 @@ class ChromeContextMenuItem {
|
|
// Developer Group
|
|
int VIEW_PAGE_SOURCE = 41;
|
|
int INSPECT_ELEMENT = 42;
|
|
+ int COPY_CLEAN_LINK = 43;
|
|
// ALWAYS UPDATE!
|
|
- int NUM_ENTRIES = 43;
|
|
+ int NUM_ENTRIES = COPY_CLEAN_LINK + 1;
|
|
}
|
|
|
|
/** Mapping from {@link Item} to the ID found in the ids.xml. */
|
|
@@ -184,6 +186,7 @@ class ChromeContextMenuItem {
|
|
R.id.contextmenu_print_page, // Item.PRINT_PAGE
|
|
R.id.contextmenu_view_page_source, // Item.VIEW_PAGE_SOURCE
|
|
R.id.contextmenu_inspect_element, // Item.INSPECT_ELEMENT
|
|
+ R.id.contextmenu_copy_clean_link, // Item.COPY_CLEAN_LINK
|
|
};
|
|
|
|
/** Mapping from {@link Item} to the ID of the string that describes the action of the item. */
|
|
@@ -231,6 +234,7 @@ class ChromeContextMenuItem {
|
|
R.string.contextmenu_print_page, // Item.PRINT_PAGE
|
|
R.string.contextmenu_view_page_source, // Item.VIEW_PAGE_SOURCE
|
|
R.string.contextmenu_inspect_element, // Item.INSPECT_ELEMENT
|
|
+ R.string.contextmenu_copy_clean_link, // Item.COPY_CLEAN_LINK
|
|
};
|
|
|
|
/**
|