NPAPI:NativeAccessibility: Difference between revisions

Jump to navigation Jump to search
Line 51: Line 51:


==== Out of Process Plugins ====
==== Out of Process Plugins ====
Since accessibility objects are living objects, they cannot be simply serialized over an IPC between the plugin process and the browser process.  Instead, we utilize the AT-SPI registry to coalesce accessibiles from the two processes. The two corresponding objects involved in this process using ATK are <tt>AtkPlug</tt> and <tt>AtkSocket</tt>.  Together, they are used to connect accessibility hierarchies from two different processes in a manner that is transparent to ATs.
Since accessibility objects are living objects, they cannot be simply serialized over an IPC between the plugin process and the browser process.  Instead, we utilize the AT-SPI registry to coalesce accessibiles from the two processes. 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 from different processes in a manner that is transparent to ATs.


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 out of process host would then call <tt>NPN_GetValue</tt> with <tt>NPNVNativeAccessibleAtkPlugId</tt> as the <tt>variable</tt> parameter.  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 can be remoted to the main browser process, 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 should be not only transparent to ATs, but 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.
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 out of process host would then call <tt>NPN_GetValue</tt> with <tt>NPNVNativeAccessibleAtkPlugId</tt> as the <tt>variable</tt> parameter.  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 can be remoted to the main browser process, 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 should be not only transparent to ATs, but 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.
26

edits

Navigation menu