gecko-dev/accessible/windows/msaa
Aaron Klotz b836337e81 Bug 1303060: Changes to a11y to enable the serving of a COM handler; r=tbsaunde
MozReview-Commit-ID: GTQF3x1pBtX

A general outline of the COM handler (a.k.a. the "smart proxy"):

COM handlers are pieces of code that are loaded by the COM runtime along with
a proxy and are layered above that proxy. This enables the COM handler to
interpose itself between the caller and the proxy, thus providing the
opportunity for the handler to manipulate an interface's method calls before
those calls reach the proxy.

Handlers are regular COM components that live in DLLs and are declared in the
Windows registry. In order to allow for the specifying of a handler (and an
optional payload to be sent with the proxy), the mscom library allows its
clients to specify an implementation of the IHandlerProvider interface.

IHandlerProvider consists of 5 functions:

* GetHandler returns the CLSID of the component that should be loaded into
  the COM client's process. If GetHandler returns a failure code, then no
  handler is loaded.
* GetHandlerPayloadSize and WriteHandlerPayload are for obtaining the payload
  data. These calls are made on a background thread but need to do their work
  on the main thread. We declare the payload struct in IDL. MIDL generates two
  functions, IA2Payload_Encode and IA2Payload_Decode, which are used by
  mscom::StructToStream to read and write that struct to and from buffers.
* The a11y payload struct also includes an interface, IGeckoBackChannel, that
  allows the handler to communicate directly with Gecko. IGeckoBackChannel
  currently provides two methods: one to allow the handler to request fresh
  cache information, and the other to provide Gecko with its IHandlerControl
  interface.
* MarshalAs accepts an IID that specifies the interface that is about to be
  proxied. We may want to send a more sophisticated proxy than the one that
  is requested. The desired IID is returned by this function. In the case of
  a11y interfaces, we should always return IAccessible2_3 if we are asked for
  one of its parent interfaces. This allows us to eliminate round trips to
  resolve more sophisticated interfaces later on.
* NewInstance, which is needed to ensure that all descendent proxies are also
  imbued with the same handler code.

The main focus of this patch is as follows:

1. Provide an implementation of the IHandlerProvider interface;
2. Populate the handler payload (ie, the cache) with data;
3. Modify CreateHolderFromAccessible to specify the HandlerPayload object;
4. Receive the IHandlerControl interface from the handler DLL and move it
   into the chrome process.

Some more information about IHandlerControl:

There is one IHandlerControl per handler DLL instance. It is the interface that
we call in Gecko when we need to dispatch an event to the handler. In order to
ensure that events are dispatched in the correct order, we need to dispatch
those events from the chrome main thread so that they occur in sequential order
with calls to NotifyWinEvent.

