Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: ui/web_dialogs/web_dialog_delegate.h

Issue 82913007: Add CanCloseDialog to WebDialogDelegate to allow blocking closing of dialog if needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/webview/web_dialog_view.cc ('k') | ui/web_dialogs/web_dialog_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {}
« no previous file with comments | « ui/views/controls/webview/web_dialog_view.cc ('k') | ui/web_dialogs/web_dialog_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698