OLD | NEW |
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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 WriteAttribute([defaultAttributes containsObject:requestedAttribute], | 260 WriteAttribute([defaultAttributes containsObject:requestedAttribute], |
261 StringPrintf("%s='%s'", | 261 StringPrintf("%s='%s'", |
262 requestedAttributeUTF8.c_str(), | 262 requestedAttributeUTF8.c_str(), |
263 s_value.c_str()), | 263 s_value.c_str()), |
264 &line); | 264 &line); |
265 continue; | 265 continue; |
266 } | 266 } |
267 const base::Value* value; | 267 const base::Value* value; |
268 if (dict.Get(requestedAttributeUTF8, &value)) { | 268 if (dict.Get(requestedAttributeUTF8, &value)) { |
269 std::string json_value; | 269 std::string json_value; |
270 base::JSONWriter::Write(value, &json_value); | 270 base::JSONWriter::Write(*value, &json_value); |
271 WriteAttribute( | 271 WriteAttribute( |
272 [defaultAttributes containsObject:requestedAttribute], | 272 [defaultAttributes containsObject:requestedAttribute], |
273 StringPrintf("%s=%s", | 273 StringPrintf("%s=%s", |
274 requestedAttributeUTF8.c_str(), | 274 requestedAttributeUTF8.c_str(), |
275 json_value.c_str()), | 275 json_value.c_str()), |
276 &line); | 276 &line); |
277 } | 277 } |
278 } | 278 } |
279 const base::DictionaryValue* d_value = NULL; | 279 const base::DictionaryValue* d_value = NULL; |
280 if (dict.GetDictionary(kPositionDictAttr, &d_value)) { | 280 if (dict.GetDictionary(kPositionDictAttr, &d_value)) { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 const string AccessibilityTreeFormatter::GetAllowString() { | 315 const string AccessibilityTreeFormatter::GetAllowString() { |
316 return "@MAC-ALLOW:"; | 316 return "@MAC-ALLOW:"; |
317 } | 317 } |
318 | 318 |
319 // static | 319 // static |
320 const string AccessibilityTreeFormatter::GetDenyString() { | 320 const string AccessibilityTreeFormatter::GetDenyString() { |
321 return "@MAC-DENY:"; | 321 return "@MAC-DENY:"; |
322 } | 322 } |
323 | 323 |
324 } // namespace content | 324 } // namespace content |
OLD | NEW |