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

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

Issue 1391893003: NOT FOR REVIEW: Aura on Android (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 (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/pattern.h" 9 #include "base/strings/pattern.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 const base::ListValue* children; 92 const base::ListValue* children;
93 dict.GetList(kChildrenDictAttr, &children); 93 dict.GetList(kChildrenDictAttr, &children);
94 const base::DictionaryValue* child_dict; 94 const base::DictionaryValue* child_dict;
95 for (size_t i = 0; i < children->GetSize(); i++) { 95 for (size_t i = 0; i < children->GetSize(); i++) {
96 children->GetDictionary(i, &child_dict); 96 children->GetDictionary(i, &child_dict);
97 RecursiveFormatAccessibilityTree(*child_dict, contents, depth + 1); 97 RecursiveFormatAccessibilityTree(*child_dict, contents, depth + 1);
98 } 98 }
99 } 99 }
100 100
101 #if !defined(OS_WIN) && \ 101 #if (defined(OS_ANDROID) && defined(USE_AURA)) || \
102 (!defined(OS_WIN) && \
102 !defined(OS_MACOSX) && \ 103 !defined(OS_MACOSX) && \
103 !defined(OS_ANDROID) && \ 104 !defined(OS_ANDROID) && \
104 !(defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11)) 105 !(defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11)))
105 void AccessibilityTreeFormatter::AddProperties(const BrowserAccessibility& node, 106 void AccessibilityTreeFormatter::AddProperties(const BrowserAccessibility& node,
106 base::DictionaryValue* dict) { 107 base::DictionaryValue* dict) {
107 dict->SetInteger("id", node.GetId()); 108 dict->SetInteger("id", node.GetId());
108 } 109 }
109 110
110 base::string16 AccessibilityTreeFormatter::ToString( 111 base::string16 AccessibilityTreeFormatter::ToString(
111 const base::DictionaryValue& node) { 112 const base::DictionaryValue& node) {
112 int id_value; 113 int id_value;
113 node.GetInteger("id", &id_value); 114 node.GetInteger("id", &id_value);
114 return base::IntToString16(id_value); 115 return base::IntToString16(id_value);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 if (attr.empty()) 196 if (attr.empty())
196 return; 197 return;
197 if (!MatchesFilters(attr, include_by_default)) 198 if (!MatchesFilters(attr, include_by_default))
198 return; 199 return;
199 if (!line->empty()) 200 if (!line->empty())
200 *line += base::ASCIIToUTF16(" "); 201 *line += base::ASCIIToUTF16(" ");
201 *line += attr; 202 *line += attr;
202 } 203 }
203 204
204 } // namespace content 205 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698