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

Unified Diff: ui/base/win/accessibility_misc_utils.cc

Issue 337453002: CHR-1796: Implement UIATextProvider::get_Value method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/win/accessibility_misc_utils.h ('k') | ui/views/accessibility/native_view_accessibility_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/base/win/accessibility_misc_utils.h ('k') | ui/views/accessibility/native_view_accessibility_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698