tests/cefclient/browser/osr_accessibility_node_win.cc
// Returns the parent IAccessible in the form of an IDispatch interface.
Returns the parent IAccessible in the form of an IDispatch interface.
Returns the parent IAccessible in the form of an IDispatch interface .
STDMETHODIMP CefIAccessible::get_accParent(IDispatch** ppdispParent) {
  HRESULT retCode = DATACHECK(node_);
  if (SUCCEEDED(retCode)) {
    if (ppdispParent) {
      CefNativeAccessible* parent = node_->GetParentAccessibleObject();
      if (!parent) {
        HWND hWnd = ::GetParent(node_->GetWindowHandle());
        if (hWnd) {
          AccessibleObjectFromWindow(hWnd, (DWORD)OBJID_CLIENT, IID_IAccessible,
                                     (void**)(&parent));
        }
      }
      if (parent)
        parent->AddRef();
      *ppdispParent = parent;
      retCode = (*ppdispParent) ? S_OK : S_FALSE;
    }
  } else {
    retCode = E_INVALIDARG;
  }
  return retCode;
}
STDMETHODIMP CefIAccessible :: get_accParent ( IDispatch * * ppdispParent ) { HRESULT retCode = DATACHECK ( node_ ) ; if ( SUCCEEDED ( retCode ) ) { if ( ppdispParent ) { CefNativeAccessible * parent = node_ -> GetParentAccessibleObject ( ) ; if ( ! parent ) { HWND hWnd = :: GetParent ( node_ -> GetWindowHandle ( ) ) ; if ( hWnd ) { AccessibleObjectFromWindow ( hWnd , ( DWORD ) OBJID_CLIENT , IID_IAccessible , ( void * * ) ( & parent ) ) ; } } if ( parent ) parent -> AddRef ( ) ; * ppdispParent = parent ; retCode = ( * ppdispParent ) ? S_OK : S_FALSE ; } } else { retCode = E_INVALIDARG ; } return retCode ; }
Returns the parent IAccessible in the form of an IDispatch interface.
Returns the parent IAccessible in the form of an IDispatch interface .
// Find our parent window // if we have a window attempt to get its IAccessible pointer