commit | 47bf178b9802260a023f43f3170ca7b4e6242163 | [log] [tgz] |
---|---|---|
author | Michael Wasserman <msw@chromium.org> | Fri Aug 18 23:17:10 2017 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Aug 18 23:17:10 2017 |
tree | 2dcbf40e859eb016eb8a43513b74dea362ed3be7 | |
parent | 4abd415249b454c1520f6ab9465564edcb3bb974 [diff] |
mash: Add shelf context menu support. Chrome serializes its shelf item context menus for Ash. Ash displays the menus and reports invocations to Chrome. Add an ash-side ShelfContextMenu class that supports: -Local menu items to set shelf & wallpaper prefs/settings. -Proxies Chrome's menu items via mojo structs/interfaces. -Also used for wallpaper/desktop context menus (via RWC). Add ash::mojom::ShelfItemDelegate::GetContextMenuItems, etc.: -Extend ExecuteCommand, MenuItem, etc. to support context menus. -Denote the command's origin (context/app menu) and display id. -Allow 64-bit int command and radio-group ids; null images. -Add ash::mojom::MenuItemType=ui::MenuModel::ItemType traits. Add common ash::ShelfItemDelegate context menu handling: -Subclasses override new virtual GetContextMenu() helper. -GetContextMenuItems() stores the MenuModel for execution. -ExecuteContextMenuCommand() handles context menu invocation. Wire up chrome's launcher item subclass context menus. Make minor launcher context menu class simplifications. Add a ShelfWindowWatcher context menu item for closing. Remove mus, ash_shell, test, and desktop context menu classes. Remove ShellDelegate::CreateContextMenu and ash::ShelfAlignmentMenu. Inline CanChangeShelfAlignment; move CanUserModifyShelfAutoHideBehavior. Add unit tests, flip TestWallpaperDelegate::CanOpenSetWallpaperPage. Bug: 640693, 753028 Test: No Chrome OS shelf/desktop context menu behavior changes. Change-Id: I3afb93095b4042dca57d16844c5b05308f06a384 TBR: caitkp@chromium.org Reviewed-on: https://chromium-review.googlesource.com/571517 Commit-Queue: Michael Wasserman <msw@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: James Cook <jamescook@chromium.org> Cr-Commit-Position: refs/heads/master@{#495735}
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.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .