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

Unified Diff: base/win/accessibility_misc_utils.h

Issue 9958139: Add support for UIA accessibility interfaces like IAccessibleEx and IRawElementProviderSimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | « base/base.gypi ('k') | base/win/accessibility_misc_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/accessibility_misc_utils.h
===================================================================
--- base/win/accessibility_misc_utils.h (revision 0)
+++ base/win/accessibility_misc_utils.h (revision 0)
@@ -0,0 +1,91 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+#ifndef BASE_WIN_ACCESSIBILITY_MISC_UTILS_H_
+#define BASE_WIN_ACCESSIBILITY_MISC_UTILS_H_
+#pragma once
+
+#include <atlbase.h>
+#include <atlcom.h>
+#include <UIAutomationCore.h>
+
+#include "base/base_export.h"
+
+namespace base {
+namespace win {
+
+ // UIA Text provider implementation for edit controls.
+class BASE_EXPORT UIATextProvider
+ : public CComObjectRootEx<CComMultiThreadModel>,
+ public IValueProvider,
+ public ITextProvider {
+ public:
+ BEGIN_COM_MAP(UIATextProvider)
+ COM_INTERFACE_ENTRY2(IUnknown, ITextProvider)
+ COM_INTERFACE_ENTRY(IValueProvider)
+ COM_INTERFACE_ENTRY(ITextProvider)
+ END_COM_MAP()
+
+ UIATextProvider();
+
+ // Creates an instance of the UIATextProvider class.
+ // Returns true on success
+ static bool CreateTextProvider(bool editable, IUnknown** provider);
+
+ void set_editable(bool editable) {
+ editable_ = editable;
+ }
+
+ //
+ // IValueProvider methods.
+ //
+ STDMETHODIMP get_IsReadOnly(BOOL* read_only);
+
+ //
+ // IValueProvider methods not implemented.
+ //
+ STDMETHODIMP SetValue(const wchar_t* val) {
+ return E_NOTIMPL;
+ }
+
+ STDMETHODIMP get_Value(BSTR* value) {
+ return E_NOTIMPL;
+ }
+
+ //
+ // ITextProvider methods.
+ //
+ STDMETHODIMP GetSelection(SAFEARRAY** ret) {
+ return E_NOTIMPL;
+ }
+
+ STDMETHODIMP GetVisibleRanges(SAFEARRAY** ret) {
+ return E_NOTIMPL;
+ }
+
+ STDMETHODIMP RangeFromChild(IRawElementProviderSimple* child,
+ ITextRangeProvider** ret) {
+ return E_NOTIMPL;
+ }
+
+ STDMETHODIMP RangeFromPoint(struct UiaPoint point,
+ ITextRangeProvider** ret) {
+ return E_NOTIMPL;
+ }
+
+ STDMETHODIMP get_DocumentRange(ITextRangeProvider** ret) {
+ return E_NOTIMPL;
+ }
+
+ STDMETHODIMP get_SupportedTextSelection(enum SupportedTextSelection* ret) {
+ return E_NOTIMPL;
+ }
+
+ private:
+ bool editable_;
+};
+
+} // win
+} // base
+
+#endif // BASE_WIN_ACCESSIBILITY_MISC_UTILS_H_
Property changes on: base\win\accessibility_misc_utils.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « base/base.gypi ('k') | base/win/accessibility_misc_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698