Index: ui/views/window/dialog_client_view.h |
diff --git a/ui/views/window/dialog_client_view.h b/ui/views/window/dialog_client_view.h |
index 01faf827be2b50b149051f8db97573ab99c766d3..86ed922f81d42f793a75d7cfb458e4fbd3ed7644 100644 |
--- a/ui/views/window/dialog_client_view.h |
+++ b/ui/views/window/dialog_client_view.h |
@@ -104,6 +104,10 @@ class VIEWS_EXPORT DialogClientView : public ClientView, |
// After calling this, no button row Views will be in the view hierarchy. |
void SetupViews(); |
+ // Updates |delegate_allowed_close_| using the provided |method|. If |close| |
+ // is true, invokes Widget::Close() the first time the delegate allows it. |
+ void CloseWithDelegateMethod(bool (DialogDelegate::*method)(), bool close); |
+ |
// How much to inset the button row. |
gfx::Insets button_row_insets_; |
@@ -127,6 +131,11 @@ class VIEWS_EXPORT DialogClientView : public ClientView, |
// twice, which can have bad consequences. |
bool delegate_allowed_close_ = false; |
+ // True while asking the delegate whether a close should occur. The delegate |
+ // may perform actions that trigger a nested close query. DialogClientView |
+ // ignores these nested requests, and only acts on the first on the stack. |
+ bool asking_delegate_whether_to_close_ = false; |
+ |
// Used to prevent unnecessary or potentially harmful changes during |
// SetupLayout(). Everything will be manually updated afterwards. |
bool adding_or_removing_views_ = false; |