26
edits
BradTaylor (talk | contribs) |
BradTaylor (talk | contribs) (Remove IP section, replace with OPP solution compatible with IP scenario) |
||
Line 16: | Line 16: | ||
* '''Document Object Model (DOM)''' - a in-memory tree representation of the content of a web page. | * '''Document Object Model (DOM)''' - a in-memory tree representation of the content of a web page. | ||
* '''Interprocess Communication (IPC)''' - a way of communicating betweenthread and process boundaries. | * '''Interprocess Communication (IPC)''' - a way of communicating betweenthread and process boundaries. | ||
* '''Plugin Host''' - in an out of process situation, the code which bootstraps the plugin inside of a separate process than the browser. In an in process situation, this code resides in the main process. | |||
= Related Approaches = | = Related Approaches = | ||
Line 41: | Line 42: | ||
''NOTE'': This approach should be extensible to other accessibility frameworks, e.g.: windowless Windows plugins or OS X Accessibility. | ''NOTE'': This approach should be extensible to other accessibility frameworks, e.g.: windowless Windows plugins or OS X Accessibility. | ||
To allow plugins to provide their own accessibility support in both in process (IP) and out of process (OOP) scenarios, we leverage the AT-SPI registry to coalesce accessibiles from the browser and the plugin. Two corresponding objects are involved in this process in ATK, namely <tt>AtkPlug</tt> and <tt>AtkSocket</tt>. Together, they are used to connect accessibility hierarchies in a manner that is transparent to ATs. These APIs work both for accessibles in the same process, as well as accessibles in different processes. | |||
In this example, the browser would create an <tt>AtkSocket</tt> object, and place it in the plugin's spot on the accessibility hierarchy. The plugin's host would then call <tt>NPN_GetValue</tt> with <tt>NPNVNativeAccessibleAtkPlugId</tt> as the <tt>variable</tt> parameter. | |||
In this example, the browser would create an <tt>AtkSocket</tt> object, and place it in the plugin's spot on the accessibility hierarchy | |||
Compatible plugins would return the value of <tt>atk_plug_get_id()</tt> (a <tt>char*</tt>), or <tt>NULL</tt> indicating that they do not provide remote accessibility support. | Compatible plugins would return the value of <tt>atk_plug_get_id()</tt> (a <tt>char*</tt>), or <tt>NULL</tt> indicating that they do not provide remote accessibility support. | ||
A valid return value would be remoted to the | A valid return value would be remoted (in an OOP scenario), or returned to the browser (in an IP scheme), and used to attach the plug to the socket via <tt>atk_socket_embed()</tt>. The connection that is established via AT-SPI and atk-bridge in the background should be not only transparent to ATs, but be seamless for the browser. | ||
Vendors are expected to use <tt>g_object_ref</tt> and <tt>g_object_unref</tt> as normal to manage the lifecycle of plugs and sockets. | Vendors are expected to use <tt>g_object_ref</tt> and <tt>g_object_unref</tt> as normal to manage the lifecycle of plugs and sockets. |
edits