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

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

Issue 2922263002: Fix style of profile error dialog. (Closed)
Patch Set: tapted's and pkasting's comments Created 3 years, 6 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 "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 140 }
141 141
142 int DialogDelegate::GetDefaultDialogButton() const { 142 int DialogDelegate::GetDefaultDialogButton() const {
143 if (GetDialogButtons() & ui::DIALOG_BUTTON_OK) 143 if (GetDialogButtons() & ui::DIALOG_BUTTON_OK)
144 return ui::DIALOG_BUTTON_OK; 144 return ui::DIALOG_BUTTON_OK;
145 if (GetDialogButtons() & ui::DIALOG_BUTTON_CANCEL) 145 if (GetDialogButtons() & ui::DIALOG_BUTTON_CANCEL)
146 return ui::DIALOG_BUTTON_CANCEL; 146 return ui::DIALOG_BUTTON_CANCEL;
147 return ui::DIALOG_BUTTON_NONE; 147 return ui::DIALOG_BUTTON_NONE;
148 } 148 }
149 149
150 bool DialogDelegate::ShouldDefaultButtonBeBlue() const {
151 return false;
152 }
153
154 base::string16 DialogDelegate::GetDialogButtonLabel( 150 base::string16 DialogDelegate::GetDialogButtonLabel(
155 ui::DialogButton button) const { 151 ui::DialogButton button) const {
156 if (button == ui::DIALOG_BUTTON_OK) 152 if (button == ui::DIALOG_BUTTON_OK)
157 return l10n_util::GetStringUTF16(IDS_APP_OK); 153 return l10n_util::GetStringUTF16(IDS_APP_OK);
158 if (button == ui::DIALOG_BUTTON_CANCEL) { 154 if (button == ui::DIALOG_BUTTON_CANCEL) {
159 if (GetDialogButtons() & ui::DIALOG_BUTTON_OK) 155 if (GetDialogButtons() & ui::DIALOG_BUTTON_OK)
160 return l10n_util::GetStringUTF16(IDS_APP_CANCEL); 156 return l10n_util::GetStringUTF16(IDS_APP_CANCEL);
161 return l10n_util::GetStringUTF16(IDS_APP_CLOSE); 157 return l10n_util::GetStringUTF16(IDS_APP_CLOSE);
162 } 158 }
163 NOTREACHED(); 159 NOTREACHED();
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 node_data->role = ui::AX_ROLE_DIALOG; 264 node_data->role = ui::AX_ROLE_DIALOG;
269 } 265 }
270 266
271 void DialogDelegateView::ViewHierarchyChanged( 267 void DialogDelegateView::ViewHierarchyChanged(
272 const ViewHierarchyChangedDetails& details) { 268 const ViewHierarchyChangedDetails& details) {
273 if (details.is_add && details.child == this && GetWidget()) 269 if (details.is_add && details.child == this && GetWidget())
274 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 270 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
275 } 271 }
276 272
277 } // namespace views 273 } // 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