• jstritar@chromium.org's avatar
    Fix crashes related to the extension uninstall dialog. · 6f03db06
    jstritar@chromium.org authored
    The uninstall prompt is owned by the settings page (the dialog's delegate), which gets destroyed when the user navigates to a new page. We need to make sure we invalidate pointers to the settings page when this occurs.
    
    This adds an ExtensionUninstallDialog with platform specific implementations.
    
    GTK: The settings page owns the ExtensionUninstallDialogGtk, which closes the GTK prompt when being destroyed.
    
    VIEWS: The views framework is a bit more convoluted because views owns the prompt's views::View. We have two classes: ExtensionUninstallDialogDelegateView owned by views, and ExtensionUninstallDialogViews owned by the settings page. If the user accepts or denies the prompt, we proxy the events through ExtensionUninstallDialogViews so we can invalidate pointers back to the views widget. If the settings page is destroyed, the ExtensionUninstallDialogViews closes the views widget after invalidating pointers back to the settings page.
    
    COCOA: You can't navigate away from the page when the prompt is open, so the dialog can't outlive its delegate.
    
    BUG=75011
    TEST=see bug.
    
    Review URL: http://codereview.chromium.org/7920023
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102351 0039d316-1c4b-4281-b951-d872f2087c98
    6f03db06
extension_uninstall_dialog.h 2.63 KB