Skip to content

Commit

Permalink
Better document ui::WebDialogDelegate::GetDialogSize() and friends.
Browse files Browse the repository at this point in the history
Change-Id: I8bc84f45e91b4a222747d0381983eb13e5119876
Reviewed-on: https://chromium-review.googlesource.com/784313
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519396}
  • Loading branch information
leizleiz authored and Commit Bot committed Nov 27, 2017
1 parent 8db1550 commit 329281b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ui/web_dialogs/web_dialog_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,13 @@ class WEB_DIALOGS_EXPORT WebDialogDelegate {
virtual void GetWebUIMessageHandlers(
std::vector<content::WebUIMessageHandler*>* handlers) const = 0;

// Get the size of the dialog.
// Get the size of the dialog. Implementations can safely assume |size| is a
// valid pointer. Callers should be able to handle the case where
// implementations do not write into |size|.
virtual void GetDialogSize(gfx::Size* size) const = 0;

// Get the size of the dialog.
// Get the minimum size of the dialog. The default implementation just calls
// GetDialogSize().
virtual void GetMinimumDialogSize(gfx::Size* size) const;

// Gets the JSON string input to use when showing the dialog.
Expand All @@ -72,7 +75,7 @@ class WEB_DIALOGS_EXPORT WebDialogDelegate {
virtual bool CanCloseDialog() const;

// Returns true if the dialog can ever be resized. Default implementation
// returns |true|.
// returns true.
virtual bool CanResizeDialog() const;

// A callback to notify the delegate that |source|'s loading state has
Expand Down

0 comments on commit 329281b

Please sign in to comment.