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

Side by Side Diff: content/browser/accessibility/accessibility_tree_formatter_gtk.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 <atk/atk.h> 7 #include <atk/atk.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 19 matching lines...) Expand all
30 ListValue* states = new base::ListValue; 30 ListValue* states = new base::ListValue;
31 for (int i = ATK_STATE_INVALID; i < ATK_STATE_LAST_DEFINED; i++) { 31 for (int i = ATK_STATE_INVALID; i < ATK_STATE_LAST_DEFINED; i++) {
32 AtkStateType state_type = static_cast<AtkStateType>(i); 32 AtkStateType state_type = static_cast<AtkStateType>(i);
33 if (atk_state_set_contains_state(state_set, state_type)) 33 if (atk_state_set_contains_state(state_set, state_type))
34 states->AppendString(atk_state_type_get_name(state_type)); 34 states->AppendString(atk_state_type_get_name(state_type));
35 } 35 }
36 dict->Set("states", states); 36 dict->Set("states", states);
37 dict->SetInteger("id", node.renderer_id()); 37 dict->SetInteger("id", node.renderer_id());
38 } 38 }
39 39
40 string16 AccessibilityTreeFormatter::ToString(const base::DictionaryValue& node, 40 base::string16 AccessibilityTreeFormatter::ToString(
41 const string16& indent) { 41 const base::DictionaryValue& node,
42 string16 line; 42 const base::string16& indent) {
43 base::string16 line;
43 std::string role_value; 44 std::string role_value;
44 node.GetString("role", &role_value); 45 node.GetString("role", &role_value);
45 if (!role_value.empty()) 46 if (!role_value.empty())
46 WriteAttribute(true, base::StringPrintf("[%s]", role_value.c_str()), &line); 47 WriteAttribute(true, base::StringPrintf("[%s]", role_value.c_str()), &line);
47 48
48 std::string name_value; 49 std::string name_value;
49 node.GetString("name", &name_value); 50 node.GetString("name", &name_value);
50 WriteAttribute(true, base::StringPrintf("name='%s'", name_value.c_str()), 51 WriteAttribute(true, base::StringPrintf("name='%s'", name_value.c_str()),
51 &line); 52 &line);
52 53
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 const std::string AccessibilityTreeFormatter::GetAllowString() { 100 const std::string AccessibilityTreeFormatter::GetAllowString() {
100 return "@GTK-ALLOW:"; 101 return "@GTK-ALLOW:";
101 } 102 }
102 103
103 // static 104 // static
104 const std::string AccessibilityTreeFormatter::GetDenyString() { 105 const std::string AccessibilityTreeFormatter::GetDenyString() {
105 return "@GTK-DENY:"; 106 return "@GTK-DENY:";
106 } 107 }
107 108
108 } 109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698