• James Cook's avatar
    lacros: Support "Open" in chrome://downloads and download shelf · 21b97907
    James Cook authored
    Clicking on an item in the download shelf or in chrome://downloads
    attempts to open it in the OS-native application for that file type.
    For example, it might open a video player or image viewer.
    
    This needs to be handled by ash, so wire it through the
    crosapi::mojom::FileManager API.
    
    In the future we will need to show error messages for files that fail
    to open. The new methods return a result enum. We also need this for
    the existing ShowItemInFolder method, so deprecate the old one and
    introduce an updated version.
    
    This implementation isn't perfect. In some cases the file should be
    routed back to the browser for display in a tab. Right now some files
    that can't be opened in an app end up opening in an ash-chrome tab.
    In the future we will need to wire up the ash file_manager code to
    make "open in browser" redirect back to lacros-chrome.
    
    Bug: 1141616
    Test: added to lacros_browser_tests
    Change-Id: I8cd4166bc594bf83a3ce9458d7c1d767bbb8c041
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2511589
    Auto-Submit: James Cook <jamescook@chromium.org>
    Commit-Queue: Scott Violet <sky@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Reviewed-by: default avatarErik Chen <erikchen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#823381}
    21b97907
BUILD.gn 389 KB