[cr145][Android] Changes for new BookmarkToolbarCoordinator c-tor signature
Chromium changes: https://chromium.googlesource.com/chromium/src/+/d5213c799a29303dcc0e9497fda72130b39af681 commit d5213c799a29303dcc0e9497fda72130b39af681 Author: Ho Cheung <hocheung@chromium.org> Date: Tue Dec 23 17:03:39 2025 -0800 [Bookmarks] Add "Copy link" option to Android bookmark manager selection menu Add a "Copy link" menu option to the selection mode menu in the Android bookmarks manager. When a single bookmark is selected, users can now copy its URL to the clipboard via the overflow menu, providing a quick way to share bookmark URLs without opening them. This feature: - Appears in the three-dot overflow menu alongside "Open in new tab" and "Open in Incognito tab" when exactly one bookmark is selected. - Is hidden when folders are selected (folders have no URL). - Clears the selection after copying for a cleaner UX. - Shows a "Copied" snackbar notification to confirm the action. - Reuses existing translated strings (@string/copy_link, @string/copied) to avoid additional i18n overhead. At the same time, add appropriate tests to improve code coverage and UserAction for statistical use. Design doc: https://docs.google.com/document/d/1zDD-gk01xMioNgL_NTKroxvPW1HnVbPDHIxNQlF-_ZI Bug: 448009940 Change-Id: I60fdc09a971daea4a92c64b79d3a1706502e63d2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7227136 Reviewed-by: Sky Malice <skym@chromium.org> Reviewed-by: Wenyu Fu <wenyufu@chromium.org> Reviewed-by: Brandon Wylie <wylieb@google.com> Owners-Override: Wenyu Fu <wenyufu@chromium.org> Reviewed-by: Theresa Sullivan <twellington@chromium.org> Commit-Queue: Aaron Teo <hocheung@chromium.org> Cr-Commit-Position: refs/heads/main@{#1562385}
This commit is contained in:
+3
@@ -10,6 +10,7 @@ import android.view.View;
|
||||
|
||||
import org.chromium.base.supplier.OneshotSupplier;
|
||||
import org.chromium.chrome.browser.profiles.Profile;
|
||||
import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager;
|
||||
import org.chromium.components.bookmarks.BookmarkId;
|
||||
import org.chromium.components.browser_ui.widget.dragreorder.DragReorderableRecyclerViewAdapter;
|
||||
import org.chromium.components.browser_ui.widget.selectable_list.SelectableListLayout;
|
||||
@@ -39,6 +40,7 @@ class BraveBookmarkToolbarCoordinator extends BookmarkToolbarCoordinator {
|
||||
Runnable endSearchRunnable,
|
||||
BooleanSupplier incognitoEnabledSupplier,
|
||||
BookmarkManagerOpener bookmarkManagerOpener,
|
||||
SnackbarManager snackbarManager,
|
||||
View nextFocusableView) {
|
||||
super(
|
||||
context,
|
||||
@@ -56,6 +58,7 @@ class BraveBookmarkToolbarCoordinator extends BookmarkToolbarCoordinator {
|
||||
endSearchRunnable,
|
||||
incognitoEnabledSupplier,
|
||||
bookmarkManagerOpener,
|
||||
snackbarManager,
|
||||
nextFocusableView);
|
||||
|
||||
if (mToolbar instanceof BraveBookmarkToolbar) {
|
||||
|
||||
@@ -1911,6 +1911,7 @@ public class BytecodeTest {
|
||||
Runnable.class,
|
||||
BooleanSupplier.class,
|
||||
BookmarkManagerOpener.class,
|
||||
SnackbarManager.class,
|
||||
View.class));
|
||||
Assert.assertTrue(
|
||||
constructorsMatch(
|
||||
|
||||
Reference in New Issue
Block a user