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

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

Issue 2518183002: Moved action verbs out of Blink. (Closed)
Patch Set: Added missing braces. Created 4 years 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/combobox/combobox.cc ('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/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/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 } 871 }
872 872
873 void Textfield::OnDragDone() { 873 void Textfield::OnDragDone() {
874 initiating_drag_ = false; 874 initiating_drag_ = false;
875 drop_cursor_visible_ = false; 875 drop_cursor_visible_ = false;
876 } 876 }
877 877
878 void Textfield::GetAccessibleNodeData(ui::AXNodeData* node_data) { 878 void Textfield::GetAccessibleNodeData(ui::AXNodeData* node_data) {
879 node_data->role = ui::AX_ROLE_TEXT_FIELD; 879 node_data->role = ui::AX_ROLE_TEXT_FIELD;
880 node_data->SetName(accessible_name_); 880 node_data->SetName(accessible_name_);
881 if (enabled()) {
882 node_data->AddIntAttribute(ui::AX_ATTR_ACTION,
883 ui::AX_SUPPORTED_ACTION_ACTIVATE);
884 }
881 if (read_only()) 885 if (read_only())
882 node_data->AddStateFlag(ui::AX_STATE_READ_ONLY); 886 node_data->AddStateFlag(ui::AX_STATE_READ_ONLY);
883 else 887 else
884 node_data->AddStateFlag(ui::AX_STATE_EDITABLE); 888 node_data->AddStateFlag(ui::AX_STATE_EDITABLE);
885 if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD) { 889 if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD) {
886 node_data->AddStateFlag(ui::AX_STATE_PROTECTED); 890 node_data->AddStateFlag(ui::AX_STATE_PROTECTED);
887 node_data->SetValue(base::string16(text().size(), '*')); 891 node_data->SetValue(base::string16(text().size(), '*'));
888 } else { 892 } else {
889 node_data->SetValue(text()); 893 node_data->SetValue(text());
890 } 894 }
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
2053 } 2057 }
2054 2058
2055 void Textfield::OnCursorBlinkTimerFired() { 2059 void Textfield::OnCursorBlinkTimerFired() {
2056 DCHECK(ShouldBlinkCursor()); 2060 DCHECK(ShouldBlinkCursor());
2057 gfx::RenderText* render_text = GetRenderText(); 2061 gfx::RenderText* render_text = GetRenderText();
2058 render_text->set_cursor_visible(!render_text->cursor_visible()); 2062 render_text->set_cursor_visible(!render_text->cursor_visible());
2059 RepaintCursor(); 2063 RepaintCursor();
2060 } 2064 }
2061 2065
2062 } // namespace views 2066 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/combobox/combobox.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698