Add ability to automatically refresh a menu created using MenuRunner's MenuModel-based constructor.
One way to create a MenuRunner is through its MenuModel-based constructor: https://cs.chromium.org/chromium/src/ui/views/controls/menu/menu_runner.h?l=109&rcl=75b927b4f2d4193d77c1721d8415aadac33f5b4e This uses the BuildMenu method in MenuModelAdapter to create the MenuItemView based on the MenuModel. However, if the MenuModel later changes, the MenuItemView doesn't get updated accordingly, since it was only built once on construction. This CL makes MenuRunnerImplAdapter the delegate of its MenuModel, and when it sees a change, it makes it rebuild the menu. Bug: 923660 Change-Id: I9df794f87cef268fa6fbba2c47fbe29a745ae566 Reviewed-on: https://chromium-review.googlesource.com/c/1452356 Commit-Queue: Edin Kadric <edinkadric@google.com> Reviewed-by:Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#630635}
Showing
Please register or sign in to comment