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

Side by Side Diff: content/browser/accessibility/accessibility_tree_formatter.cc

Issue 1128183010: ATK accessibility support for web content on Aura Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing nits Created 5 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 "content/browser/accessibility/accessibility_tree_formatter.h" 5 #include "content/browser/accessibility/accessibility_tree_formatter.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 const base::ListValue* children; 91 const base::ListValue* children;
92 dict.GetList(kChildrenDictAttr, &children); 92 dict.GetList(kChildrenDictAttr, &children);
93 const base::DictionaryValue* child_dict; 93 const base::DictionaryValue* child_dict;
94 for (size_t i = 0; i < children->GetSize(); i++) { 94 for (size_t i = 0; i < children->GetSize(); i++) {
95 children->GetDictionary(i, &child_dict); 95 children->GetDictionary(i, &child_dict);
96 RecursiveFormatAccessibilityTree(*child_dict, contents, depth + 1); 96 RecursiveFormatAccessibilityTree(*child_dict, contents, depth + 1);
97 } 97 }
98 } 98 }
99 99
100 #if (!defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_ANDROID)) 100 #if (!defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \
101 !defined(OS_LINUX))
dmazzoni 2015/05/22 22:25:32 OS_LINUX will return true for Chrome OS too, I bel
101 void AccessibilityTreeFormatter::AddProperties(const BrowserAccessibility& node, 102 void AccessibilityTreeFormatter::AddProperties(const BrowserAccessibility& node,
102 base::DictionaryValue* dict) { 103 base::DictionaryValue* dict) {
103 dict->SetInteger("id", node.GetId()); 104 dict->SetInteger("id", node.GetId());
104 } 105 }
105 106
106 base::string16 AccessibilityTreeFormatter::ToString( 107 base::string16 AccessibilityTreeFormatter::ToString(
107 const base::DictionaryValue& node) { 108 const base::DictionaryValue& node) {
108 int id_value; 109 int id_value;
109 node.GetInteger("id", &id_value); 110 node.GetInteger("id", &id_value);
110 return base::IntToString16(id_value); 111 return base::IntToString16(id_value);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 if (attr.empty()) 192 if (attr.empty())
192 return; 193 return;
193 if (!MatchesFilters(attr, include_by_default)) 194 if (!MatchesFilters(attr, include_by_default))
194 return; 195 return;
195 if (!line->empty()) 196 if (!line->empty())
196 *line += base::ASCIIToUTF16(" "); 197 *line += base::ASCIIToUTF16(" ");
197 *line += attr; 198 *line += attr;
198 } 199 }
199 200
200 } // namespace content 201 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698