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

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

Issue 1411503005: Aura on Android: content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@auraclank_upstream_select_file
Patch Set: Addressing final comments, Mac GN build fix. Created 5 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
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_WIN) && \
102 !defined(OS_MACOSX) && \ 102 !defined(OS_MACOSX) && \
103 !defined(OS_ANDROID) && \ 103 (!defined(OS_ANDROID) || defined(USE_AURA)) && \
dmazzoni 2015/11/06 16:44:36 This has gotten too ugly. Not your fault, but one
104 !(defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11)) 104 !(defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11))
105 void AccessibilityTreeFormatter::AddProperties(const BrowserAccessibility& node, 105 void AccessibilityTreeFormatter::AddProperties(const BrowserAccessibility& node,
106 base::DictionaryValue* dict) { 106 base::DictionaryValue* dict) {
107 dict->SetInteger("id", node.GetId()); 107 dict->SetInteger("id", node.GetId());
108 } 108 }
109 109
110 base::string16 AccessibilityTreeFormatter::ToString( 110 base::string16 AccessibilityTreeFormatter::ToString(
111 const base::DictionaryValue& node) { 111 const base::DictionaryValue& node) {
112 int id_value; 112 int id_value;
113 node.GetInteger("id", &id_value); 113 node.GetInteger("id", &id_value);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 if (attr.empty()) 195 if (attr.empty())
196 return; 196 return;
197 if (!MatchesFilters(attr, include_by_default)) 197 if (!MatchesFilters(attr, include_by_default))
198 return; 198 return;
199 if (!line->empty()) 199 if (!line->empty())
200 *line += base::ASCIIToUTF16(" "); 200 *line += base::ASCIIToUTF16(" ");
201 *line += attr; 201 *line += attr;
202 } 202 }
203 203
204 } // namespace content 204 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/accessibility/browser_accessibility_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698