summaryrefslogtreecommitdiffstats
path: root/chrome/common/render_messages.h
diff options
context:
space:
mode:
authorzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-07 00:39:41 +0000
committerzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-07 00:39:41 +0000
commit2ee0e7564803f87b195d63c497a1101a2b29ab4f (patch)
tree0795001761a54463b710c58799cc41655dd842c0 /chrome/common/render_messages.h
parent3a51cfdd1775075f13dab50f6d8a9cb04bd6beb9 (diff)
downloadchromium_src-2ee0e7564803f87b195d63c497a1101a2b29ab4f.zip
chromium_src-2ee0e7564803f87b195d63c497a1101a2b29ab4f.tar.gz
chromium_src-2ee0e7564803f87b195d63c497a1101a2b29ab4f.tar.bz2
Revert 46567 - Reimplement accessibility of web content by caching the entire
accessibility tree in the browser process. Adds new RPCs for a browser tab to request accessibility info from a renderer; the renderer responds with a complete tree of accessibility metadata for the entire DOM, which is then cached in the RenderWidgetHostView. This part is crossplatform and will help with accessibility on both Windows and Mac OS X. For Windows, MSAA support for web content has been rewritten to use this new cache. Tested in JAWS and NVDA screen readers. Using Chrome with a screen reader is now fast and stable, unlike the previous implementation. However, note that most advanced functionality is still not supported, and much work remains to make Chrome work well with a screen reader. This is a necessary step to improve stability first. BUG=25564 BUG=13291 TEST=See http://codereview.chromium.org/1806001 Review URL: http://codereview.chromium.org/1637018 TBR=dmazzoni@chromium.org Review URL: http://codereview.chromium.org/2031004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46642 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages.h')
-rw-r--r--chrome/common/render_messages.h141
1 files changed, 75 insertions, 66 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 7f6ce16..3770fe2 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -711,6 +711,80 @@ struct ParamTraits<FilterPolicy::Type> {
};
template <>
+struct ParamTraits<webkit_glue::WebAccessibility::InParams> {
+ typedef webkit_glue::WebAccessibility::InParams param_type;
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.object_id);
+ WriteParam(m, p.function_id);
+ WriteParam(m, p.child_id);
+ WriteParam(m, p.input_long1);
+ WriteParam(m, p.input_long2);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->object_id) &&
+ ReadParam(m, iter, &p->function_id) &&
+ ReadParam(m, iter, &p->child_id) &&
+ ReadParam(m, iter, &p->input_long1) &&
+ ReadParam(m, iter, &p->input_long2);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.object_id, l);
+ l->append(L", ");
+ LogParam(p.function_id, l);
+ l->append(L", ");
+ LogParam(p.child_id, l);
+ l->append(L", ");
+ LogParam(p.input_long1, l);
+ l->append(L", ");
+ LogParam(p.input_long2, l);
+ l->append(L")");
+ }
+};
+
+template <>
+struct ParamTraits<webkit_glue::WebAccessibility::OutParams> {
+ typedef webkit_glue::WebAccessibility::OutParams param_type;
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.object_id);
+ WriteParam(m, p.output_long1);
+ WriteParam(m, p.output_long2);
+ WriteParam(m, p.output_long3);
+ WriteParam(m, p.output_long4);
+ WriteParam(m, p.output_string);
+ WriteParam(m, p.return_code);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->object_id) &&
+ ReadParam(m, iter, &p->output_long1) &&
+ ReadParam(m, iter, &p->output_long2) &&
+ ReadParam(m, iter, &p->output_long3) &&
+ ReadParam(m, iter, &p->output_long4) &&
+ ReadParam(m, iter, &p->output_string) &&
+ ReadParam(m, iter, &p->return_code);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.object_id, l);
+ l->append(L", ");
+ LogParam(p.output_long1, l);
+ l->append(L", ");
+ LogParam(p.output_long2, l);
+ l->append(L", ");
+ LogParam(p.output_long3, l);
+ l->append(L", ");
+ LogParam(p.output_long4, l);
+ l->append(L", ");
+ LogParam(p.output_string, l);
+ l->append(L", ");
+ LogParam(p.return_code, l);
+ l->append(L")");
+ }
+};
+
+template <>
struct ParamTraits<ViewHostMsg_ImeControl> {
typedef ViewHostMsg_ImeControl param_type;
static void Write(Message* m, const param_type& p) {
@@ -2594,74 +2668,9 @@ struct ParamTraits<WindowContainerType> {
}
};
-template <>
-struct ParamTraits<webkit_glue::WebAccessibility> {
- typedef webkit_glue::WebAccessibility param_type;
- static void Write(Message* m, const param_type& p) {
- WriteParam(m, p.id);
- WriteParam(m, p.name);
- WriteParam(m, p.value);
- WriteParam(m, p.action);
- WriteParam(m, p.description);
- WriteParam(m, p.help);
- WriteParam(m, p.shortcut);
- WriteParam(m, static_cast<int>(p.role));
- WriteParam(m, static_cast<int>(p.state));
- WriteParam(m, p.location);
- WriteParam(m, p.children);
- }
- static bool Read(const Message* m, void** iter, param_type* p) {
- bool ret = ReadParam(m, iter, &p->id);
- ret = ret && ReadParam(m, iter, &p->name);
- ret = ret && ReadParam(m, iter, &p->value);
- ret = ret && ReadParam(m, iter, &p->action);
- ret = ret && ReadParam(m, iter, &p->description);
- ret = ret && ReadParam(m, iter, &p->help);
- ret = ret && ReadParam(m, iter, &p->shortcut);
- int role = -1;
- ret = ret && ReadParam(m, iter, &role);
- if (role >= webkit_glue::WebAccessibility::ROLE_NONE &&
- role < webkit_glue::WebAccessibility::NUM_ROLES) {
- p->role = static_cast<webkit_glue::WebAccessibility::Role>(role);
- } else {
- p->role = webkit_glue::WebAccessibility::ROLE_NONE;
- }
- int state = 0;
- ret = ret && ReadParam(m, iter, &state);
- p->state = static_cast<webkit_glue::WebAccessibility::State>(state);
- ret = ret && ReadParam(m, iter, &p->location);
- ret = ret && ReadParam(m, iter, &p->children);
- return ret;
- }
- static void Log(const param_type& p, std::wstring* l) {
- l->append(L"(");
- LogParam(p.id, l);
- l->append(L", ");
- LogParam(p.name, l);
- l->append(L", ");
- LogParam(p.value, l);
- l->append(L", ");
- LogParam(p.action, l);
- l->append(L", ");
- LogParam(p.description, l);
- l->append(L", ");
- LogParam(p.help, l);
- l->append(L", ");
- LogParam(p.shortcut, l);
- l->append(L", ");
- LogParam(static_cast<int>(p.role), l);
- l->append(L", ");
- LogParam(static_cast<int>(p.state), l);
- l->append(L", ");
- LogParam(p.location, l);
- l->append(L", ");
- LogParam(p.children, l);
- l->append(L")");
- }
-};
-
} // namespace IPC
+
#define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h"
#include "ipc/ipc_message_macros.h"