summaryrefslogtreecommitdiffstats
path: root/views/window
diff options
context:
space:
mode:
authorjstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-22 20:37:14 +0000
committerjstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-22 20:37:14 +0000
commit6f03db06811b7bc1ff33427c834a52e29f4e57b8 (patch)
treedd3f4f55d72bcc172db5b0d91ce225dd10e6d1fc /views/window
parentf2078c4fb1f49a5f735f28c32adf0f1e46e7c8d5 (diff)
downloadchromium_src-6f03db06811b7bc1ff33427c834a52e29f4e57b8.zip
chromium_src-6f03db06811b7bc1ff33427c834a52e29f4e57b8.tar.gz
chromium_src-6f03db06811b7bc1ff33427c834a52e29f4e57b8.tar.bz2
Fix crashes related to the extension uninstall dialog.
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
Diffstat (limited to 'views/window')
-rw-r--r--views/window/dialog_delegate.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/views/window/dialog_delegate.h b/views/window/dialog_delegate.h
index 629d290..23b835a 100644
--- a/views/window/dialog_delegate.h
+++ b/views/window/dialog_delegate.h
@@ -87,11 +87,10 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
// For Dialog boxes, this is called when the user presses the "OK" button,
// or the Enter key. Can also be called on Esc key or close button
// presses if there is no "Cancel" button. This function should return
- // true if the window can be closed after the window can be closed after
- // it returns, or false if it must remain open. If |window_closing| is
- // true, it means that this handler is being called because the window is
- // being closed (e.g. by Window::Close) and there is no Cancel handler,
- // so Accept is being called instead.
+ // true if the window can be closed after it returns, or false if it must
+ // remain open. If |window_closing| is true, it means that this handler is
+ // being called because the window is being closed (e.g. by Window::Close)
+ // and there is no Cancel handler, so Accept is being called instead.
virtual bool Accept(bool window_closing);
virtual bool Accept();