diff options
Diffstat (limited to 'content/browser/accessibility')
20 files changed, 171 insertions, 161 deletions
diff --git a/content/browser/accessibility/accessibility_tree_formatter.cc b/content/browser/accessibility/accessibility_tree_formatter.cc index 3e03b80..af33a42 100644 --- a/content/browser/accessibility/accessibility_tree_formatter.cc +++ b/content/browser/accessibility/accessibility_tree_formatter.cc @@ -55,7 +55,7 @@ AccessibilityTreeFormatter::BuildAccessibilityTree() { } void AccessibilityTreeFormatter::FormatAccessibilityTree( - string16* contents) { + base::string16* contents) { scoped_ptr<base::DictionaryValue> dict = BuildAccessibilityTree(); RecursiveFormatAccessibilityTree(*(dict.get()), contents); } @@ -76,9 +76,10 @@ void AccessibilityTreeFormatter::RecursiveBuildAccessibilityTree( } void AccessibilityTreeFormatter::RecursiveFormatAccessibilityTree( - const base::DictionaryValue& dict, string16* contents, int depth) { - string16 line = ToString(dict, string16(depth * kIndentSpaces, ' ')); - if (line.find(ASCIIToUTF16(kSkipString)) != string16::npos) + const base::DictionaryValue& dict, base::string16* contents, int depth) { + base::string16 line = + ToString(dict, base::string16(depth * kIndentSpaces, ' ')); + if (line.find(ASCIIToUTF16(kSkipString)) != base::string16::npos) return; *contents += line; @@ -98,8 +99,9 @@ void AccessibilityTreeFormatter::AddProperties(const BrowserAccessibility& node, dict->SetInteger("id", node.renderer_id()); } -string16 AccessibilityTreeFormatter::ToString(const base::DictionaryValue& node, - const string16& indent) { +base::string16 AccessibilityTreeFormatter::ToString( + const base::DictionaryValue& node, + const base::string16& indent) { int id_value; node.GetInteger("id", &id_value); return indent + base::IntToString16(id_value) + @@ -142,7 +144,7 @@ void AccessibilityTreeFormatter::SetFilters( } bool AccessibilityTreeFormatter::MatchesFilters( - const string16& text, bool default_result) const { + const base::string16& text, bool default_result) const { std::vector<Filter>::const_iterator iter = filters_.begin(); bool allow = default_result; for (iter = filters_.begin(); iter != filters_.end(); ++iter) { @@ -158,7 +160,7 @@ bool AccessibilityTreeFormatter::MatchesFilters( return allow; } -string16 AccessibilityTreeFormatter::FormatCoordinates( +base::string16 AccessibilityTreeFormatter::FormatCoordinates( const char* name, const char* x_name, const char* y_name, const base::DictionaryValue& value) { int x, y; @@ -170,12 +172,12 @@ string16 AccessibilityTreeFormatter::FormatCoordinates( } void AccessibilityTreeFormatter::WriteAttribute( - bool include_by_default, const std::string& attr, string16* line) { + bool include_by_default, const std::string& attr, base::string16* line) { WriteAttribute(include_by_default, UTF8ToUTF16(attr), line); } void AccessibilityTreeFormatter::WriteAttribute( - bool include_by_default, const string16& attr, string16* line) { + bool include_by_default, const base::string16& attr, base::string16* line) { if (attr.empty()) return; if (!MatchesFilters(attr, include_by_default)) diff --git a/content/browser/accessibility/accessibility_tree_formatter.h b/content/browser/accessibility/accessibility_tree_formatter.h index 006ee9a..a290886 100644 --- a/content/browser/accessibility/accessibility_tree_formatter.h +++ b/content/browser/accessibility/accessibility_tree_formatter.h @@ -52,7 +52,7 @@ class CONTENT_EXPORT AccessibilityTreeFormatter { scoped_ptr<base::DictionaryValue> BuildAccessibilityTree(); // Dumps a BrowserAccessibility tree into a string. - void FormatAccessibilityTree(string16* contents); + void FormatAccessibilityTree(base::string16* contents); // A single filter specification. See GetAllowString() and GetDenyString() // for more information. @@ -62,10 +62,10 @@ class CONTENT_EXPORT AccessibilityTreeFormatter { ALLOW_EMPTY, DENY }; - string16 match_str; + base::string16 match_str; Type type; - Filter(string16 match_str, Type type) + Filter(base::string16 match_str, Type type) : match_str(match_str), type(type) {} }; @@ -100,12 +100,12 @@ class CONTENT_EXPORT AccessibilityTreeFormatter { protected: void RecursiveFormatAccessibilityTree(const BrowserAccessibility& node, - string16* contents, + base::string16* contents, int indent); void RecursiveBuildAccessibilityTree(const BrowserAccessibility& node, base::DictionaryValue* tree_node); void RecursiveFormatAccessibilityTree(const base::DictionaryValue& tree_node, - string16* contents, + base::string16* contents, int depth = 0); // Overridden by each platform to add the required attributes for each node @@ -113,27 +113,28 @@ class CONTENT_EXPORT AccessibilityTreeFormatter { void AddProperties(const BrowserAccessibility& node, base::DictionaryValue* dict); - string16 FormatCoordinates(const char* name, - const char* x_name, - const char* y_name, - const base::DictionaryValue& value); + base::string16 FormatCoordinates(const char* name, + const char* x_name, + const char* y_name, + const base::DictionaryValue& value); // Returns a platform specific representation of a BrowserAccessibility. // Should be zero or more complete lines, each with |prefix| prepended // (to indent each line). - string16 ToString(const base::DictionaryValue& node, const string16& indent); + base::string16 ToString(const base::DictionaryValue& node, + const base::string16& indent); void Initialize(); - bool MatchesFilters(const string16& text, bool default_result) const; + bool MatchesFilters(const base::string16& text, bool default_result) const; // Writes the given attribute string out to |line| if it matches the filters. void WriteAttribute(bool include_by_default, - const string16& attr, - string16* line); + const base::string16& attr, + base::string16* line); void WriteAttribute(bool include_by_default, const std::string& attr, - string16* line); + base::string16* line); BrowserAccessibility* root_; diff --git a/content/browser/accessibility/accessibility_tree_formatter_android.cc b/content/browser/accessibility/accessibility_tree_formatter_android.cc index ae34ef5..da5da24 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_android.cc +++ b/content/browser/accessibility/accessibility_tree_formatter_android.cc @@ -77,11 +77,12 @@ void AccessibilityTreeFormatter::AddProperties( dict->SetInteger("item_count", android_node->GetItemCount()); } -string16 AccessibilityTreeFormatter::ToString(const DictionaryValue& dict, - const string16& indent) { - string16 line; +base::string16 AccessibilityTreeFormatter::ToString( + const DictionaryValue& dict, + const base::string16& indent) { + base::string16 line; - string16 class_value; + base::string16 class_value; dict.GetString("class", &class_value); WriteAttribute(true, UTF16ToUTF8(class_value), &line); diff --git a/content/browser/accessibility/accessibility_tree_formatter_gtk.cc b/content/browser/accessibility/accessibility_tree_formatter_gtk.cc index 8dd6b93..0dc21ce 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_gtk.cc +++ b/content/browser/accessibility/accessibility_tree_formatter_gtk.cc @@ -37,9 +37,10 @@ void AccessibilityTreeFormatter::AddProperties(const BrowserAccessibility& node, dict->SetInteger("id", node.renderer_id()); } -string16 AccessibilityTreeFormatter::ToString(const base::DictionaryValue& node, - const string16& indent) { - string16 line; +base::string16 AccessibilityTreeFormatter::ToString( + const base::DictionaryValue& node, + const base::string16& indent) { + base::string16 line; std::string role_value; node.GetString("role", &role_value); if (!role_value.empty()) diff --git a/content/browser/accessibility/accessibility_tree_formatter_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_mac.mm index 58881b4..021b5fd 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_mac.mm +++ b/content/browser/accessibility/accessibility_tree_formatter_mac.mm @@ -161,9 +161,10 @@ void AccessibilityTreeFormatter::AddProperties(const BrowserAccessibility& node, dict->Set(kSizeDictAttr, PopulateSize(cocoa_node).release()); } -string16 AccessibilityTreeFormatter::ToString(const base::DictionaryValue& dict, - const string16& indent) { - string16 line; +base::string16 AccessibilityTreeFormatter::ToString( + const base::DictionaryValue& dict, + const base::string16& indent) { + base::string16 line; NSArray* defaultAttributes = [NSArray arrayWithObjects:NSAccessibilityTitleAttribute, NSAccessibilityValueAttribute, diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_win.cc b/content/browser/accessibility/accessibility_tree_formatter_utils_win.cc index 053e39b..e2cebc1 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_utils_win.cc +++ b/content/browser/accessibility/accessibility_tree_formatter_utils_win.cc @@ -20,10 +20,10 @@ class AccessibilityRoleStateMap { public: static AccessibilityRoleStateMap* GetInstance(); - std::map<int32, string16> ia_role_string_map; - std::map<int32, string16> ia2_role_string_map; - std::map<int32, string16> ia_state_string_map; - std::map<int32, string16> ia2_state_string_map; + std::map<int32, base::string16> ia_role_string_map; + std::map<int32, base::string16> ia2_role_string_map; + std::map<int32, base::string16> ia_state_string_map; + std::map<int32, base::string16> ia2_state_string_map; private: AccessibilityRoleStateMap(); @@ -220,44 +220,44 @@ AccessibilityRoleStateMap::AccessibilityRoleStateMap() { } // namespace. -string16 IAccessibleRoleToString(int32 ia_role) { +base::string16 IAccessibleRoleToString(int32 ia_role) { return AccessibilityRoleStateMap::GetInstance()->ia_role_string_map[ia_role]; } -string16 IAccessible2RoleToString(int32 ia_role) { +base::string16 IAccessible2RoleToString(int32 ia_role) { return AccessibilityRoleStateMap::GetInstance()->ia2_role_string_map[ia_role]; } void IAccessibleStateToStringVector(int32 ia_state, - std::vector<string16>* result) { - const std::map<int32, string16>& state_string_map = + std::vector<base::string16>* result) { + const std::map<int32, base::string16>& state_string_map = AccessibilityRoleStateMap::GetInstance()->ia_state_string_map; - std::map<int32, string16>::const_iterator it; + std::map<int32, base::string16>::const_iterator it; for (it = state_string_map.begin(); it != state_string_map.end(); ++it) { if (it->first & ia_state) result->push_back(it->second); } } -string16 IAccessibleStateToString(int32 ia_state) { - std::vector<string16> strings; +base::string16 IAccessibleStateToString(int32 ia_state) { + std::vector<base::string16> strings; IAccessibleStateToStringVector(ia_state, &strings); return JoinString(strings, ','); } void IAccessible2StateToStringVector(int32 ia2_state, - std::vector<string16>* result) { - const std::map<int32, string16>& state_string_map = + std::vector<base::string16>* result) { + const std::map<int32, base::string16>& state_string_map = AccessibilityRoleStateMap::GetInstance()->ia2_state_string_map; - std::map<int32, string16>::const_iterator it; + std::map<int32, base::string16>::const_iterator it; for (it = state_string_map.begin(); it != state_string_map.end(); ++it) { if (it->first & ia2_state) result->push_back(it->second); } } -string16 IAccessible2StateToString(int32 ia2_state) { - std::vector<string16> strings; +base::string16 IAccessible2StateToString(int32 ia2_state) { + std::vector<base::string16> strings; IAccessible2StateToStringVector(ia2_state, &strings); return JoinString(strings, ','); } diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_win.h b/content/browser/accessibility/accessibility_tree_formatter_utils_win.h index 1baf20d..86b377a 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_utils_win.h +++ b/content/browser/accessibility/accessibility_tree_formatter_utils_win.h @@ -13,14 +13,14 @@ namespace content { -CONTENT_EXPORT string16 IAccessibleRoleToString(int32 ia_role); -CONTENT_EXPORT string16 IAccessible2RoleToString(int32 ia_role); -CONTENT_EXPORT string16 IAccessibleStateToString(int32 ia_state); +CONTENT_EXPORT base::string16 IAccessibleRoleToString(int32 ia_role); +CONTENT_EXPORT base::string16 IAccessible2RoleToString(int32 ia_role); +CONTENT_EXPORT base::string16 IAccessibleStateToString(int32 ia_state); CONTENT_EXPORT void IAccessibleStateToStringVector( - int32 ia_state, std::vector<string16>* result); -CONTENT_EXPORT string16 IAccessible2StateToString(int32 ia2_state); + int32 ia_state, std::vector<base::string16>* result); +CONTENT_EXPORT base::string16 IAccessible2StateToString(int32 ia2_state); CONTENT_EXPORT void IAccessible2StateToStringVector( - int32 ia_state, std::vector<string16>* result); + int32 ia_state, std::vector<base::string16>* result); } // namespace content diff --git a/content/browser/accessibility/accessibility_tree_formatter_win.cc b/content/browser/accessibility/accessibility_tree_formatter_win.cc index 679843d..c50b526 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_win.cc +++ b/content/browser/accessibility/accessibility_tree_formatter_win.cc @@ -76,7 +76,7 @@ void AccessibilityTreeFormatter::AddProperties( if (hresult == S_OK) dict->SetString("value", msaa_variant.m_str); - std::vector<string16> state_strings; + std::vector<base::string16> state_strings; int32 ia_state = acc_obj->ia_state(); // Avoid flakiness: these states depend on whether the window is focused @@ -87,16 +87,16 @@ void AccessibilityTreeFormatter::AddProperties( IAccessibleStateToStringVector(ia_state, &state_strings); IAccessible2StateToStringVector(acc_obj->ia2_state(), &state_strings); base::ListValue* states = new base::ListValue; - for (std::vector<string16>::const_iterator it = state_strings.begin(); + for (std::vector<base::string16>::const_iterator it = state_strings.begin(); it != state_strings.end(); ++it) { states->AppendString(UTF16ToUTF8(*it)); } dict->Set("states", states); - const std::vector<string16>& ia2_attributes = acc_obj->ia2_attributes(); + const std::vector<base::string16>& ia2_attributes = acc_obj->ia2_attributes(); base::ListValue* attributes = new base::ListValue; - for (std::vector<string16>::const_iterator it = ia2_attributes.begin(); + for (std::vector<base::string16>::const_iterator it = ia2_attributes.begin(); it != ia2_attributes.end(); ++it) { attributes->AppendString(UTF16ToUTF8(*it)); @@ -199,15 +199,16 @@ void AccessibilityTreeFormatter::AddProperties( } } -string16 AccessibilityTreeFormatter::ToString(const base::DictionaryValue& dict, - const string16& indent) { - string16 line; +base::string16 AccessibilityTreeFormatter::ToString( + const base::DictionaryValue& dict, + const base::string16& indent) { + base::string16 line; - string16 role_value; + base::string16 role_value; dict.GetString("role", &role_value); WriteAttribute(true, UTF16ToUTF8(role_value), &line); - string16 name_value; + base::string16 name_value; dict.GetString("name", &name_value); WriteAttribute(true, base::StringPrintf(L"name='%ls'", name_value.c_str()), &line); @@ -220,7 +221,7 @@ string16 AccessibilityTreeFormatter::ToString(const base::DictionaryValue& dict, switch (value->GetType()) { case base::Value::TYPE_STRING: { - string16 string_value; + base::string16 string_value; value->GetAsString(&string_value); WriteAttribute(false, StringPrintf(L"%ls='%ls'", @@ -257,7 +258,7 @@ string16 AccessibilityTreeFormatter::ToString(const base::DictionaryValue& dict, for (base::ListValue::const_iterator it = list_value->begin(); it != list_value->end(); ++it) { - string16 string_value; + base::string16 string_value; if ((*it)->GetAsString(&string_value)) WriteAttribute(false, string_value, &line); } diff --git a/content/browser/accessibility/accessibility_ui.cc b/content/browser/accessibility/accessibility_ui.cc index 7808cc1..5203af6 100644 --- a/content/browser/accessibility/accessibility_ui.cc +++ b/content/browser/accessibility/accessibility_ui.cc @@ -233,7 +233,7 @@ void AccessibilityUI::RequestAccessibilityTree(const base::ListValue* args) { } scoped_ptr<AccessibilityTreeFormatter> formatter( AccessibilityTreeFormatter::Create(rvh)); - string16 accessibility_contents_utf16; + base::string16 accessibility_contents_utf16; BrowserAccessibilityManager* manager = host_view->GetBrowserAccessibilityManager(); if (!manager) { diff --git a/content/browser/accessibility/accessibility_win_browsertest.cc b/content/browser/accessibility/accessibility_win_browsertest.cc index 8131513..bb35348 100644 --- a/content/browser/accessibility/accessibility_win_browsertest.cc +++ b/content/browser/accessibility/accessibility_win_browsertest.cc @@ -226,7 +226,7 @@ class AccessibleChecker { void CheckAccessibleValue(IAccessible* accessible); void CheckAccessibleState(IAccessible* accessible); void CheckAccessibleChildren(IAccessible* accessible); - string16 RoleVariantToString(const base::win::ScopedVariant& role); + base::string16 RoleVariantToString(const base::win::ScopedVariant& role); // Expected accessible name. Checked against IAccessible::get_accName. std::wstring name_; @@ -403,13 +403,13 @@ void AccessibleChecker::CheckAccessibleChildren(IAccessible* parent) { } } -string16 AccessibleChecker::RoleVariantToString( +base::string16 AccessibleChecker::RoleVariantToString( const base::win::ScopedVariant& role) { if (role.type() == VT_I4) return IAccessibleRoleToString(V_I4(&role)); if (role.type() == VT_BSTR) - return string16(V_BSTR(&role), SysStringLen(V_BSTR(&role))); - return string16(); + return base::string16(V_BSTR(&role), SysStringLen(V_BSTR(&role))); + return base::string16(); } } // namespace diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc index 45f2201..223cd8d 100644 --- a/content/browser/accessibility/browser_accessibility.cc +++ b/content/browser/accessibility/browser_accessibility.cc @@ -444,17 +444,17 @@ bool BrowserAccessibility::GetStringAttribute( return false; } -string16 BrowserAccessibility::GetString16Attribute( +base::string16 BrowserAccessibility::GetString16Attribute( StringAttribute attribute) const { std::string value_utf8; if (!GetStringAttribute(attribute, &value_utf8)) - return string16(); + return base::string16(); return UTF8ToUTF16(value_utf8); } bool BrowserAccessibility::GetString16Attribute( StringAttribute attribute, - string16* value) const { + base::string16* value) const { std::string value_utf8; if (!GetStringAttribute(attribute, &value_utf8)) return false; @@ -522,7 +522,7 @@ bool BrowserAccessibility::GetHtmlAttribute( } bool BrowserAccessibility::GetHtmlAttribute( - const char* html_attr, string16* value) const { + const char* html_attr, base::string16* value) const { std::string value_utf8; if (!GetHtmlAttribute(html_attr, &value_utf8)) return false; @@ -537,7 +537,7 @@ bool BrowserAccessibility::GetAriaTristate( *is_defined = false; *is_mixed = false; - string16 value; + base::string16 value; if (!GetHtmlAttribute(html_attr, &value) || value.empty() || EqualsASCII(value, "undefined")) { diff --git a/content/browser/accessibility/browser_accessibility.h b/content/browser/accessibility/browser_accessibility.h index 1f858f1..701010f 100644 --- a/content/browser/accessibility/browser_accessibility.h +++ b/content/browser/accessibility/browser_accessibility.h @@ -192,7 +192,7 @@ class CONTENT_EXPORT BrowserAccessibility { // need to distinguish between the default value and a missing attribute), // and another that returns the default value for that type if the // attribute is not present. In addition, strings can be returned as - // either std::string or string16, for convenience. + // either std::string or base::string16, for convenience. bool HasBoolAttribute(AccessibilityNodeData::BoolAttribute attr) const; bool GetBoolAttribute(AccessibilityNodeData::BoolAttribute attr) const; @@ -217,8 +217,8 @@ class CONTENT_EXPORT BrowserAccessibility { std::string* value) const; bool GetString16Attribute(AccessibilityNodeData::StringAttribute attribute, - string16* value) const; - string16 GetString16Attribute( + base::string16* value) const; + base::string16 GetString16Attribute( AccessibilityNodeData::StringAttribute attribute) const; bool HasIntListAttribute( @@ -234,7 +234,7 @@ class CONTENT_EXPORT BrowserAccessibility { // Retrieve the value of a html attribute from the attribute map and // returns true if found. - bool GetHtmlAttribute(const char* attr, string16* value) const; + bool GetHtmlAttribute(const char* attr, base::string16* value) const; bool GetHtmlAttribute(const char* attr, std::string* value) const; // Utility method to handle special cases for ARIA booleans, tristates and diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc index 433c7a1..d5920be 100644 --- a/content/browser/accessibility/browser_accessibility_android.cc +++ b/content/browser/accessibility/browser_accessibility_android.cc @@ -40,7 +40,7 @@ bool BrowserAccessibilityAndroid::PlatformIsLeaf() const { return false; // Headings with text can drop their children. - string16 name = GetText(); + base::string16 name = GetText(); if (role() == blink::WebAXRoleHeading && !name.empty()) return true; @@ -168,15 +168,15 @@ const char* BrowserAccessibilityAndroid::GetClassName() const { return class_name; } -string16 BrowserAccessibilityAndroid::GetText() const { +base::string16 BrowserAccessibilityAndroid::GetText() const { if (IsIframe() || role() == blink::WebAXRoleWebArea) { - return string16(); + return base::string16(); } - string16 description = GetString16Attribute( + base::string16 description = GetString16Attribute( AccessibilityNodeData::ATTR_DESCRIPTION); - string16 text; + base::string16 text; if (!name().empty()) text = base::UTF8ToUTF16(name()); else if (!description.empty()) @@ -320,7 +320,7 @@ int BrowserAccessibilityAndroid::GetTextChangeRemovedCount() const { return (old_len - left - right); } -string16 BrowserAccessibilityAndroid::GetTextChangeBeforeText() const { +base::string16 BrowserAccessibilityAndroid::GetTextChangeBeforeText() const { return old_value_; } @@ -365,7 +365,7 @@ bool BrowserAccessibilityAndroid::HasOnlyStaticTextChildren() const { } bool BrowserAccessibilityAndroid::IsIframe() const { - string16 html_tag = GetString16Attribute( + base::string16 html_tag = GetString16Attribute( AccessibilityNodeData::ATTR_HTML_TAG); return html_tag == ASCIIToUTF16("iframe"); } @@ -383,7 +383,7 @@ void BrowserAccessibilityAndroid::PostInitialize() { if (role_ == blink::WebAXRoleAlert && first_time_) manager_->NotifyAccessibilityEvent(blink::WebAXEventAlert, this); - string16 live; + base::string16 live; if (GetString16Attribute( AccessibilityNodeData::ATTR_CONTAINER_LIVE_STATUS, &live)) { NotifyLiveRegionUpdate(live); @@ -392,12 +392,13 @@ void BrowserAccessibilityAndroid::PostInitialize() { first_time_ = false; } -void BrowserAccessibilityAndroid::NotifyLiveRegionUpdate(string16& aria_live) { +void BrowserAccessibilityAndroid::NotifyLiveRegionUpdate( + base::string16& aria_live) { if (!EqualsASCII(aria_live, aria_strings::kAriaLivePolite) && !EqualsASCII(aria_live, aria_strings::kAriaLiveAssertive)) return; - string16 text = GetText(); + base::string16 text = GetText(); if (cached_text_ != text) { if (!text.empty()) { manager_->NotifyAccessibilityEvent(blink::WebAXEventShow, diff --git a/content/browser/accessibility/browser_accessibility_android.h b/content/browser/accessibility/browser_accessibility_android.h index 7cb979b..cb882f4 100644 --- a/content/browser/accessibility/browser_accessibility_android.h +++ b/content/browser/accessibility/browser_accessibility_android.h @@ -30,7 +30,7 @@ class BrowserAccessibilityAndroid : public BrowserAccessibility { bool IsVisibleToUser() const; const char* GetClassName() const; - string16 GetText() const; + base::string16 GetText() const; int GetItemIndex() const; int GetItemCount() const; @@ -43,7 +43,7 @@ class BrowserAccessibilityAndroid : public BrowserAccessibility { int GetTextChangeFromIndex() const; int GetTextChangeAddedCount() const; int GetTextChangeRemovedCount() const; - string16 GetTextChangeBeforeText() const; + base::string16 GetTextChangeBeforeText() const; int GetSelectionStart() const; int GetSelectionEnd() const; @@ -59,12 +59,12 @@ class BrowserAccessibilityAndroid : public BrowserAccessibility { bool HasOnlyStaticTextChildren() const; bool IsIframe() const; - void NotifyLiveRegionUpdate(string16& aria_live); + void NotifyLiveRegionUpdate(base::string16& aria_live); - string16 cached_text_; + base::string16 cached_text_; bool first_time_; - string16 old_value_; - string16 new_value_; + base::string16 old_value_; + base::string16 new_value_; DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityAndroid); }; diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm index 15ac608..9364dbb 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm @@ -569,7 +569,7 @@ NSDictionary* attributeToMethodNameMap = nil; } - (NSString*)invalid { - string16 invalidUTF; + base::string16 invalidUTF; if (!browserAccessibility_->GetHtmlAttribute("aria-invalid", &invalidUTF)) return NULL; NSString* invalid = base::SysUTF16ToNSString(invalidUTF); @@ -1296,10 +1296,10 @@ NSDictionary* attributeToMethodNameMap = nil; nil]]; } else if ([role isEqualToString:NSAccessibilityRowRole]) { if (browserAccessibility_->parent()) { - string16 parentRole; + base::string16 parentRole; browserAccessibility_->parent()->GetHtmlAttribute( "role", &parentRole); - const string16 treegridRole(ASCIIToUTF16("treegrid")); + const base::string16 treegridRole(ASCIIToUTF16("treegrid")); if (parentRole == treegridRole) { [ret addObjectsFromArray:[NSArray arrayWithObjects: NSAccessibilityDisclosingAttribute, diff --git a/content/browser/accessibility/browser_accessibility_state_impl_win.cc b/content/browser/accessibility/browser_accessibility_state_impl_win.cc index 824055f..28f05e0 100644 --- a/content/browser/accessibility/browser_accessibility_state_impl_win.cc +++ b/content/browser/accessibility/browser_accessibility_state_impl_win.cc @@ -57,7 +57,7 @@ void BrowserAccessibilityStateImpl::UpdatePlatformSpecificHistograms() { for (size_t i = 0; i < module_count; i++) { TCHAR filename[MAX_PATH]; GetModuleFileName(modules[i], filename, sizeof(filename)); - string16 module_name(base::FilePath(filename).BaseName().value()); + base::string16 module_name(base::FilePath(filename).BaseName().value()); if (LowerCaseEqualsASCII(module_name, "fsdomsrv.dll")) jaws = true; if (LowerCaseEqualsASCII(module_name, "vbufbackend_gecko_ia2.dll")) diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc index 801a2d7..fe21c82 100644 --- a/content/browser/accessibility/browser_accessibility_win.cc +++ b/content/browser/accessibility/browser_accessibility_win.cc @@ -58,7 +58,7 @@ class BrowserAccessibilityRelation CONTENT_EXPORT virtual ~BrowserAccessibilityRelation() {} CONTENT_EXPORT void Initialize(BrowserAccessibilityWin* owner, - const string16& type); + const base::string16& type); CONTENT_EXPORT void AddTarget(int target_id); // IAccessibleRelation methods. @@ -75,13 +75,13 @@ class BrowserAccessibilityRelation } private: - string16 type_; + base::string16 type_; base::win::ScopedComPtr<BrowserAccessibilityWin> owner_; std::vector<int> target_ids_; }; void BrowserAccessibilityRelation::Initialize(BrowserAccessibilityWin* owner, - const string16& type) { + const base::string16& type) { owner_ = owner; type_ = type; } @@ -564,7 +564,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_accValue(VARIANT var_id, if (target->ia_role() == ROLE_SYSTEM_PROGRESSBAR || target->ia_role() == ROLE_SYSTEM_SCROLLBAR || target->ia_role() == ROLE_SYSTEM_SLIDER) { - string16 value_text = target->GetValueText(); + base::string16 value_text = target->GetValueText(); *value = SysAllocString(value_text.c_str()); DCHECK(*value); return S_OK; @@ -578,7 +578,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_accValue(VARIANT var_id, AccessibilityNodeData::ATTR_COLOR_VALUE_GREEN); int b = target->GetIntAttribute( AccessibilityNodeData::ATTR_COLOR_VALUE_BLUE); - string16 value_text; + base::string16 value_text; value_text = base::IntToString16((r * 100) / 255) + L"% red " + base::IntToString16((g * 100) / 255) + L"% green " + base::IntToString16((b * 100) / 255) + L"% blue"; @@ -684,7 +684,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_attributes(BSTR* attributes) { // The iaccessible2 attributes are a set of key-value pairs // separated by semicolons, with a colon between the key and the value. - string16 str; + base::string16 str; for (unsigned int i = 0; i < ia2_attributes_.size(); ++i) { if (i != 0) str += L';'; @@ -1133,7 +1133,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_columnDescription(long column, BrowserAccessibilityWin* cell = static_cast<BrowserAccessibilityWin*>( manager_->GetFromRendererID(cell_id)); if (cell && cell->role_ == blink::WebAXRoleColumnHeader) { - string16 cell_name = cell->GetString16Attribute( + base::string16 cell_name = cell->GetString16Attribute( AccessibilityNodeData::ATTR_NAME); if (cell_name.size() > 0) { *description = SysAllocString(cell_name.c_str()); @@ -1320,7 +1320,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_rowDescription(long row, BrowserAccessibilityWin* cell = manager_->GetFromRendererID(cell_id)->ToBrowserAccessibilityWin(); if (cell && cell->role_ == blink::WebAXRoleRowHeader) { - string16 cell_name = cell->GetString16Attribute( + base::string16 cell_name = cell->GetString16Attribute( AccessibilityNodeData::ATTR_NAME); if (cell_name.size() > 0) { *description = SysAllocString(cell_name.c_str()); @@ -1926,7 +1926,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_characterExtents( if (!out_x || !out_y || !out_width || !out_height) return E_INVALIDARG; - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); HandleSpecialTextOffset(text_str, &offset); if (offset < 0 || offset > static_cast<LONG>(text_str.size())) @@ -2010,7 +2010,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_text(LONG start_offset, if (!text) return E_INVALIDARG; - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); // Handle special text offsets. HandleSpecialTextOffset(text_str, &start_offset); @@ -2031,7 +2031,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_text(LONG start_offset, if (end_offset > len) return E_INVALIDARG; - string16 substr = text_str.substr(start_offset, end_offset - start_offset); + base::string16 substr = text_str.substr(start_offset, + end_offset - start_offset); if (substr.empty()) return S_FALSE; @@ -2061,7 +2062,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_textAtOffset( return S_FALSE; } - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); *start_offset = FindBoundary( text_str, boundary_type, offset, ui::BACKWARDS_DIRECTION); @@ -2091,7 +2092,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_textBeforeOffset( return S_FALSE; } - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); *start_offset = FindBoundary( text_str, boundary_type, offset, ui::BACKWARDS_DIRECTION); @@ -2120,7 +2121,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_textAfterOffset( return S_FALSE; } - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); *start_offset = offset; *end_offset = FindBoundary( @@ -2135,7 +2136,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_newText(IA2TextSegment* new_text) { if (!new_text) return E_INVALIDARG; - string16 text = TextForIAccessibleText(); + base::string16 text = TextForIAccessibleText(); new_text->text = SysAllocString(text.c_str()); new_text->start = 0; @@ -2196,7 +2197,7 @@ STDMETHODIMP BrowserAccessibilityWin::addSelection(LONG start_offset, if (!instance_active_) return E_FAIL; - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); HandleSpecialTextOffset(text_str, &start_offset); HandleSpecialTextOffset(text_str, &end_offset); @@ -2219,7 +2220,7 @@ STDMETHODIMP BrowserAccessibilityWin::setCaretOffset(LONG offset) { if (!instance_active_) return E_FAIL; - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); HandleSpecialTextOffset(text_str, &offset); manager_->SetTextSelection(*this, offset, offset); return S_OK; @@ -2234,7 +2235,7 @@ STDMETHODIMP BrowserAccessibilityWin::setSelection(LONG selection_index, if (selection_index != 0) return E_INVALIDARG; - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); HandleSpecialTextOffset(text_str, &start_offset); HandleSpecialTextOffset(text_str, &end_offset); @@ -2429,7 +2430,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_nodeInfo( return E_INVALIDARG; } - string16 tag; + base::string16 tag; if (GetString16Attribute(AccessibilityNodeData::ATTR_HTML_TAG, &tag)) *node_name = SysAllocString(tag.c_str()); else @@ -2522,7 +2523,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_computedStyle( // We only cache a single style property for now: DISPLAY - string16 display; + base::string16 display; if (max_style_properties == 0 || !GetString16Attribute(AccessibilityNodeData::ATTR_DISPLAY, &display)) { *num_style_properties = 0; @@ -2550,10 +2551,10 @@ STDMETHODIMP BrowserAccessibilityWin::get_computedStyleForProperties( // We only cache a single style property for now: DISPLAY for (unsigned short i = 0; i < num_style_properties; ++i) { - string16 name = (LPCWSTR)style_properties[i]; + base::string16 name = (LPCWSTR)style_properties[i]; StringToLowerASCII(&name); if (name == L"display") { - string16 display = GetString16Attribute( + base::string16 display = GetString16Attribute( AccessibilityNodeData::ATTR_DISPLAY); style_values[i] = SysAllocString(display.c_str()); } else { @@ -2713,7 +2714,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_unclippedSubstringBounds( if (!out_x || !out_y || !out_width || !out_height) return E_INVALIDARG; - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); if (start_index > text_str.size() || end_index > text_str.size() || start_index > end_index) { @@ -2738,7 +2739,7 @@ STDMETHODIMP BrowserAccessibilityWin::scrollToSubstring( if (!instance_active_) return E_FAIL; - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); if (start_index > text_str.size() || end_index > text_str.size() || start_index > end_index) { @@ -2958,7 +2959,7 @@ void BrowserAccessibilityWin::PreInitialize() { for (size_t i = 0; i < unique_cell_ids.size(); ++i) { if (unique_cell_ids[i] == renderer_id_) { ia2_attributes_.push_back( - string16(L"table-cell-index:") + base::IntToString16(i)); + base::string16(L"table-cell-index:") + base::IntToString16(i)); } } } @@ -3097,7 +3098,7 @@ void BrowserAccessibilityWin::PostInitialize() { manager_->NotifyAccessibilityEvent(blink::WebAXEventAlert, this); // Fire events if text has changed. - string16 text = TextForIAccessibleText(); + base::string16 text = TextForIAccessibleText(); if (previous_text_ != text) { if (!previous_text_.empty() && !text.empty()) { manager_->NotifyAccessibilityEvent( @@ -3185,7 +3186,7 @@ BrowserAccessibilityWin* BrowserAccessibilityWin::GetTargetFromChildID( HRESULT BrowserAccessibilityWin::GetStringAttributeAsBstr( AccessibilityNodeData::StringAttribute attribute, BSTR* value_bstr) { - string16 str; + base::string16 str; if (!GetString16Attribute(attribute, &str)) return S_FALSE; @@ -3202,7 +3203,7 @@ HRESULT BrowserAccessibilityWin::GetStringAttributeAsBstr( void BrowserAccessibilityWin::StringAttributeToIA2( AccessibilityNodeData::StringAttribute attribute, const char* ia2_attr) { - string16 value; + base::string16 value; if (GetString16Attribute(attribute, &value)) ia2_attributes_.push_back(ASCIIToUTF16(ia2_attr) + L":" + value); } @@ -3227,9 +3228,9 @@ void BrowserAccessibilityWin::IntAttributeToIA2( } } -string16 BrowserAccessibilityWin::GetValueText() { +base::string16 BrowserAccessibilityWin::GetValueText() { float fval; - string16 value = UTF8ToUTF16(value_); + base::string16 value = UTF8ToUTF16(value_); if (value.empty() && GetFloatAttribute(AccessibilityNodeData::ATTR_VALUE_FOR_RANGE, &fval)) { value = UTF8ToUTF16(base::DoubleToString(fval)); @@ -3237,15 +3238,16 @@ string16 BrowserAccessibilityWin::GetValueText() { return value; } -string16 BrowserAccessibilityWin::TextForIAccessibleText() { +base::string16 BrowserAccessibilityWin::TextForIAccessibleText() { if (IsEditableText()) return UTF8ToUTF16(value_); return (role_ == blink::WebAXRoleStaticText) ? UTF8ToUTF16(name_) : hypertext_; } -void BrowserAccessibilityWin::HandleSpecialTextOffset(const string16& text, - LONG* offset) { +void BrowserAccessibilityWin::HandleSpecialTextOffset( + const base::string16& text, + LONG* offset) { if (*offset == IA2_TEXT_OFFSET_LENGTH) *offset = static_cast<LONG>(text.size()); else if (*offset == IA2_TEXT_OFFSET_CARET) @@ -3268,7 +3270,7 @@ ui::TextBoundaryType BrowserAccessibilityWin::IA2TextBoundaryToTextBoundary( } LONG BrowserAccessibilityWin::FindBoundary( - const string16& text, + const base::string16& text, IA2TextBoundaryType ia2_boundary, LONG start_offset, ui::TextBoundaryDirection direction) { @@ -3345,7 +3347,7 @@ void BrowserAccessibilityWin::InitRoleAndState() { if (!HasState(blink::WebAXStateReadonly)) ia2_state_ |= IA2_STATE_EDITABLE; - string16 invalid; + base::string16 invalid; if (GetHtmlAttribute("aria-invalid", &invalid)) ia2_state_ |= IA2_STATE_INVALID_ENTRY; @@ -3355,7 +3357,7 @@ void BrowserAccessibilityWin::InitRoleAndState() { if (GetBoolAttribute(AccessibilityNodeData::ATTR_CAN_SET_VALUE)) ia2_state_ |= IA2_STATE_EDITABLE; - string16 html_tag = GetString16Attribute( + base::string16 html_tag = GetString16Attribute( AccessibilityNodeData::ATTR_HTML_TAG); ia_role_ = 0; ia2_role_ = 0; @@ -3469,7 +3471,7 @@ void BrowserAccessibilityWin::InitRoleAndState() { ia_state_ |= STATE_SYSTEM_READONLY; break; case blink::WebAXRoleGroup: { - string16 aria_role = GetString16Attribute( + base::string16 aria_role = GetString16Attribute( AccessibilityNodeData::ATTR_ROLE); if (aria_role == L"group" || html_tag == L"fieldset") { ia_role_ = ROLE_SYSTEM_GROUPING; @@ -3667,7 +3669,7 @@ void BrowserAccessibilityWin::InitRoleAndState() { ia_role_ = ROLE_SYSTEM_PAGETAB; break; case blink::WebAXRoleTable: { - string16 aria_role = GetString16Attribute( + base::string16 aria_role = GetString16Attribute( AccessibilityNodeData::ATTR_ROLE); if (aria_role == L"treegrid") { ia_role_ = ROLE_SYSTEM_OUTLINE; diff --git a/content/browser/accessibility/browser_accessibility_win.h b/content/browser/accessibility/browser_accessibility_win.h index 1bb6ee2..992b3d1 100644 --- a/content/browser/accessibility/browser_accessibility_win.h +++ b/content/browser/accessibility/browser_accessibility_win.h @@ -86,8 +86,8 @@ BrowserAccessibilityWin // Mappings from roles and states to human readable strings. Initialize // with |InitializeStringMaps|. - static std::map<int32, string16> role_string_map; - static std::map<int32, string16> state_string_map; + static std::map<int32, base::string16> role_string_map; + static std::map<int32, base::string16> state_string_map; CONTENT_EXPORT BrowserAccessibilityWin(); @@ -765,10 +765,10 @@ BrowserAccessibilityWin // Accessors. int32 ia_role() const { return ia_role_; } int32 ia_state() const { return ia_state_; } - const string16& role_name() const { return role_name_; } + const base::string16& role_name() const { return role_name_; } int32 ia2_role() const { return ia2_role_; } int32 ia2_state() const { return ia2_state_; } - const std::vector<string16>& ia2_attributes() const { + const std::vector<base::string16>& ia2_attributes() const { return ia2_attributes_; } @@ -813,15 +813,15 @@ BrowserAccessibilityWin // Get the value text, which might come from the floating-point // value for some roles. - string16 GetValueText(); + base::string16 GetValueText(); // Get the text of this node for the purposes of IAccessibleText - it may // be the name, it may be the value, etc. depending on the role. - string16 TextForIAccessibleText(); + base::string16 TextForIAccessibleText(); // If offset is a member of IA2TextSpecialOffsets this function updates the // value of offset and returns, otherwise offset remains unchanged. - void HandleSpecialTextOffset(const string16& text, LONG* offset); + void HandleSpecialTextOffset(const base::string16& text, LONG* offset); // Convert from a IA2TextBoundaryType to a ui::TextBoundaryType. ui::TextBoundaryType IA2TextBoundaryToTextBoundary(IA2TextBoundaryType type); @@ -829,7 +829,7 @@ BrowserAccessibilityWin // Search forwards (direction == 1) or backwards (direction == -1) // from the given offset until the given boundary is found, and // return the offset of that boundary. - LONG FindBoundary(const string16& text, + LONG FindBoundary(const base::string16& text, IA2TextBoundaryType ia2_boundary, LONG start_offset, ui::TextBoundaryDirection direction); @@ -846,26 +846,26 @@ BrowserAccessibilityWin // IAccessible role and state. int32 ia_role_; int32 ia_state_; - string16 role_name_; + base::string16 role_name_; // IAccessible2 role and state. int32 ia2_role_; int32 ia2_state_; // IAccessible2 attributes. - std::vector<string16> ia2_attributes_; + std::vector<base::string16> ia2_attributes_; // True in Initialize when the object is first created, and false // subsequent times. bool first_time_; // The previous text, before the last update to this object. - string16 previous_text_; + base::string16 previous_text_; // The old text to return in IAccessibleText::get_oldText - this is like // previous_text_ except that it's NOT updated when the object // is initialized again but the text doesn't change. - string16 old_text_; + base::string16 old_text_; // The previous state, used to see if there was a state change. int32 old_ia_state_; @@ -874,7 +874,7 @@ BrowserAccessibilityWin std::vector<BrowserAccessibilityRelation*> relations_; // The text of this node including embedded hyperlink characters. - string16 hypertext_; + base::string16 hypertext_; // Maps the |hypertext_| embedded character offset to an index in // |hyperlinks_|. diff --git a/content/browser/accessibility/browser_accessibility_win_unittest.cc b/content/browser/accessibility/browser_accessibility_win_unittest.cc index edb572f..c1159e6 100644 --- a/content/browser/accessibility/browser_accessibility_win_unittest.cc +++ b/content/browser/accessibility/browser_accessibility_win_unittest.cc @@ -219,7 +219,7 @@ TEST_F(BrowserAccessibilityTest, TestChildrenChange) { base::win::ScopedBstr name; hr = text_accessible->get_accName(childid_self, name.Receive()); ASSERT_EQ(S_OK, hr); - EXPECT_EQ(L"old text", string16(name)); + EXPECT_EQ(L"old text", base::string16(name)); name.Reset(); text_dispatch.Release(); @@ -250,7 +250,7 @@ TEST_F(BrowserAccessibilityTest, TestChildrenChange) { hr = text_accessible->get_accName(childid_self, name.Receive()); ASSERT_EQ(S_OK, hr); - EXPECT_EQ(L"new text", string16(name)); + EXPECT_EQ(L"new text", base::string16(name)); text_dispatch.Release(); text_accessible.Release(); @@ -354,7 +354,7 @@ TEST_F(BrowserAccessibilityTest, TestTextBoundaries) { base::win::ScopedBstr text; ASSERT_EQ(S_OK, text1_obj->get_text(0, text1_len, text.Receive())); - ASSERT_EQ(text1_value, base::UTF16ToUTF8(string16(text))); + ASSERT_EQ(text1_value, base::UTF16ToUTF8(base::string16(text))); text.Reset(); ASSERT_EQ(S_OK, text1_obj->get_text(0, 4, text.Receive())); @@ -452,7 +452,7 @@ TEST_F(BrowserAccessibilityTest, TestSimpleHypertext) { base::win::ScopedBstr text; ASSERT_EQ(S_OK, root_obj->get_text(0, text_len, text.Receive())); - EXPECT_EQ(text1_name + text2_name, base::UTF16ToUTF8(string16(text))); + EXPECT_EQ(text1_name + text2_name, base::UTF16ToUTF8(base::string16(text))); long hyperlink_count; ASSERT_EQ(S_OK, root_obj->get_nHyperlinks(&hyperlink_count)); @@ -548,7 +548,7 @@ TEST_F(BrowserAccessibilityTest, TestComplexHypertext) { const std::string embed = base::UTF16ToUTF8( BrowserAccessibilityWin::kEmbeddedCharacter); EXPECT_EQ(text1_name + embed + text2_name + embed, - UTF16ToUTF8(string16(text))); + UTF16ToUTF8(base::string16(text))); text.Reset(); long hyperlink_count; @@ -566,7 +566,7 @@ TEST_F(BrowserAccessibilityTest, TestComplexHypertext) { hyperlink.QueryInterface<IAccessibleText>(hypertext.Receive())); EXPECT_EQ(S_OK, hypertext->get_text(0, 3, text.Receive())); EXPECT_STREQ(button1_text_name.c_str(), - base::UTF16ToUTF8(string16(text)).c_str()); + base::UTF16ToUTF8(base::string16(text)).c_str()); text.Reset(); hyperlink.Release(); hypertext.Release(); @@ -576,7 +576,7 @@ TEST_F(BrowserAccessibilityTest, TestComplexHypertext) { hyperlink.QueryInterface<IAccessibleText>(hypertext.Receive())); EXPECT_EQ(S_OK, hypertext->get_text(0, 4, text.Receive())); EXPECT_STREQ(link1_text_name.c_str(), - base::UTF16ToUTF8(string16(text)).c_str()); + base::UTF16ToUTF8(base::string16(text)).c_str()); text.Reset(); hyperlink.Release(); hypertext.Release(); diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc index 45bf951..3dd07d8 100644 --- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc +++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc @@ -169,7 +169,7 @@ void DumpAccessibilityTreeTest::RunTest( } // Load the page. - string16 html_contents16; + base::string16 html_contents16; html_contents16 = UTF8ToUTF16(html_contents); GURL url = GetTestUrl("accessibility", html_file.BaseName().MaybeAsASCII().c_str()); @@ -191,7 +191,7 @@ void DumpAccessibilityTreeTest::RunTest( formatter.SetFilters(filters); // Perform a diff (or write the initial baseline). - string16 actual_contents_utf16; + base::string16 actual_contents_utf16; formatter.FormatAccessibilityTree(&actual_contents_utf16); std::string actual_contents = UTF16ToUTF8(actual_contents_utf16); std::vector<std::string> actual_lines, expected_lines; |