Index: ui/base/win/accessibility_misc_utils.cc |
diff --git a/ui/base/win/accessibility_misc_utils.cc b/ui/base/win/accessibility_misc_utils.cc |
index 5074ce372a7999676e33c31c61a97dd09e8de279..621048ffcd81aa0016c56c96ec12d4399c8bbc89 100644 |
--- a/ui/base/win/accessibility_misc_utils.cc |
+++ b/ui/base/win/accessibility_misc_utils.cc |
@@ -14,7 +14,9 @@ UIATextProvider::UIATextProvider() |
: editable_(false) {} |
// static |
-bool UIATextProvider::CreateTextProvider(bool editable, IUnknown** provider) { |
+bool UIATextProvider::CreateTextProvider(const string16& value, |
+ bool editable, |
+ IUnknown** provider) { |
// Make sure ATL is initialized in this module. |
ui::win::CreateATLModuleIfNeeded(); |
@@ -23,6 +25,7 @@ bool UIATextProvider::CreateTextProvider(bool editable, IUnknown** provider) { |
if (SUCCEEDED(hr)) { |
DCHECK(text_provider); |
text_provider->set_editable(editable); |
+ text_provider->set_value(value); |
text_provider->AddRef(); |
*provider = static_cast<ITextProvider*>(text_provider); |
return true; |
@@ -35,5 +38,10 @@ STDMETHODIMP UIATextProvider::get_IsReadOnly(BOOL* read_only) { |
return S_OK; |
} |
+STDMETHODIMP UIATextProvider::get_Value(BSTR* value) { |
+ *value = SysAllocString(value_.c_str()); |
+ return S_OK; |
+} |
+ |
} // namespace win |
} // namespace base |