• Hazem Ashmawy's avatar
    Show and hide WebView developer UI launcher icon in runtime · 8ef0da96
    Hazem Ashmawy authored
    Schedule a low priority (best effort) non-blocking PostTask when chrome
    comes to the foreground or when a WebView MonoChrome process is created.
    The task is responsible to show a launcher icon to open WebView DevTools
    if monochrome is the current selected system webview provider otherwise
    it hides the launcher icon.
    
    The component (activity-alias) that shows the icon is disabled by
    default and is only added to the manifest in build-time when GN argument
    `webview_devui_show_icon=true` which is enabled by default for dev and
    canary channels.
    
    icon_webview is added to the activity-alias for monochrome so the
    launcher icon for DevTools will be WebView icon not Monochrome. However, the icon the
    application switcher will still show monochrome icon.
    
    Bug: 1026062
    Bug: 1026060
    Test: select monochrome as webview implementation and launch monochrome browser, observe icon appearing
    Test: select monochrome as webview implementation and launch webview shell browser, observe icon appearing
    Test: select different webview implementation, launch monochrome and observe icon disappearing
    Change-Id: I9c05aa9d8bcdddc016a06b62a5e76e2aa20f30a6
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2000724
    Commit-Queue: Hazem Ashmawy <hazems@chromium.org>
    Reviewed-by: default avatarNate Fischer <ntfschr@chromium.org>
    Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
    Reviewed-by: default avatarRichard Coles <torne@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#733974}
    8ef0da96
MonochromeDeveloperUiLauncherManifest.xml 1.07 KB