| Index: chrome/browser/browser_accessibility_win.h
|
| ===================================================================
|
| --- chrome/browser/browser_accessibility_win.h (revision 58490)
|
| +++ chrome/browser/browser_accessibility_win.h (working copy)
|
| @@ -15,6 +15,9 @@
|
|
|
| #include "chrome/browser/browser_accessibility_manager_win.h"
|
| #include "ia2_api_all.h" // Generated
|
| +#include "ISimpleDOMDocument.h" // Generated
|
| +#include "ISimpleDOMNode.h" // Generated
|
| +#include "ISimpleDOMText.h" // Generated
|
| #include "webkit/glue/webaccessibility.h"
|
|
|
| using webkit_glue::WebAccessibility;
|
| @@ -34,7 +37,10 @@
|
| &LIBID_IAccessible2Lib>,
|
| public IAccessibleImage,
|
| public IAccessibleText,
|
| - public IServiceProvider {
|
| + public IServiceProvider,
|
| + public ISimpleDOMDocument,
|
| + public ISimpleDOMNode,
|
| + public ISimpleDOMText {
|
| public:
|
| BEGIN_COM_MAP(BrowserAccessibility)
|
| COM_INTERFACE_ENTRY2(IDispatch, IAccessible2)
|
| @@ -43,6 +49,9 @@
|
| COM_INTERFACE_ENTRY(IAccessibleImage)
|
| COM_INTERFACE_ENTRY(IAccessibleText)
|
| COM_INTERFACE_ENTRY(IServiceProvider)
|
| + COM_INTERFACE_ENTRY(ISimpleDOMDocument)
|
| + COM_INTERFACE_ENTRY(ISimpleDOMNode)
|
| + COM_INTERFACE_ENTRY(ISimpleDOMText)
|
| END_COM_MAP()
|
|
|
| BrowserAccessibility();
|
| @@ -338,6 +347,129 @@
|
| }
|
|
|
| //
|
| + // ISimpleDOMDocument methods.
|
| + //
|
| +
|
| + STDMETHODIMP get_URL(BSTR* url);
|
| +
|
| + STDMETHODIMP get_title(BSTR* title);
|
| +
|
| + STDMETHODIMP get_mimeType(BSTR* mime_type);
|
| +
|
| + STDMETHODIMP get_docType(BSTR* doc_type);
|
| +
|
| + STDMETHODIMP get_nameSpaceURIForID(
|
| + short name_space_id, BSTR *name_space_uri) {
|
| + return E_NOTIMPL;
|
| + }
|
| + STDMETHODIMP put_alternateViewMediaTypes(
|
| + BSTR *comma_separated_media_types) {
|
| + return E_NOTIMPL;
|
| + }
|
| +
|
| + //
|
| + // ISimpleDOMNode methods.
|
| + //
|
| +
|
| + STDMETHODIMP get_nodeInfo(
|
| + BSTR* node_name,
|
| + short* name_space_id,
|
| + BSTR* node_value,
|
| + unsigned int* num_children,
|
| + unsigned int* unique_id,
|
| + unsigned short* node_type);
|
| +
|
| + STDMETHODIMP get_attributes(
|
| + unsigned short max_attribs,
|
| + BSTR* attrib_names,
|
| + short* name_space_id,
|
| + BSTR* attrib_values,
|
| + unsigned short* num_attribs);
|
| +
|
| + STDMETHODIMP get_attributesForNames(
|
| + unsigned short num_attribs,
|
| + BSTR* attrib_names,
|
| + short* name_space_id,
|
| + BSTR* attrib_values);
|
| +
|
| + STDMETHODIMP get_computedStyle(
|
| + unsigned short max_style_properties,
|
| + boolean use_alternate_view,
|
| + BSTR *style_properties,
|
| + BSTR *style_values,
|
| + unsigned short *num_style_properties);
|
| +
|
| + STDMETHODIMP get_computedStyleForProperties(
|
| + unsigned short num_style_properties,
|
| + boolean use_alternate_view,
|
| + BSTR* style_properties,
|
| + BSTR* style_values);
|
| +
|
| + STDMETHODIMP scrollTo(boolean placeTopLeft);
|
| +
|
| + STDMETHODIMP get_parentNode(ISimpleDOMNode** node);
|
| +
|
| + STDMETHODIMP get_firstChild(ISimpleDOMNode** node);
|
| +
|
| + STDMETHODIMP get_lastChild(ISimpleDOMNode** node);
|
| +
|
| + STDMETHODIMP get_previousSibling(ISimpleDOMNode** node);
|
| +
|
| + STDMETHODIMP get_nextSibling(ISimpleDOMNode** node);
|
| +
|
| + STDMETHODIMP get_childAt(
|
| + unsigned int child_index,
|
| + ISimpleDOMNode** node);
|
| +
|
| + STDMETHODIMP get_innerHTML(BSTR* innerHTML) {
|
| + return E_NOTIMPL;
|
| + }
|
| +
|
| + STDMETHODIMP get_localInterface(void** local_interface) {
|
| + return E_NOTIMPL;
|
| + }
|
| +
|
| + STDMETHODIMP get_language(BSTR* language) {
|
| + return E_NOTIMPL;
|
| + }
|
| +
|
| + //
|
| + // ISimpleDOMText methods.
|
| + //
|
| +
|
| + STDMETHODIMP get_domText(BSTR* dom_text);
|
| +
|
| + STDMETHODIMP get_clippedSubstringBounds(
|
| + unsigned int start_index,
|
| + unsigned int end_index,
|
| + int* x,
|
| + int* y,
|
| + int* width,
|
| + int* height) {
|
| + return E_NOTIMPL;
|
| + }
|
| +
|
| + STDMETHODIMP get_unclippedSubstringBounds(
|
| + unsigned int start_index,
|
| + unsigned int end_index,
|
| + int* x,
|
| + int* y,
|
| + int* width,
|
| + int* height) {
|
| + return E_NOTIMPL;
|
| + }
|
| +
|
| + STDMETHODIMP scrollToSubstring(
|
| + unsigned int start_index,
|
| + unsigned int end_index) {
|
| + return E_NOTIMPL;
|
| + }
|
| +
|
| + STDMETHODIMP get_fontFamily(BSTR *font_family) {
|
| + return E_NOTIMPL;
|
| + }
|
| +
|
| + //
|
| // IServiceProvider methods.
|
| //
|
|
|
| @@ -372,6 +504,15 @@
|
| // returns true if found.
|
| bool GetAttribute(WebAccessibility::Attribute attribute, string16* value);
|
|
|
| + // Retrieve the string value of an attribute from the attribute map and
|
| + // if found and nonempty, allocate a new BSTR (with SysAllocString)
|
| + // and return S_OK. If not found or empty, return S_FALSE.
|
| + HRESULT GetAttributeAsBstr(
|
| + WebAccessibility::Attribute attribute, BSTR* value_bstr);
|
| +
|
| + // Escape a string like it would be escaped for a URL or HTML form.
|
| + string16 Escape(string16 str);
|
| +
|
| // The manager of this tree of accessibility objects; needed for
|
| // global operations like focus tracking.
|
| BrowserAccessibilityManager* manager_;
|
| @@ -392,6 +533,7 @@
|
| string16 name_;
|
| string16 value_;
|
| std::map<int32, string16> attributes_;
|
| + std::vector<std::pair<string16, string16> > html_attributes_;
|
|
|
| LONG role_;
|
| LONG state_;
|
|
|