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

Side by Side Diff: content/common/ax_content_node_data.cc

Issue 1413423003: Move some AX attrs from AXNodeData to AXTreeData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/strings/string_number_conversions.h" 5 #include "base/strings/string_number_conversions.h"
6 #include "content/common/ax_content_node_data.h" 6 #include "content/common/ax_content_node_data.h"
7 7
8 using base::IntToString; 8 using base::IntToString;
9 9
10 namespace content { 10 namespace content {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 AXContentIntAttribute attribute, int32 value) { 62 AXContentIntAttribute attribute, int32 value) {
63 content_int_attributes.push_back(std::make_pair(attribute, value)); 63 content_int_attributes.push_back(std::make_pair(attribute, value));
64 } 64 }
65 65
66 std::string AXContentNodeData::ToString() const { 66 std::string AXContentNodeData::ToString() const {
67 std::string result = AXNodeData::ToString(); 67 std::string result = AXNodeData::ToString();
68 68
69 for (auto iter : content_int_attributes) { 69 for (auto iter : content_int_attributes) {
70 std::string value = IntToString(iter.second); 70 std::string value = IntToString(iter.second);
71 switch (iter.first) { 71 switch (iter.first) {
72 case AX_CONTENT_ATTR_ROUTING_ID:
73 result += " routing_id=" + value;
74 break;
75 case AX_CONTENT_ATTR_PARENT_ROUTING_ID:
76 result += " parent_routing_id=" + value;
77 break;
78 case AX_CONTENT_ATTR_CHILD_ROUTING_ID: 72 case AX_CONTENT_ATTR_CHILD_ROUTING_ID:
79 result += " child_routing_id=" + value; 73 result += " child_routing_id=" + value;
80 break; 74 break;
81 case AX_CONTENT_ATTR_CHILD_BROWSER_PLUGIN_INSTANCE_ID: 75 case AX_CONTENT_ATTR_CHILD_BROWSER_PLUGIN_INSTANCE_ID:
82 result += " child_browser_plugin_instance_id=" + value; 76 result += " child_browser_plugin_instance_id=" + value;
83 break; 77 break;
84 case AX_CONTENT_INT_ATTRIBUTE_LAST: 78 case AX_CONTENT_INT_ATTRIBUTE_LAST:
85 NOTREACHED(); 79 NOTREACHED();
86 break; 80 break;
87 } 81 }
88 } 82 }
89 83
90 return result; 84 return result;
91 } 85 }
92 86
87 AXContentTreeData::AXContentTreeData()
88 : routing_id(-1),
89 parent_routing_id(-1) {
90 }
91
92 AXContentTreeData::~AXContentTreeData() {
93 }
94
95 std::string AXContentTreeData::ToString() const {
96 std::string result = AXTreeData::ToString();
97
98 if (routing_id != -1)
99 result += " routing_id=" + IntToString(routing_id);
100 if (parent_routing_id != -1)
101 result += " parent_routing_id=" + IntToString(parent_routing_id);
102
103 return result;
104 }
105
93 } // namespace ui 106 } // namespace ui
OLDNEW
« no previous file with comments | « content/common/ax_content_node_data.h ('k') | content/public/browser/ax_event_notification_details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698