RemoteMacViews: Wire up menu items and shortcut keys

For menu items and shortcut keys to work, PWA windows need to have the
ChromeCommandDispatcherDelegate and BrowserWindowCommandHandler
structures set on them.

This cannot be done by a method on views_bridge_mac::mojom::
BridgedNativeWidget, because the structures to be created exist in
Chrome, which would be a layering violation.

Introduce a method to chrome::mojom::AppShim which takes a widget id,
creates the ChromeCommandDispatcherDelegate and
BrowserWindowCommandHandler, and assigns them to the corresponding

Bug: 895169
Change-Id: Ie1d333bec235d7b6101d5b19aa89a74136d54a7a
Commit-Queue: ccameron <>
Reviewed-by: Elly Fong-Jones <>
Reviewed-by: Robert Sesek <>
Cr-Commit-Position: refs/heads/master@{#614631}
12 files changed