| Index: ui/views/window/dialog_delegate.h
|
| diff --git a/ui/views/window/dialog_delegate.h b/ui/views/window/dialog_delegate.h
|
| index 7781064ba91245493b287ef170430bb4bd6de763..10bd79d65ca0d92724ca75db018912f1e265d95e 100644
|
| --- a/ui/views/window/dialog_delegate.h
|
| +++ b/ui/views/window/dialog_delegate.h
|
| @@ -54,22 +54,29 @@ class VIEWS_EXPORT DialogDelegate : public ui::DialogModel,
|
| virtual View* CreateFootnoteView();
|
|
|
| // For Dialog boxes, if there is a "Cancel" button or no dialog button at all,
|
| - // this is called when the user presses the "Cancel" button or the Close
|
| - // button on the window or in the system menu, or presses the Esc key.
|
| - // This function should return true if the window can be closed after it
|
| - // returns, or false if it must remain open.
|
| + // this is called when the user presses the "Cancel" button or the Esc key.
|
| + // It can also be called on a dismiss action if |Dismiss| has not been
|
| + // overridden. This function should return true if the window can be closed
|
| + // after it returns, or false if it must remain open.
|
| virtual bool Cancel();
|
|
|
| // For Dialog boxes, this is called when the user presses the "OK" button,
|
| - // or the Enter key. Can also be called on Esc key or close button
|
| - // presses if there is no "Cancel" button. This function should return
|
| - // true if the window can be closed after it returns, or false if it must
|
| - // remain open. If |window_closing| is true, it means that this handler is
|
| + // or the Enter key. It can also be called on a dismiss action if |Dismiss|
|
| + // has not been overridden. This function should return true if the window
|
| + // can be closed after it returns, or false if it must remain open.
|
| + // If |window_closing| is true, it means that this handler is
|
| // being called because the window is being closed (e.g. by Window::Close)
|
| // and there is no Cancel handler, so Accept is being called instead.
|
| virtual bool Accept(bool window_closing);
|
| virtual bool Accept();
|
|
|
| + // For Dialog boxes, this is called when the user presses the Close button
|
| + // on the window or in the system menu. The default behavior is to call
|
| + // |Cancel| if the dialog has a "Cancel" button or no button at all, or
|
| + // |Accept| otherwise. This function should return true if the window can be
|
| + // closed after it returns, or false if it must remain open.
|
| + virtual bool Dismiss();
|
| +
|
| // Overridden from ui::DialogModel:
|
| virtual base::string16 GetDialogLabel() const OVERRIDE;
|
| virtual base::string16 GetDialogTitle() const OVERRIDE;
|
|
|