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

Side by Side Diff: content/browser/accessibility/accessibility_tree_formatter_mac.mm

Issue 121033002: Update uses of UTF conversions in content/ to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | Annotate | Revision Log
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 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 base::string16 AccessibilityTreeFormatter::ToString( 164 base::string16 AccessibilityTreeFormatter::ToString(
165 const base::DictionaryValue& dict, 165 const base::DictionaryValue& dict,
166 const base::string16& indent) { 166 const base::string16& indent) {
167 base::string16 line; 167 base::string16 line;
168 NSArray* defaultAttributes = 168 NSArray* defaultAttributes =
169 [NSArray arrayWithObjects:NSAccessibilityTitleAttribute, 169 [NSArray arrayWithObjects:NSAccessibilityTitleAttribute,
170 NSAccessibilityValueAttribute, 170 NSAccessibilityValueAttribute,
171 nil]; 171 nil];
172 string s_value; 172 string s_value;
173 dict.GetString(SysNSStringToUTF8(NSAccessibilityRoleAttribute), &s_value); 173 dict.GetString(SysNSStringToUTF8(NSAccessibilityRoleAttribute), &s_value);
174 WriteAttribute(true, UTF8ToUTF16(s_value), &line); 174 WriteAttribute(true, base::UTF8ToUTF16(s_value), &line);
175 175
176 string subroleAttribute = SysNSStringToUTF8(NSAccessibilitySubroleAttribute); 176 string subroleAttribute = SysNSStringToUTF8(NSAccessibilitySubroleAttribute);
177 if (dict.GetString(subroleAttribute, &s_value)) { 177 if (dict.GetString(subroleAttribute, &s_value)) {
178 WriteAttribute(false, 178 WriteAttribute(false,
179 StringPrintf("%s=%s", 179 StringPrintf("%s=%s",
180 subroleAttribute.c_str(), s_value.c_str()), 180 subroleAttribute.c_str(), s_value.c_str()),
181 &line); 181 &line);
182 } 182 }
183 183
184 CR_DEFINE_STATIC_LOCAL(NSArray*, all_attributes, (BuildAllAttributesArray())); 184 CR_DEFINE_STATIC_LOCAL(NSArray*, all_attributes, (BuildAllAttributesArray()));
(...skipping 26 matching lines...) Expand all
211 *d_value), 211 *d_value),
212 &line); 212 &line);
213 } 213 }
214 if (dict.GetDictionary(kSizeDictAttr, &d_value)) { 214 if (dict.GetDictionary(kSizeDictAttr, &d_value)) {
215 WriteAttribute(false, 215 WriteAttribute(false,
216 FormatCoordinates(kSizeDictAttr, 216 FormatCoordinates(kSizeDictAttr,
217 kWidthDictAttr, kHeightDictAttr, *d_value), 217 kWidthDictAttr, kHeightDictAttr, *d_value),
218 &line); 218 &line);
219 } 219 }
220 220
221 return indent + line + ASCIIToUTF16("\n"); 221 return indent + line + base::ASCIIToUTF16("\n");
222 } 222 }
223 223
224 // static 224 // static
225 const base::FilePath::StringType 225 const base::FilePath::StringType
226 AccessibilityTreeFormatter::GetActualFileSuffix() { 226 AccessibilityTreeFormatter::GetActualFileSuffix() {
227 return FILE_PATH_LITERAL("-actual-mac.txt"); 227 return FILE_PATH_LITERAL("-actual-mac.txt");
228 } 228 }
229 229
230 // static 230 // static
231 const base::FilePath::StringType 231 const base::FilePath::StringType
(...skipping 10 matching lines...) Expand all
242 const string AccessibilityTreeFormatter::GetAllowString() { 242 const string AccessibilityTreeFormatter::GetAllowString() {
243 return "@MAC-ALLOW:"; 243 return "@MAC-ALLOW:";
244 } 244 }
245 245
246 // static 246 // static
247 const string AccessibilityTreeFormatter::GetDenyString() { 247 const string AccessibilityTreeFormatter::GetDenyString() {
248 return "@MAC-DENY:"; 248 return "@MAC-DENY:";
249 } 249 }
250 250
251 } // namespace content 251 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698