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

Unified Diff: ui/views/accessibility/native_view_accessibility_win.cc

Issue 23983039: Merge 221688 "Implement put_accvalue for textfields and location..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1599/src/
Patch Set: Created 7 years, 3 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
Index: ui/views/accessibility/native_view_accessibility_win.cc
===================================================================
--- ui/views/accessibility/native_view_accessibility_win.cc (revision 223520)
+++ ui/views/accessibility/native_view_accessibility_win.cc (working copy)
@@ -582,8 +582,8 @@
return S_OK;
}
-STDMETHODIMP NativeViewAccessibilityWin::get_accValue(
- VARIANT var_id, BSTR* value) {
+STDMETHODIMP NativeViewAccessibilityWin::get_accValue(VARIANT var_id,
+ BSTR* value) {
if (!IsValidId(var_id) || !value)
return E_INVALIDARG;
@@ -607,6 +607,24 @@
return S_OK;
}
+STDMETHODIMP NativeViewAccessibilityWin::put_accValue(VARIANT var_id,
+ BSTR new_value) {
+ if (!IsValidId(var_id) || !new_value)
+ return E_INVALIDARG;
+
+ if (!view_)
+ return E_FAIL;
+
+ // Return an error if the view can't set the value.
+ ui::AccessibleViewState state;
+ view_->GetAccessibleState(&state);
+ if (state.set_value_callback.is_null())
+ return E_FAIL;
+
+ state.set_value_callback.Run(new_value);
+ return S_OK;
+}
+
// IAccessible functions not supported.
STDMETHODIMP NativeViewAccessibilityWin::get_accSelection(VARIANT* selected) {
@@ -644,12 +662,6 @@
return E_NOTIMPL;
}
-STDMETHODIMP NativeViewAccessibilityWin::put_accValue(
- VARIANT var_id, BSTR put_val) {
- // Deprecated.
- return E_NOTIMPL;
-}
-
//
// IAccessible2
//

Powered by Google App Engine
This is Rietveld 408576698