Chromium Code Reviews| Index: ui/views/accessibility/native_view_accessibility_win.cc |
| diff --git a/ui/views/accessibility/native_view_accessibility_win.cc b/ui/views/accessibility/native_view_accessibility_win.cc |
| index a0367fe1f1e32fa930a4799b3149ea597cd05e84..361e4f4ce497c87d0266825221b1908233e78e65 100644 |
| --- a/ui/views/accessibility/native_view_accessibility_win.cc |
| +++ b/ui/views/accessibility/native_view_accessibility_win.cc |
| @@ -607,6 +607,24 @@ STDMETHODIMP NativeViewAccessibilityWin::get_accValue( |
| return S_OK; |
| } |
| +STDMETHODIMP NativeViewAccessibilityWin::put_accValue( |
| + VARIANT var_id, BSTR new_value) { |
|
msw
2013/08/31 20:22:36
nit: these arguments should be one-per line as-per
dmazzoni
2013/09/03 20:20:11
Done.
|
| + 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 @@ STDMETHODIMP NativeViewAccessibilityWin::put_accName( |
| return E_NOTIMPL; |
| } |
| -STDMETHODIMP NativeViewAccessibilityWin::put_accValue( |
| - VARIANT var_id, BSTR put_val) { |
| - // Deprecated. |
| - return E_NOTIMPL; |
| -} |
| - |
| // |
| // IAccessible2 |
| // |