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

Side by Side Diff: ui/accessibility/ax_node_data.cc

Issue 67283004: First step to move common accessibility code out of content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Git rid of AX_EXPORT from templatized function Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/accessibility/ax_node_data.h ('k') | ui/accessibility/ax_serializable_tree.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/accessibility/ax_node_data.h"
6
7 #include <set>
8
9 #include "base/containers/hash_tables.h"
10 #include "base/strings/string_number_conversions.h"
11 #include "base/strings/string_util.h"
12 #include "base/strings/utf_string_conversions.h"
13
14 using base::DoubleToString;
15 using base::IntToString;
16
17 namespace ui {
18
19 AXNodeData::AXNodeData()
20 : id(-1),
21 role(AX_ROLE_UNKNOWN),
22 state(-1) {
23 }
24
25 AXNodeData::~AXNodeData() {
26 }
27
28 void AXNodeData::AddStringAttribute(
29 StringAttribute attribute, const std::string& value) {
30 string_attributes.push_back(std::make_pair(attribute, value));
31 }
32
33 void AXNodeData::AddIntAttribute(
34 IntAttribute attribute, int value) {
35 int_attributes.push_back(std::make_pair(attribute, value));
36 }
37
38 void AXNodeData::AddFloatAttribute(
39 FloatAttribute attribute, float value) {
40 float_attributes.push_back(std::make_pair(attribute, value));
41 }
42
43 void AXNodeData::AddBoolAttribute(
44 BoolAttribute attribute, bool value) {
45 bool_attributes.push_back(std::make_pair(attribute, value));
46 }
47
48 void AXNodeData::AddIntListAttribute(
49 IntListAttribute attribute, const std::vector<int32>& value) {
50 intlist_attributes.push_back(std::make_pair(attribute, value));
51 }
52
53 void AXNodeData::SetName(std::string name) {
54 string_attributes.push_back(std::make_pair(ATTR_NAME, name));
55 }
56
57 void AXNodeData::SetValue(std::string value) {
58 string_attributes.push_back(std::make_pair(ATTR_VALUE, value));
59 }
60
61 } // namespace ui
OLDNEW
« no previous file with comments | « ui/accessibility/ax_node_data.h ('k') | ui/accessibility/ax_serializable_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698