-
Jeroen Dhollander authored
Each |AssistantButton| is identified using an enum |AssistantButtonId|. These values were stored on the |AssistantButton| using views::View::SetID(). Recently we also started using views::View::SetID() to make it easier to find views during unittests. This caused a conflict where the |AssistantButtonId| was overwritten. To solve this the |AssistantButton| now stores its id in a separate |id_| property. This is then passed to all interested parties using a newly introduced |AssistantButtonListener| API. |ash_unittests --gtest_filter="AssistantPageViewTest.*"|, as well as manual testing of both the embedded and standalone UI. Bug: b/144530695 Change-Id: Id3f231553d04fb0f8a8c7c64c7762d1a8b72cd59 Tests: Newly introduced unittests Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919830 Commit-Queue: Jeroen Dhollander <jeroendh@google.com> Reviewed-by:
Xiyuan Xia <xiyuan@chromium.org> Reviewed-by:
Xiaohui Chen <xiaohuic@chromium.org> Cr-Commit-Position: refs/heads/master@{#717862}
e45bbeeb