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

Side by Side Diff: ui/views/window/dialog_delegate.h

Issue 1752623004: Remove DialogDelegate::Accept() variant (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 months 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 unified diff | Download patch
« no previous file with comments | « ui/views/window/dialog_client_view.cc ('k') | ui/views/window/dialog_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ 5 #ifndef UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_
6 #define UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ 6 #define UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // this is called when the user presses the "Cancel" button or the Esc key. 64 // this is called when the user presses the "Cancel" button or the Esc key.
65 // It can also be called on a close action if |Close| has not been 65 // It can also be called on a close action if |Close| has not been
66 // overridden. This function should return true if the window can be closed 66 // overridden. This function should return true if the window can be closed
67 // after it returns, or false if it must remain open. 67 // after it returns, or false if it must remain open.
68 virtual bool Cancel(); 68 virtual bool Cancel();
69 69
70 // For Dialog boxes, this is called when the user presses the "OK" button, 70 // For Dialog boxes, this is called when the user presses the "OK" button,
71 // or the Enter key. It can also be called on a close action if |Close| 71 // or the Enter key. It can also be called on a close action if |Close|
72 // has not been overridden. This function should return true if the window 72 // has not been overridden. This function should return true if the window
73 // can be closed after it returns, or false if it must remain open. 73 // can be closed after it returns, or false if it must remain open.
74 // If |window_closing| is true, it means that this handler is
75 // being called because the window is being closed (e.g. by Window::Close)
76 // and there is no Cancel handler, so Accept is being called instead.
77 virtual bool Accept(bool window_closing);
78 virtual bool Accept(); 74 virtual bool Accept();
79 75
80 // Called when the user closes the window without selecting an option, 76 // Called when the user closes the window without selecting an option,
81 // e.g. by pressing the close button on the window or using a window manager 77 // e.g. by pressing the close button on the window or using a window manager
82 // gesture. By default, this calls Accept() if the only button in the dialog 78 // gesture. By default, this calls Accept() if the only button in the dialog
83 // is Accept, Cancel() otherwise. This function should return true if the 79 // is Accept, Cancel() otherwise. This function should return true if the
84 // window can be closed after it returns, or false if it must remain open. 80 // window can be closed after it returns, or false if it must remain open.
85 virtual bool Close(); 81 virtual bool Close();
86 82
87 // Overridden from ui::DialogModel: 83 // Overridden from ui::DialogModel:
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void ViewHierarchyChanged( 135 void ViewHierarchyChanged(
140 const ViewHierarchyChangedDetails& details) override; 136 const ViewHierarchyChangedDetails& details) override;
141 137
142 private: 138 private:
143 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); 139 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView);
144 }; 140 };
145 141
146 } // namespace views 142 } // namespace views
147 143
148 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ 144 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/views/window/dialog_client_view.cc ('k') | ui/views/window/dialog_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698