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

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

Issue 102593002: Convert string16 to base::string16 in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <string> 7 #include <string>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 dict->SetBoolean("invisible", !android_node->IsVisibleToUser()); 70 dict->SetBoolean("invisible", !android_node->IsVisibleToUser());
71 71
72 // String attributes. 72 // String attributes.
73 dict->SetString("name", android_node->GetText()); 73 dict->SetString("name", android_node->GetText());
74 74
75 // Int attributes. 75 // Int attributes.
76 dict->SetInteger("item_index", android_node->GetItemIndex()); 76 dict->SetInteger("item_index", android_node->GetItemIndex());
77 dict->SetInteger("item_count", android_node->GetItemCount()); 77 dict->SetInteger("item_count", android_node->GetItemCount());
78 } 78 }
79 79
80 string16 AccessibilityTreeFormatter::ToString(const DictionaryValue& dict, 80 base::string16 AccessibilityTreeFormatter::ToString(
81 const string16& indent) { 81 const DictionaryValue& dict,
82 string16 line; 82 const base::string16& indent) {
83 base::string16 line;
83 84
84 string16 class_value; 85 base::string16 class_value;
85 dict.GetString("class", &class_value); 86 dict.GetString("class", &class_value);
86 WriteAttribute(true, UTF16ToUTF8(class_value), &line); 87 WriteAttribute(true, UTF16ToUTF8(class_value), &line);
87 88
88 for (unsigned i = 0; i < arraysize(BOOL_ATTRIBUTES); i++) { 89 for (unsigned i = 0; i < arraysize(BOOL_ATTRIBUTES); i++) {
89 const char* attribute_name = BOOL_ATTRIBUTES[i]; 90 const char* attribute_name = BOOL_ATTRIBUTES[i];
90 bool value; 91 bool value;
91 if (dict.GetBoolean(attribute_name, &value) && value) 92 if (dict.GetBoolean(attribute_name, &value) && value)
92 WriteAttribute(true, attribute_name, &line); 93 WriteAttribute(true, attribute_name, &line);
93 } 94 }
94 95
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 const std::string AccessibilityTreeFormatter::GetAllowString() { 137 const std::string AccessibilityTreeFormatter::GetAllowString() {
137 return "@ANDROID-ALLOW:"; 138 return "@ANDROID-ALLOW:";
138 } 139 }
139 140
140 // static 141 // static
141 const std::string AccessibilityTreeFormatter::GetDenyString() { 142 const std::string AccessibilityTreeFormatter::GetDenyString() {
142 return "@ANDROID-DENY:"; 143 return "@ANDROID-DENY:";
143 } 144 }
144 145
145 } // namespace content 146 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698