• Christopher Cameron's avatar
    RemoteMacViews: Break validateUserInterfaceItem across mojo · d8cd79b9
    Christopher Cameron authored
    This is a step toward supporting shortcut keys and menu interface items
    in PWAs. This breaks the function -[BrowserWindowCommandHandler
    validateUserInterfaceItem] into two parts
    - The part to look up the browser command and to update the interface
      item still remains in BrowserWindowCommandHandler (which will be in
      the in the PWA process).
    - The part to access the Browser*, which will be in the browser process,
      which is
      - routed through mojo to the BridgedNativeWidgetHostImpl
      - to the NativeWidgetMac
      - which is subclassed as BrowserFrameMac
      - which calls BrowserWindowCommandHandlerValidateUserInterfaceItem
        to implemented the parts that used to be in
        BrowserWindowCommandHandler
    
    Also add required interface to look up a BridgedNativeWidgetImpl from
    an NSWindow.
    
    Bug: 895169
    Change-Id: Ie81a1e5a44537b07183d4c29b89d2da1951137c0
    Reviewed-on: https://chromium-review.googlesource.com/c/1357829
    Commit-Queue: ccameron <ccameron@chromium.org>
    Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
    Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#613255}
    d8cd79b9
bridged_native_widget_host_impl.mm 40.3 KB