• sashab@chromium.org's avatar
    Refactored UninstallDialog to take a NativeWindow instead of a Browser · 2a4939a2
    sashab@chromium.org authored
    Originally, ExtensionUninstallDialog took a Browser argument (which
    determined which browser window it should be modal to), and a special
    case was added so the dialog would be modal to the app list if the
    Browser argument was NULL. Updated this constructor to take the parent
    NativeWindow directly instead of a Browser, so the dialog can be modal
    to any parent window. For example, this allows it to be parent to the
    App Info dialog, and be a proper standalone dialog in
    ExtensionStorageMonitor. Further refactors can be made as a result of
    this CL since some of the callsites could be getting a Browser just to
    be able to launch the dialog, whereas that is not needed anymore if the
    intention is to launch it as a non-modal dialog.
    
    Updated uninstall dialogs launched from the following callsites:
    - The management Chrome API
    - The extensions context menu
    - The 'app disabled' message for when it has requested new permissions
    - The chrome://extensions page
    - The context menu of apps in the app list
    - The 'remove' button in the App Info dialog
    - The context menu on the New Tab page
    
    BUG=388746,362308
    
    Review URL: https://codereview.chromium.org/382133003
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285541 0039d316-1c4b-4281-b951-d872f2087c98
    2a4939a2
extension_uninstall_dialog.cc 4.68 KB