Index: ui/web_dialogs/web_dialog_delegate.h |
diff --git a/ui/web_dialogs/web_dialog_delegate.h b/ui/web_dialogs/web_dialog_delegate.h |
index 8416c1f15e051da190074b25fe1cd8f24c9bd872..2bd772f018e2e49f4424aa20bc9498f86ce1789c 100644 |
--- a/ui/web_dialogs/web_dialog_delegate.h |
+++ b/ui/web_dialogs/web_dialog_delegate.h |
@@ -63,6 +63,12 @@ class WEB_DIALOGS_EXPORT WebDialogDelegate { |
// Gets the JSON string input to use when showing the dialog. |
virtual std::string GetDialogArgs() const = 0; |
+ // Returns true to signal that the dialog can be closed. Specialized |
+ // WebDialogDelegate subclasses can override this default behavior to allow |
+ // the close to be blocked until the user corrects mistakes, accepts an |
+ // agreement, etc. |
+ virtual bool CanCloseDialog() const; |
+ |
// A callback to notify the delegate that |source|'s loading state has |
// changed. |
virtual void OnLoadingStateChanged(content::WebContents* source) {} |