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

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

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_delegate.h ('k') | no next file » | 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 #include "ui/views/window/dialog_delegate.h" 5 #include "ui/views/window/dialog_delegate.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 96
97 View* DialogDelegate::CreateFootnoteView() { 97 View* DialogDelegate::CreateFootnoteView() {
98 return NULL; 98 return NULL;
99 } 99 }
100 100
101 bool DialogDelegate::Cancel() { 101 bool DialogDelegate::Cancel() {
102 return true; 102 return true;
103 } 103 }
104 104
105 bool DialogDelegate::Accept(bool window_closing) {
106 return Accept();
107 }
108
109 bool DialogDelegate::Accept() { 105 bool DialogDelegate::Accept() {
110 return true; 106 return true;
111 } 107 }
112 108
113 bool DialogDelegate::Close() { 109 bool DialogDelegate::Close() {
114 int buttons = GetDialogButtons(); 110 int buttons = GetDialogButtons();
115 if ((buttons & ui::DIALOG_BUTTON_CANCEL) || 111 if ((buttons & ui::DIALOG_BUTTON_CANCEL) ||
116 (buttons == ui::DIALOG_BUTTON_NONE)) { 112 (buttons == ui::DIALOG_BUTTON_NONE)) {
117 return Cancel(); 113 return Cancel();
118 } 114 }
119 return Accept(true); 115 return Accept();
120 } 116 }
121 117
122 base::string16 DialogDelegate::GetDialogTitle() const { 118 base::string16 DialogDelegate::GetDialogTitle() const {
123 return GetWindowTitle(); 119 return GetWindowTitle();
124 } 120 }
125 121
126 int DialogDelegate::GetDialogButtons() const { 122 int DialogDelegate::GetDialogButtons() const {
127 return ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL; 123 return ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL;
128 } 124 }
129 125
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 state->role = ui::AX_ROLE_DIALOG; 250 state->role = ui::AX_ROLE_DIALOG;
255 } 251 }
256 252
257 void DialogDelegateView::ViewHierarchyChanged( 253 void DialogDelegateView::ViewHierarchyChanged(
258 const ViewHierarchyChangedDetails& details) { 254 const ViewHierarchyChangedDetails& details) {
259 if (details.is_add && details.child == this && GetWidget()) 255 if (details.is_add && details.child == this && GetWidget())
260 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 256 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
261 } 257 }
262 258
263 } // namespace views 259 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/window/dialog_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698