--HG--
extra : rebase_source : acb44dead7cc5488424720e1bf58862b7b30374f
2017-04-04 15:23:55 -06:00
..
AccessibleWrap.cpp Bug 1303060: Changes to a11y to enable the serving of a COM handler; r=tbsaunde 2017-04-04 15:23:55 -06:00
AccessibleWrap.h Bug 1303060: Changes to a11y to enable the serving of a COM handler; r=tbsaunde 2017-04-04 15:23:55 -06:00
ApplicationAccessibleWrap.cpp Bug 1323055: Remove A11Y_TRYBLOCK_* from Windows a11y code; r=tbsaunde 2016-12-20 13:41:24 -07:00
ApplicationAccessibleWrap.h Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj 2015-03-21 12:28:04 -04:00
ARIAGridAccessibleWrap.cpp
ARIAGridAccessibleWrap.h Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj 2015-03-21 12:28:04 -04:00
Compatibility.cpp
Compatibility.h Bug 1198459 - Prevent accessibility from initializing in content processes when e10s is running. r=tbsaunde 2015-12-10 14:28:33 -05:00
DocAccessibleWrap.cpp Bug 1339779 - bail early if ipcDoc is not yet created. r=tbsaunde 2017-02-25 17:18:30 -05:00
DocAccessibleWrap.h Bug 1297549: Part 1 - Use chrome-generated MSAA IDs in content; r=tbsaunde 2016-09-19 13:58:15 -06:00
EnumVariant.cpp Bug 1323055: Remove A11Y_TRYBLOCK_* from Windows a11y code; r=tbsaunde 2016-12-20 13:41:24 -07:00
EnumVariant.h Bug 1322465 part 1 - Use explicit/MOZ_IMPLICIT for the unary constructors in accessible/. r=Ehsan 2016-12-16 15:43:21 +08:00
GeckoCustom.cpp Bug 1335825 - Provide full state bitfield to xpcom accessibles in Windows. r=yzen 2017-02-03 15:22:09 -08:00
GeckoCustom.h Bug 1335825 - Provide full state bitfield to xpcom accessibles in Windows. r=yzen 2017-02-03 15:22:09 -08:00
HTMLTableAccessibleWrap.cpp
HTMLTableAccessibleWrap.h Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj 2015-03-21 12:28:04 -04:00
HTMLWin32ObjectAccessible.cpp Bug 1320192: Ensure that we return a null native accessible if GetWindow(GW_CHILD) on a windowed plugin fails; r=tbsaunde 2016-12-07 09:37:36 -10:00
HTMLWin32ObjectAccessible.h Bug 1319640: Make obtaining of plugin IAccessible go through Chrome process on Sandboxed builds; r=tbsaunde 2016-12-03 16:07:24 -07:00
HyperTextAccessibleWrap.cpp bug 1192330 - add ia2AccessibleText::UpdateTextChangeData r=surkov 2015-08-19 12:48:58 -04:00
HyperTextAccessibleWrap.h bug 1192330 - remove ia2AccessibleText::GetModifiedText() r=surkov 2015-08-19 12:48:58 -04:00
IDSet.h Bug 1304449: Part 1 - Modify MSAA IDs to be partitioned based on content id; r=tbsaunde 2016-10-05 17:52:23 -06:00
ImageAccessibleWrap.cpp
ImageAccessibleWrap.h
IUnknownImpl.cpp Bug 1323055: Remove A11Y_TRYBLOCK_* from Windows a11y code; r=tbsaunde 2016-12-20 13:41:24 -07:00
IUnknownImpl.h Bug 1323055: Remove A11Y_TRYBLOCK_* from Windows a11y code; r=tbsaunde 2016-12-20 13:41:24 -07:00
moz.build Bug 1206711 - add support for HWND emulation for content top level docs on Windows. r=tbsaunde 2017-01-24 09:45:25 -05:00
MsaaIdGenerator.cpp Bug 1310833: Modify PContentParent::SendActivateA11y to accept the content process's MSAA ID as a parameter; r=tbsaunde 2016-10-20 12:34:16 -06:00
MsaaIdGenerator.h Bug 1310833: Modify PContentParent::SendActivateA11y to accept the content process's MSAA ID as a parameter; r=tbsaunde 2016-10-20 12:34:16 -06:00
nsEventMap.h bug 1213402 - fixup silly array , on windows r=me landing on a CLOSED TREE 2015-11-10 17:39:27 -05:00
nsWinUtils.cpp Bug 1206711 - add support for HWND emulation for content top level docs on Windows. r=tbsaunde 2017-01-24 09:45:25 -05:00
nsWinUtils.h Bug 1206711 - add support for HWND emulation for content top level docs on Windows. r=tbsaunde 2017-01-24 09:45:25 -05:00
Platform.cpp bug 1351475 - allow the windows ProxyDestroyed() function to called with a proxy with no wrapper. 2017-03-29 15:32:28 -04:00
RootAccessibleWrap.cpp Bug 1306400: Remove ChildIDThunk from Windows a11y as it is no longer necessary; r=tbsaunde 2016-10-06 13:07:08 -06:00
RootAccessibleWrap.h Bug 1306400: Remove ChildIDThunk from Windows a11y as it is no longer necessary; r=tbsaunde 2016-10-06 13:07:08 -06:00
ServiceProvider.cpp Bug 1346967: Generate metadata for all three ISimpleDOM interfaces via a single combined run of MIDL; r=tbsaunde 2017-03-13 16:39:28 -06:00
ServiceProvider.h Bug 1322465 part 1 - Use explicit/MOZ_IMPLICIT for the unary constructors in accessible/. r=Ehsan 2016-12-16 15:43:21 +08:00
TextLeafAccessibleWrap.cpp
TextLeafAccessibleWrap.h
XULListboxAccessibleWrap.cpp
XULListboxAccessibleWrap.h Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj 2015-03-21 12:28:04 -04:00
XULMenuAccessibleWrap.cpp
XULMenuAccessibleWrap.h
XULTreeGridAccessibleWrap.cpp
XULTreeGridAccessibleWrap.h Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj 2015-03-21 12:28:04 -04:00