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

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

Issue 694363002: ui: Remove unused DialogModel::GetDialogLabel(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 1 month 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 "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/accessibility/ax_view_state.h" 8 #include "ui/accessibility/ax_view_state.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/strings/grit/ui_strings.h" 10 #include "ui/strings/grit/ui_strings.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 bool DialogDelegate::Close() { 100 bool DialogDelegate::Close() {
101 int buttons = GetDialogButtons(); 101 int buttons = GetDialogButtons();
102 if ((buttons & ui::DIALOG_BUTTON_CANCEL) || 102 if ((buttons & ui::DIALOG_BUTTON_CANCEL) ||
103 (buttons == ui::DIALOG_BUTTON_NONE)) { 103 (buttons == ui::DIALOG_BUTTON_NONE)) {
104 return Cancel(); 104 return Cancel();
105 } 105 }
106 return Accept(true); 106 return Accept(true);
107 } 107 }
108 108
109 base::string16 DialogDelegate::GetDialogLabel() const {
110 return base::string16();
111 }
112
113 base::string16 DialogDelegate::GetDialogTitle() const { 109 base::string16 DialogDelegate::GetDialogTitle() const {
114 return GetWindowTitle(); 110 return GetWindowTitle();
115 } 111 }
116 112
117 int DialogDelegate::GetDialogButtons() const { 113 int DialogDelegate::GetDialogButtons() const {
118 return ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL; 114 return ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL;
119 } 115 }
120 116
121 int DialogDelegate::GetDefaultDialogButton() const { 117 int DialogDelegate::GetDefaultDialogButton() const {
122 if (GetDialogButtons() & ui::DIALOG_BUTTON_OK) 118 if (GetDialogButtons() & ui::DIALOG_BUTTON_OK)
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 state->role = ui::AX_ROLE_DIALOG; 240 state->role = ui::AX_ROLE_DIALOG;
245 } 241 }
246 242
247 void DialogDelegateView::ViewHierarchyChanged( 243 void DialogDelegateView::ViewHierarchyChanged(
248 const ViewHierarchyChangedDetails& details) { 244 const ViewHierarchyChangedDetails& details) {
249 if (details.is_add && details.child == this && GetWidget()) 245 if (details.is_add && details.child == this && GetWidget())
250 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 246 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
251 } 247 }
252 248
253 } // namespace views 249 } // 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