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

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

Issue 2863703003: A11y: Rename AXSupportedAction to AXDefaultActionVerb. (Closed)
Patch Set: Rebase. Created 3 years, 7 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
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/textfield/textfield.h" 5 #include "ui/views/controls/textfield/textfield.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 901
902 void Textfield::OnDragDone() { 902 void Textfield::OnDragDone() {
903 initiating_drag_ = false; 903 initiating_drag_ = false;
904 drop_cursor_visible_ = false; 904 drop_cursor_visible_ = false;
905 } 905 }
906 906
907 void Textfield::GetAccessibleNodeData(ui::AXNodeData* node_data) { 907 void Textfield::GetAccessibleNodeData(ui::AXNodeData* node_data) {
908 node_data->role = ui::AX_ROLE_TEXT_FIELD; 908 node_data->role = ui::AX_ROLE_TEXT_FIELD;
909 node_data->SetName(accessible_name_); 909 node_data->SetName(accessible_name_);
910 if (enabled()) { 910 if (enabled()) {
911 node_data->AddIntAttribute(ui::AX_ATTR_ACTION, 911 node_data->AddIntAttribute(ui::AX_ATTR_DEFAULT_ACTION_VERB,
912 ui::AX_SUPPORTED_ACTION_ACTIVATE); 912 ui::AX_DEFAULT_ACTION_VERB_ACTIVATE);
913 } 913 }
914 if (read_only()) 914 if (read_only())
915 node_data->AddState(ui::AX_STATE_READ_ONLY); 915 node_data->AddState(ui::AX_STATE_READ_ONLY);
916 else 916 else
917 node_data->AddState(ui::AX_STATE_EDITABLE); 917 node_data->AddState(ui::AX_STATE_EDITABLE);
918 if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD) { 918 if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD) {
919 node_data->AddState(ui::AX_STATE_PROTECTED); 919 node_data->AddState(ui::AX_STATE_PROTECTED);
920 node_data->SetValue(base::string16(text().size(), '*')); 920 node_data->SetValue(base::string16(text().size(), '*'));
921 } else { 921 } else {
922 node_data->SetValue(text()); 922 node_data->SetValue(text());
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
2098 cursor_blink_timer_.Stop(); 2098 cursor_blink_timer_.Stop();
2099 } 2099 }
2100 2100
2101 void Textfield::OnCursorBlinkTimerFired() { 2101 void Textfield::OnCursorBlinkTimerFired() {
2102 DCHECK(ShouldBlinkCursor()); 2102 DCHECK(ShouldBlinkCursor());
2103 cursor_view_.SetVisible(!cursor_view_.visible()); 2103 cursor_view_.SetVisible(!cursor_view_.visible());
2104 UpdateCursorViewPosition(); 2104 UpdateCursorViewPosition();
2105 } 2105 }
2106 2106
2107 } // namespace views 2107 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698