Skip to content

Commit

Permalink
Fix erroneous comment on WebDialogDelegate::OnCloseContents()
Browse files Browse the repository at this point in the history
The comment previously suggested that the contents passed in have already been
closed.  However, this is not true.  If |*out_close_dialog|
is set to true, the contents are then closed when the enclosing dialog is closed.
Otherwise, if the dialog is not closed, the contents are left intact.

Bug: 927957
Change-Id: Id9a4cdf70b10581aa4e8052093a7f0e6cae167b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1668334
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Danan S <danan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#670946}
  • Loading branch information
Danan S authored and Commit Bot committed Jun 20, 2019
1 parent 9ec2092 commit 5bec5d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/web_dialogs/web_dialog_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ class WEB_DIALOGS_EXPORT WebDialogDelegate {
// response to a "dialogClose" message from WebUI.
virtual void OnDialogCloseFromWebUI(const std::string& json_retval);

// A callback to notify the delegate that the contents have gone
// away. Only relevant if your dialog hosts code that calls
// windows.close() and you've allowed that. If the output parameter
// A callback to notify the delegate that the contents are requesting
// to be closed. This could be in response to a number of events
// that are handled by the WebContents. If the output parameter
// is set to true, then the dialog is closed. The default is false.
// |out_close_dialog| is never NULL.
virtual void OnCloseContents(content::WebContents* source,
Expand Down

0 comments on commit 5bec5d2

Please sign in to comment.