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

Side by Side Diff: ui/views/controls/message_box_view.cc

Issue 2477463003: Replace ui::AXViewState with AXNodeData and AXActionData (Closed)
Patch Set: Fix test Created 4 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/controls/message_box_view.h ('k') | ui/views/controls/progress_bar.h » ('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 #include "ui/views/controls/message_box_view.h" 5 #include "ui/views/controls/message_box_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/strings/string_split.h" 11 #include "base/strings/string_split.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "ui/accessibility/ax_view_state.h" 13 #include "ui/accessibility/ax_node_data.h"
14 #include "ui/base/clipboard/clipboard.h" 14 #include "ui/base/clipboard/clipboard.h"
15 #include "ui/base/clipboard/scoped_clipboard_writer.h" 15 #include "ui/base/clipboard/scoped_clipboard_writer.h"
16 #include "ui/views/controls/button/checkbox.h" 16 #include "ui/views/controls/button/checkbox.h"
17 #include "ui/views/controls/label.h" 17 #include "ui/views/controls/label.h"
18 #include "ui/views/controls/link.h" 18 #include "ui/views/controls/link.h"
19 #include "ui/views/controls/scroll_view.h" 19 #include "ui/views/controls/scroll_view.h"
20 #include "ui/views/controls/textfield/textfield.h" 20 #include "ui/views/controls/textfield/textfield.h"
21 #include "ui/views/layout/box_layout.h" 21 #include "ui/views/layout/box_layout.h"
22 #include "ui/views/layout/grid_layout.h" 22 #include "ui/views/layout/grid_layout.h"
23 #include "ui/views/layout/layout_constants.h" 23 #include "ui/views/layout/layout_constants.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 if (!link_) { 123 if (!link_) {
124 link_ = new Link(); 124 link_ = new Link();
125 link_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 125 link_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
126 } 126 }
127 link_->SetText(text); 127 link_->SetText(text);
128 link_->set_listener(listener); 128 link_->set_listener(listener);
129 } 129 }
130 ResetLayoutManager(); 130 ResetLayoutManager();
131 } 131 }
132 132
133 void MessageBoxView::GetAccessibleState(ui::AXViewState* state) { 133 void MessageBoxView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
134 state->role = ui::AX_ROLE_ALERT; 134 node_data->role = ui::AX_ROLE_ALERT;
135 } 135 }
136 136
137 /////////////////////////////////////////////////////////////////////////////// 137 ///////////////////////////////////////////////////////////////////////////////
138 // MessageBoxView, View overrides: 138 // MessageBoxView, View overrides:
139 139
140 void MessageBoxView::ViewHierarchyChanged( 140 void MessageBoxView::ViewHierarchyChanged(
141 const ViewHierarchyChangedDetails& details) { 141 const ViewHierarchyChangedDetails& details) {
142 if (details.child == this && details.is_add) { 142 if (details.child == this && details.is_add) {
143 if (prompt_field_) 143 if (prompt_field_)
144 prompt_field_->SelectAll(true); 144 prompt_field_->SelectAll(true);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 } 244 }
245 245
246 if (link_) { 246 if (link_) {
247 layout->AddPaddingRow(0, inter_row_vertical_spacing_); 247 layout->AddPaddingRow(0, inter_row_vertical_spacing_);
248 layout->StartRow(0, extra_column_view_set_id); 248 layout->StartRow(0, extra_column_view_set_id);
249 layout->AddView(link_); 249 layout->AddView(link_);
250 } 250 }
251 } 251 }
252 252
253 } // namespace views 253 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/message_box_view.h ('k') | ui/views/controls/progress_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698