summaryrefslogtreecommitdiffstats
path: root/views/accessibility/view_accessibility.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-10 18:09:12 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-10 18:09:12 +0000
commite28b0fbbcde1c08e4dfbff7d4bd8e1f292892b9c (patch)
treef95fb6c3e7fad45259ac16ca3c8fccc9fde5d312 /views/accessibility/view_accessibility.cc
parent8416157dd9a3e5bd61f605e1d420d8cf6a4ef9ca (diff)
downloadchromium_src-e28b0fbbcde1c08e4dfbff7d4bd8e1f292892b9c.zip
chromium_src-e28b0fbbcde1c08e4dfbff7d4bd8e1f292892b9c.tar.gz
chromium_src-e28b0fbbcde1c08e4dfbff7d4bd8e1f292892b9c.tar.bz2
Use Scoped[Bstr,ComPtr,Variant] instead of their ATL equivalents to reduce dependencies on ATL.
BUG=5027 TEST=none Review URL: http://codereview.chromium.org/200045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25879 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/accessibility/view_accessibility.cc')
-rw-r--r--views/accessibility/view_accessibility.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/views/accessibility/view_accessibility.cc b/views/accessibility/view_accessibility.cc
index e375e10..03d03bb 100644
--- a/views/accessibility/view_accessibility.cc
+++ b/views/accessibility/view_accessibility.cc
@@ -326,7 +326,7 @@ STDMETHODIMP ViewAccessibility::get_accDefaultAction(VARIANT var_id,
GetAccessibleDefaultAction(&temp_action);
}
if (!temp_action.empty()) {
- *def_action = CComBSTR(temp_action.c_str()).Detach();
+ *def_action = SysAllocString(temp_action.c_str());
} else {
return S_FALSE;
}
@@ -350,7 +350,7 @@ STDMETHODIMP ViewAccessibility::get_accDescription(VARIANT var_id, BSTR* desc) {
view_->GetChildViewAt(var_id.lVal - 1)->GetTooltipText(0, 0, &temp_desc);
}
if (!temp_desc.empty()) {
- *desc = CComBSTR(temp_desc.c_str()).Detach();
+ *desc = SysAllocString(temp_desc.c_str());
} else {
return S_FALSE;
}
@@ -413,7 +413,7 @@ STDMETHODIMP ViewAccessibility::get_accKeyboardShortcut(VARIANT var_id,
GetAccessibleKeyboardShortcut(&temp_key);
}
if (!temp_key.empty()) {
- *acc_key = CComBSTR(temp_key.c_str()).Detach();
+ *acc_key = SysAllocString(temp_key.c_str());
} else {
return S_FALSE;
}
@@ -440,7 +440,7 @@ STDMETHODIMP ViewAccessibility::get_accName(VARIANT var_id, BSTR* name) {
}
if (!temp_name.empty()) {
// Return name retrieved.
- *name = CComBSTR(temp_name.c_str()).Detach();
+ *name = SysAllocString(temp_name.c_str());
} else {
// If view has no name, return S_FALSE.
return S_FALSE;