summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorklink@chromium.org <klink@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-20 20:12:25 +0000
committerklink@chromium.org <klink@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-20 20:12:25 +0000
commit6a983b4e4d28c1e3841f39febeb6a9dd681b53b3 (patch)
treea4b5d6a01066c026338d071076db9ff7dae210f3 /chrome/browser
parentfe5a8a4ff6f5758f8dbf7e6e9578df97fb8633db (diff)
downloadchromium_src-6a983b4e4d28c1e3841f39febeb6a9dd681b53b3.zip
chromium_src-6a983b4e4d28c1e3841f39febeb6a9dd681b53b3.tar.gz
chromium_src-6a983b4e4d28c1e3841f39febeb6a9dd681b53b3.tar.bz2
Removes all use of COM and dependencies on Windows-specific classes (including the use of AccessibleBase and AccessibleDocument) in the glue accessibility implementation.Introduces the GlueAccessibilityObject, which serves as a platform-independent wrapper directly around WebKit's AccessibilityObject (also platoform-independent).Updates naming/comments to reflect the independence of IAccessible both in glue and (where appropriate) in the browser-side accessibility.
Review URL: http://codereview.chromium.org/46013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12207 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser_accessibility.cc177
-rw-r--r--chrome/browser/browser_accessibility.h15
-rw-r--r--chrome/browser/browser_accessibility_manager.cc27
-rw-r--r--chrome/browser/browser_accessibility_manager.h28
4 files changed, 173 insertions, 74 deletions
diff --git a/chrome/browser/browser_accessibility.cc b/chrome/browser/browser_accessibility.cc
index 5b84cd9..af56972 100644
--- a/chrome/browser/browser_accessibility.cc
+++ b/chrome/browser/browser_accessibility.cc
@@ -6,7 +6,8 @@
#include "base/logging.h"
#include "chrome/browser/browser_accessibility_manager.h"
-#include "chrome/common/accessibility.h"
+
+using webkit_glue::WebAccessibility;
BrowserAccessibility::BrowserAccessibility()
: iaccessible_id_(-1),
@@ -24,8 +25,8 @@ HRESULT BrowserAccessibility::accDoDefaultAction(VARIANT var_id) {
if (var_id.vt != VT_I4)
return E_INVALIDARG;
- if (!RequestAccessibilityInfo(IACCESSIBLE_FUNC_ACCDODEFAULTACTION, var_id,
- NULL, NULL)) {
+ if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_DODEFAULTACTION,
+ var_id, NULL, NULL)) {
return E_FAIL;
}
@@ -55,8 +56,8 @@ STDMETHODIMP BrowserAccessibility::accHitTest(LONG x_left, LONG y_top,
POINT p = {x_left, y_top};
::ScreenToClient(parent_hwnd(), &p);
- if (!RequestAccessibilityInfo(IACCESSIBLE_FUNC_ACCHITTEST, EmptyVariant(),
- p.x, p.y)) {
+ if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_HITTEST,
+ EmptyVariant(), p.x, p.y)) {
return E_FAIL;
}
@@ -67,7 +68,7 @@ STDMETHODIMP BrowserAccessibility::accHitTest(LONG x_left, LONG y_top,
}
if (response().output_long1 == -1) {
- if (CreateInstance(IID_IAccessible, response().iaccessible_id,
+ if (CreateInstance(IID_IAccessible, response().object_id,
reinterpret_cast<void**>(&child->pdispVal)) == S_OK) {
child->vt = VT_DISPATCH;
// Increment the reference count for the retrieved interface.
@@ -96,8 +97,8 @@ STDMETHODIMP BrowserAccessibility::accLocation(LONG* x_left, LONG* y_top,
return E_INVALIDARG;
}
- if (!RequestAccessibilityInfo(IACCESSIBLE_FUNC_ACCLOCATION, var_id, NULL,
- NULL)) {
+ if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_LOCATION, var_id,
+ NULL, NULL)) {
return E_FAIL;
}
@@ -138,8 +139,8 @@ STDMETHODIMP BrowserAccessibility::accNavigate(LONG nav_dir, VARIANT start,
return E_INVALIDARG;
}
- if (!RequestAccessibilityInfo(IACCESSIBLE_FUNC_ACCNAVIGATE, start, nav_dir,
- NULL)) {
+ if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_NAVIGATE, start,
+ nav_dir, NULL)) {
return E_FAIL;
}
@@ -150,7 +151,7 @@ STDMETHODIMP BrowserAccessibility::accNavigate(LONG nav_dir, VARIANT start,
}
if (response().output_long1 == -1) {
- if (CreateInstance(IID_IAccessible, response().iaccessible_id,
+ if (CreateInstance(IID_IAccessible, response().object_id,
reinterpret_cast<void**>(&end->pdispVal)) == S_OK) {
end->vt = VT_DISPATCH;
// Increment the reference count for the retrieved interface.
@@ -180,8 +181,8 @@ STDMETHODIMP BrowserAccessibility::get_accChild(VARIANT var_child,
if (var_child.lVal == CHILDID_SELF && iaccessible_id_ != 0)
return S_OK;
- if (!RequestAccessibilityInfo(IACCESSIBLE_FUNC_GET_ACCCHILD, var_child, NULL,
- NULL)) {
+ if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_GETCHILD, var_child,
+ NULL, NULL)) {
return E_FAIL;
}
@@ -193,7 +194,7 @@ STDMETHODIMP BrowserAccessibility::get_accChild(VARIANT var_child,
// Retrieve the IUnknown interface for the parent view, and assign the
// IDispatch returned.
- if (CreateInstance(IID_IAccessible, response().iaccessible_id,
+ if (CreateInstance(IID_IAccessible, response().object_id,
reinterpret_cast<void**>(disp_child)) == S_OK) {
// Increment the reference count for the retrieved interface.
(*disp_child)->AddRef();
@@ -212,7 +213,7 @@ STDMETHODIMP BrowserAccessibility::get_accChildCount(LONG* child_count) {
if (!child_count)
return E_INVALIDARG;
- if (!RequestAccessibilityInfo(IACCESSIBLE_FUNC_GET_ACCCHILDCOUNT,
+ if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_CHILDCOUNT,
EmptyVariant(), NULL, NULL)) {
return E_FAIL;
}
@@ -231,8 +232,8 @@ STDMETHODIMP BrowserAccessibility::get_accDefaultAction(VARIANT var_id,
if (var_id.vt != VT_I4 || !def_action)
return E_INVALIDARG;
- if (!RequestAccessibilityInfo(IACCESSIBLE_FUNC_GET_ACCDEFAULTACTION, var_id,
- NULL, NULL)) {
+ if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_DEFAULTACTION,
+ var_id, NULL, NULL)) {
return E_FAIL;
}
@@ -257,7 +258,7 @@ STDMETHODIMP BrowserAccessibility::get_accDescription(VARIANT var_id,
if (var_id.vt != VT_I4 || !desc)
return E_INVALIDARG;
- if (!RequestAccessibilityInfo(IACCESSIBLE_FUNC_GET_ACCDESCRIPTION, var_id,
+ if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_DESCRIPTION, var_id,
NULL, NULL)) {
return E_FAIL;
}
@@ -282,8 +283,8 @@ STDMETHODIMP BrowserAccessibility::get_accFocus(VARIANT* focus_child) {
if (!focus_child)
return E_INVALIDARG;
- if (!RequestAccessibilityInfo(IACCESSIBLE_FUNC_GET_ACCFOCUS, EmptyVariant(),
- NULL, NULL)) {
+ if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_GETFOCUSEDCHILD,
+ EmptyVariant(), NULL, NULL)) {
return E_FAIL;
}
@@ -294,7 +295,7 @@ STDMETHODIMP BrowserAccessibility::get_accFocus(VARIANT* focus_child) {
}
if (response().output_long1 == -1) {
- if (CreateInstance(IID_IAccessible, response().iaccessible_id,
+ if (CreateInstance(IID_IAccessible, response().object_id,
reinterpret_cast<void**>(&focus_child->pdispVal)) == S_OK) {
focus_child->vt = VT_DISPATCH;
// Increment the reference count for the retrieved interface.
@@ -319,12 +320,12 @@ STDMETHODIMP BrowserAccessibility::get_accHelp(VARIANT var_id, BSTR* help) {
if (var_id.vt != VT_I4 || !help)
return E_INVALIDARG;
- if (!RequestAccessibilityInfo(IACCESSIBLE_FUNC_GET_ACCHELP, var_id, NULL,
- NULL)) {
+ if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_HELPTEXT, var_id,
+ NULL, NULL)) {
return E_FAIL;
}
- if (!response().return_code) {
+ if (!response().return_code || response().output_string.empty()) {
// No string found.
return S_FALSE;
}
@@ -345,7 +346,7 @@ STDMETHODIMP BrowserAccessibility::get_accKeyboardShortcut(VARIANT var_id,
if (var_id.vt != VT_I4 || !acc_key)
return E_INVALIDARG;
- if (!RequestAccessibilityInfo(IACCESSIBLE_FUNC_GET_ACCKEYBOARDSHORTCUT,
+ if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_KEYBOARDSHORTCUT,
var_id, NULL, NULL)) {
return E_FAIL;
}
@@ -370,7 +371,7 @@ STDMETHODIMP BrowserAccessibility::get_accName(VARIANT var_id, BSTR* name) {
if (var_id.vt != VT_I4 || !name)
return E_INVALIDARG;
- if (!RequestAccessibilityInfo(IACCESSIBLE_FUNC_GET_ACCNAME, var_id, NULL,
+ if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_NAME, var_id, NULL,
NULL)) {
return E_FAIL;
}
@@ -411,8 +412,8 @@ STDMETHODIMP BrowserAccessibility::get_accParent(IDispatch** disp_parent) {
return S_OK;
}
- if (!RequestAccessibilityInfo(IACCESSIBLE_FUNC_GET_ACCPARENT, EmptyVariant(),
- NULL, NULL)) {
+ if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_GETPARENT,
+ EmptyVariant(), NULL, NULL)) {
return E_FAIL;
}
@@ -423,7 +424,7 @@ STDMETHODIMP BrowserAccessibility::get_accParent(IDispatch** disp_parent) {
// Retrieve the IUnknown interface for the parent view, and assign the
// IDispatch returned.
- if (CreateInstance(IID_IAccessible, response().iaccessible_id,
+ if (CreateInstance(IID_IAccessible, response().object_id,
reinterpret_cast<void**>(disp_parent)) == S_OK) {
// Increment the reference count for the retrieved interface.
(*disp_parent)->AddRef();
@@ -442,14 +443,13 @@ STDMETHODIMP BrowserAccessibility::get_accRole(VARIANT var_id, VARIANT* role) {
if (var_id.vt != VT_I4 || !role)
return E_INVALIDARG;
- if (!RequestAccessibilityInfo(IACCESSIBLE_FUNC_GET_ACCROLE, var_id, NULL,
+ if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_ROLE, var_id, NULL,
NULL)) {
return E_FAIL;
}
role->vt = VT_I4;
- role->lVal = response().output_long1;
-
+ role->lVal = MSAARole(response().output_long1);
return S_OK;
}
@@ -463,14 +463,13 @@ STDMETHODIMP BrowserAccessibility::get_accState(VARIANT var_id,
if (var_id.vt != VT_I4 || !state)
return E_INVALIDARG;
- if (!RequestAccessibilityInfo(IACCESSIBLE_FUNC_GET_ACCSTATE, var_id, NULL,
+ if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_STATE, var_id, NULL,
NULL)) {
return E_FAIL;
}
state->vt = VT_I4;
- state->lVal = response().output_long1;
-
+ state->lVal = MSAAState(response().output_long1);
return S_OK;
}
@@ -483,12 +482,12 @@ STDMETHODIMP BrowserAccessibility::get_accValue(VARIANT var_id, BSTR* value) {
if (var_id.vt != VT_I4 || !value)
return E_INVALIDARG;
- if (!RequestAccessibilityInfo(IACCESSIBLE_FUNC_GET_ACCVALUE, var_id, NULL,
+ if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_VALUE, var_id, NULL,
NULL)) {
- return E_FAIL;
+ return E_FAIL;
}
- if (!response().return_code) {
+ if (!response().return_code || response().output_string.empty()) {
// No string found.
return S_FALSE;
}
@@ -501,7 +500,7 @@ STDMETHODIMP BrowserAccessibility::get_accValue(VARIANT var_id, BSTR* value) {
STDMETHODIMP BrowserAccessibility::accSelect(LONG flags_select,
VARIANT var_id) {
- return DISP_E_MEMBERNOTFOUND;
+ return E_NOTIMPL;
}
STDMETHODIMP BrowserAccessibility::get_accHelpTopic(BSTR* help_file,
@@ -513,22 +512,22 @@ STDMETHODIMP BrowserAccessibility::get_accHelpTopic(BSTR* help_file,
if (topic_id) {
*topic_id = static_cast<LONG>(-1);
}
- return DISP_E_MEMBERNOTFOUND;
+ return E_NOTIMPL;
}
STDMETHODIMP BrowserAccessibility::get_accSelection(VARIANT* selected) {
if (selected)
selected->vt = VT_EMPTY;
- return DISP_E_MEMBERNOTFOUND;
+ return E_NOTIMPL;
}
STDMETHODIMP BrowserAccessibility::put_accName(VARIANT var_id, BSTR put_name) {
- return DISP_E_MEMBERNOTFOUND;
+ return E_NOTIMPL;
}
STDMETHODIMP BrowserAccessibility::put_accValue(VARIANT var_id, BSTR put_val) {
- return DISP_E_MEMBERNOTFOUND;
+ return E_NOTIMPL;
}
STDMETHODIMP BrowserAccessibility::CreateInstance(REFIID iid,
@@ -543,14 +542,102 @@ bool BrowserAccessibility::RequestAccessibilityInfo(int iaccessible_func_id,
VARIANT var_id, LONG input1,
LONG input2) {
return BrowserAccessibilityManager::GetInstance()->RequestAccessibilityInfo(
- iaccessible_id(), instance_id(), iaccessible_func_id, var_id, input1,
+ iaccessible_id(), instance_id(), iaccessible_func_id, var_id.lVal, input1,
input2);
}
-const AccessibilityOutParams& BrowserAccessibility::response() {
+const WebAccessibility::OutParams& BrowserAccessibility::response() {
return BrowserAccessibilityManager::GetInstance()->response();
}
HWND BrowserAccessibility::parent_hwnd() {
return BrowserAccessibilityManager::GetInstance()->parent_hwnd(instance_id());
}
+
+long BrowserAccessibility::MSAARole(long browser_accessibility_role) {
+ switch (browser_accessibility_role) {
+ case WebAccessibility::ROLE_PUSHBUTTON :
+ return ROLE_SYSTEM_PUSHBUTTON;
+ case WebAccessibility::ROLE_RADIOBUTTON :
+ return ROLE_SYSTEM_RADIOBUTTON;
+ case WebAccessibility::ROLE_CHECKBUTTON :
+ return ROLE_SYSTEM_CHECKBUTTON;
+ case WebAccessibility::ROLE_SLIDER :
+ return ROLE_SYSTEM_SLIDER;
+ case WebAccessibility::ROLE_PAGETABLIST :
+ return ROLE_SYSTEM_PAGETABLIST;
+ case WebAccessibility::ROLE_TEXT :
+ return ROLE_SYSTEM_TEXT;
+ case WebAccessibility::ROLE_STATICTEXT :
+ return ROLE_SYSTEM_STATICTEXT;
+ case WebAccessibility::ROLE_OUTLINE :
+ return ROLE_SYSTEM_OUTLINE;
+ case WebAccessibility::ROLE_COLUMN :
+ return ROLE_SYSTEM_COLUMN;
+ case WebAccessibility::ROLE_ROW :
+ return ROLE_SYSTEM_ROW;
+ case WebAccessibility::ROLE_GROUPING :
+ return ROLE_SYSTEM_GROUPING;
+ case WebAccessibility::ROLE_LIST :
+ return ROLE_SYSTEM_LIST;
+ case WebAccessibility::ROLE_TABLE :
+ return ROLE_SYSTEM_TABLE;
+ case WebAccessibility::ROLE_LINK :
+ return ROLE_SYSTEM_LINK;
+ case WebAccessibility::ROLE_GRAPHIC :
+ return ROLE_SYSTEM_GRAPHIC;
+ case WebAccessibility::ROLE_CLIENT :
+ default:
+ // This is the default role for MSAA.
+ return ROLE_SYSTEM_CLIENT;
+ }
+}
+
+long BrowserAccessibility::MSAAState(long browser_accessibility_state) {
+ long state = 0;
+
+ if ((browser_accessibility_state >> WebAccessibility::STATE_LINKED) & 1)
+ state |= STATE_SYSTEM_LINKED;
+
+ if ((browser_accessibility_state >> WebAccessibility::STATE_HOTTRACKED) & 1)
+ state |= STATE_SYSTEM_HOTTRACKED;
+
+ if ((browser_accessibility_state >> WebAccessibility::STATE_UNAVAILABLE) & 1)
+ state |= STATE_SYSTEM_UNAVAILABLE;
+
+ if ((browser_accessibility_state >> WebAccessibility::STATE_READONLY) & 1)
+ state |= STATE_SYSTEM_READONLY;
+
+ if ((browser_accessibility_state >> WebAccessibility::STATE_OFFSCREEN) & 1)
+ state |= STATE_SYSTEM_OFFSCREEN;
+
+ if ((browser_accessibility_state >>
+ WebAccessibility::STATE_MULTISELECTABLE) & 1) {
+ state |= STATE_SYSTEM_MULTISELECTABLE;
+ }
+
+ if ((browser_accessibility_state >> WebAccessibility::STATE_PROTECTED) & 1)
+ state |= STATE_SYSTEM_PROTECTED;
+
+ if ((browser_accessibility_state >>
+ WebAccessibility::STATE_INDETERMINATE) & 1) {
+ state |= STATE_SYSTEM_INDETERMINATE;
+ }
+
+ if ((browser_accessibility_state >> WebAccessibility::STATE_CHECKED) & 1)
+ state |= STATE_SYSTEM_CHECKED;
+
+ if ((browser_accessibility_state >> WebAccessibility::STATE_PRESSED) & 1)
+ state |= STATE_SYSTEM_PRESSED;
+
+ if ((browser_accessibility_state >> WebAccessibility::STATE_FOCUSED) & 1)
+ state |= STATE_SYSTEM_FOCUSED;
+
+ if ((browser_accessibility_state >> WebAccessibility::STATE_TRAVERSED) & 1)
+ state |= STATE_SYSTEM_TRAVERSED;
+
+ if ((browser_accessibility_state >> WebAccessibility::STATE_FOCUSABLE) & 1)
+ state |= STATE_SYSTEM_FOCUSABLE;
+
+ return state;
+}
diff --git a/chrome/browser/browser_accessibility.h b/chrome/browser/browser_accessibility.h
index 9582297..8b56662 100644
--- a/chrome/browser/browser_accessibility.h
+++ b/chrome/browser/browser_accessibility.h
@@ -11,8 +11,9 @@
#include <oleacc.h>
#include "base/basictypes.h"
+#include "webkit/glue/webaccessibility.h"
-struct AccessibilityOutParams;
+using webkit_glue::WebAccessibility;
////////////////////////////////////////////////////////////////////////////////
//
@@ -133,7 +134,7 @@ class ATL_NO_VTABLE BrowserAccessibility
// BrowserAccessibilityManager.
// Creates an instance of BrowserAccessibility, initializes it and sets the
- // |iaccessible_id| and |parent_id|.
+ // [iaccessible_id] and [parent_id].
STDMETHODIMP CreateInstance(REFIID iid,
int iaccessible_id,
void** interface_ptr);
@@ -146,9 +147,17 @@ class ATL_NO_VTABLE BrowserAccessibility
LONG input1, LONG input2);
// Accessors.
- const AccessibilityOutParams& response();
+ const WebAccessibility::OutParams& response();
HWND parent_hwnd();
+ // Returns a conversion from the BrowserAccessibilityRole (as defined in
+ // webkit/glue/webaccessibility.h) to an MSAA role.
+ long MSAARole(long browser_accessibility_role);
+
+ // Returns a conversion from the BrowserAccessibilityState (as defined in
+ // webkit/glue/webaccessibility.h) to MSAA states set.
+ long MSAAState(long browser_accessibility_state);
+
// Id to uniquely distinguish this instance in the render-side caching,
// mapping it to the correct IAccessible on that side. Initialized to -1.
int iaccessible_id_;
diff --git a/chrome/browser/browser_accessibility_manager.cc b/chrome/browser/browser_accessibility_manager.cc
index fa72ae5..e97e0e4 100644
--- a/chrome/browser/browser_accessibility_manager.cc
+++ b/chrome/browser/browser_accessibility_manager.cc
@@ -10,9 +10,11 @@
#include "chrome/common/notification_service.h"
#include "chrome/common/render_messages.h"
+using webkit_glue::WebAccessibility;
+
// The time in ms after which we give up and return an error when processing an
// accessibility message and no response has been received from the renderer.
-static const int kAccessibilityMessageTimeOut = 500;
+static const int kAccessibilityMessageTimeOut = 10000;
// static
BrowserAccessibilityManager* BrowserAccessibilityManager::GetInstance() {
@@ -36,7 +38,7 @@ BrowserAccessibilityManager::~BrowserAccessibilityManager() {
}
STDMETHODIMP BrowserAccessibilityManager::CreateAccessibilityInstance(
- REFIID iid, int iaccessible_id, int instance_id, void** interface_ptr) {
+ REFIID iid, int acc_obj_id, int instance_id, void** interface_ptr) {
if (IID_IUnknown == iid || IID_IDispatch == iid || IID_IAccessible == iid) {
CComObject<BrowserAccessibility>* instance = NULL;
@@ -49,7 +51,7 @@ STDMETHODIMP BrowserAccessibilityManager::CreateAccessibilityInstance(
CComPtr<IAccessible> accessibility_instance(instance);
// Set unique ids.
- instance->set_iaccessible_id(iaccessible_id);
+ instance->set_iaccessible_id(acc_obj_id);
instance->set_instance_id(instance_id);
// Retrieve the RenderWidgetHost connected to this request.
@@ -78,14 +80,14 @@ STDMETHODIMP BrowserAccessibilityManager::CreateAccessibilityInstance(
}
bool BrowserAccessibilityManager::RequestAccessibilityInfo(
- int iaccessible_id, int instance_id, int iaccessible_func_id,
- VARIANT var_id, LONG input1, LONG input2) {
- // Create and populate input message structure.
- AccessibilityInParams in_params;
-
- in_params.iaccessible_id = iaccessible_id;
- in_params.iaccessible_function_id = iaccessible_func_id;
- in_params.input_variant_lval = var_id.lVal;
+ int acc_obj_id, int instance_id, int acc_func_id, int child_id, long input1,
+ long input2) {
+ // Create and populate IPC message structure, for retrieval of accessibility
+ // information from the renderer.
+ WebAccessibility::InParams in_params;
+ in_params.object_id = acc_obj_id;
+ in_params.function_id = acc_func_id;
+ in_params.child_id = child_id;
in_params.input_long1 = input1;
in_params.input_long2 = input2;
@@ -113,11 +115,10 @@ bool BrowserAccessibilityManager::RequestAccessibilityInfo(
success = members->render_widget_host_->process()->channel()->
SendWithTimeout(msg, kAccessibilityMessageTimeOut);
}
-
return success;
}
-const AccessibilityOutParams& BrowserAccessibilityManager::response() {
+const WebAccessibility::OutParams& BrowserAccessibilityManager::response() {
return out_params_;
}
diff --git a/chrome/browser/browser_accessibility_manager.h b/chrome/browser/browser_accessibility_manager.h
index 83fe732..defcb9e 100644
--- a/chrome/browser/browser_accessibility_manager.h
+++ b/chrome/browser/browser_accessibility_manager.h
@@ -9,8 +9,8 @@
#include <hash_map>
#include "base/singleton.h"
-#include "chrome/common/accessibility.h"
#include "chrome/common/notification_observer.h"
+#include "webkit/glue/webaccessibility.h"
class BrowserAccessibility;
class RenderProcessHost;
@@ -35,24 +35,26 @@ class BrowserAccessibilityManager : public NotificationObserver {
static BrowserAccessibilityManager* GetInstance();
// Creates an instance of BrowserAccessibility, initializes it and sets the
- // iaccessible_id and parent_id.
+ // [acc_obj_id], which is used for IPC communication, and [instance_id],
+ // which is used to identify the mapping between accessibility instance and
+ // RenderProcess.
STDMETHODIMP CreateAccessibilityInstance(REFIID iid,
- int iaccessible_id,
+ int acc_obj_id,
int instance_id,
void** interface_ptr);
// Composes and sends a message for requesting needed accessibility
// information. Unused LONG input parameters should be NULL, and the VARIANT
- // an empty, valid instance.
- bool RequestAccessibilityInfo(int iaccessible_id,
+ // [var_id] an empty, valid instance.
+ bool RequestAccessibilityInfo(int acc_obj_id,
int instance_id,
- int iaccessible_func_id,
- VARIANT var_id,
- LONG input1,
- LONG input2);
+ int acc_func_id,
+ int child_id,
+ long input1,
+ long input2);
// Wrapper function, for cleaner code.
- const AccessibilityOutParams& response();
+ const webkit_glue::WebAccessibility::OutParams& response();
// Retrieves the parent HWND connected to the provided id.
HWND parent_hwnd(int id);
@@ -60,8 +62,8 @@ class BrowserAccessibilityManager : public NotificationObserver {
// Mutator, needed since constructor does not take any arguments, and to keep
// instance accessor clean.
int SetMembers(BrowserAccessibility* browser_acc,
- HWND parent_hwnd,
- RenderWidgetHost* render_widget_host);
+ HWND parent_hwnd,
+ RenderWidgetHost* render_widget_host);
// NotificationObserver implementation.
virtual void Observe(NotificationType type,
@@ -101,7 +103,7 @@ class BrowserAccessibilityManager : public NotificationObserver {
// mapping, and the connected BrowserAccessibility ids/instances invalidated.
RenderProcessHostMap render_process_host_map_;
- AccessibilityOutParams out_params_;
+ webkit_glue::WebAccessibility::OutParams out_params_;
DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager);
};