Implement chip view menu item for app menu

Add chip view to downloads/bookmarks menu items.

This CL introduces ChipViewMenuItemViewBinder as a new CustomViewBinder,
it will have a chip view at the end if the feature is enabled.
This CL also moved AppMenuAdapter#OnClickHandler out of AppMenuAdapter,
and renamed to AppMenuClickHandler, because ChipViewMenuItemViewBinder is
the first CustomViewBinder has two items to be clicked, and the click
handler needs to handle clicking items individually.

Bug:1130663

Change-Id: Ia9c0a0350c6e912ee6519d30a07cba2f74a1f72a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2420256
Reviewed-by: Sinan Sahin <[email protected]>
Reviewed-by: Theresa  <[email protected]>
Commit-Queue: Gang Wu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#810819}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index b71d8b5..ebbab6c 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1891,6 +1891,21 @@
       base::size(kTabbedAppOverflowMenuRegroupBackward), nullptr},
      {"(share button)", kTabbedAppOverflowMenuRegroupShare,
       base::size(kTabbedAppOverflowMenuRegroupShare), nullptr}};
+const FeatureEntry::FeatureParam
+    kTabbedAppOverflowMenuThreeButtonActionbarAction[] = {
+        {"three_button_action_bar", "action_chip_view"}};
+const FeatureEntry::FeatureParam
+    kTabbedAppOverflowMenuThreeButtonActionbarDestination[] = {
+        {"three_button_action_bar", "destination_chip_view"}};
+const FeatureEntry::FeatureVariation
+    kTabbedAppOverflowMenuThreeButtonActionbarVariations[] = {
+        {"(three button with action chip view)",
+         kTabbedAppOverflowMenuThreeButtonActionbarAction,
+         base::size(kTabbedAppOverflowMenuThreeButtonActionbarAction), nullptr},
+        {"(three button with destination chip view)",
+         kTabbedAppOverflowMenuThreeButtonActionbarDestination,
+         base::size(kTabbedAppOverflowMenuThreeButtonActionbarDestination),
+         nullptr}};
 #endif  // OS_ANDROID
 
 const FeatureEntry::FeatureVariation
@@ -3898,6 +3913,14 @@
          chrome::android::kTabbedAppOverflowMenuRegroup,
          kTabbedAppOverflowMenuRegroupVariations,
          "AndroidAppMenuUiRework")},
+    {"tabbed-app-overflow-menu-three-button-actionbar",
+     flag_descriptions::kTabbedAppOverflowMenuThreeButtonActionbarName,
+     flag_descriptions::kTabbedAppOverflowMenuThreeButtonActionbarDescription,
+     kOsAndroid,
+     FEATURE_WITH_PARAMS_VALUE_TYPE(
+         chrome::android::kTabbedAppOverflowMenuThreeButtonActionbar,
+         kTabbedAppOverflowMenuThreeButtonActionbarVariations,
+         "AndroidAppMenuThreeButtonActionbar")},
 #endif  // OS_ANDROID
 
     {"omnibox-display-title-for-current-url",