
This CL adds support for actions in suggestions created by extensions in unscoped mode. Actions are represented as buttons appended to the suggestion in the Omnibox dropdown. We also introduce the corresponding event (`OnActionExecuted`) that allows extensions to handle user clicks on the corresponding action button. Actions per suggestion is limited at 3, following an example we have for Actions in Suggest (go/clankactionsinsuggest). I tried to add a test (http://gpaste/5517328255811584#l=55), but unfortunately the console error observer times out frequently, making the test flaky. Please let me know if you have a suggestion on how to capture errors in the extension. See actions in action (before Nihar's groups): https://drive.google.com/file/d/1Y7VVj42EuIqSeCiCZYpdNhUT8bGl_0M3/view?usp=drive_link Screenshot with Nihar's groups: http://screen/BY79w4o8gRQP5sw Some features we also considered and that can be added here or in a follow-up CL (please let me know what you think): - The `contents` of the corresponding Omnibox suggestion, to make it easier for extensions to identify which suggestion the action corresponds to - URL for actions that simply open a URL, for which we could leverage the `url_` field in `OmniboxAction` [1] [1] https://source.chromium.org/chromium/chromium/src/+/main:components/omnibox/browser/actions/omnibox_action.h;l=189;drc=f2e4e401d095d9ffb45f6b6807c3c3d0595d897c Bug: 381273322 Fixed: 381280335 Change-Id: I705dcdbcbe702cf0a9ba4977ecfde745e5c811e1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6136780 Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org> Reviewed-by: Salma Elmahallawy <esalma@google.com> Commit-Queue: Fabio Tirelo <ftirelo@chromium.org> Reviewed-by: Kelvin Jiang <kelvinjiang@chromium.org> Reviewed-by: Moe Ahmadi <mahmadi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1411179}
Chromium
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead,
follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.