tests/cefclient/browser/osr_accessibility_node_win.cc
// Forces the default action of our element. In simplest cases, send a click.
Forces the default action of our element. In simplest cases, send a click.
Forces the default action of our element . In simplest cases send a click .
STDMETHODIMP CefIAccessible::accDoDefaultAction(VARIANT varChild) {
  HRESULT retCode = DATACHECK(node_);
  if (SUCCEEDED(retCode) && VALID_CHILDID(varChild)) {
    CefRefPtr<CefBrowser> browser = node_->GetBrowser();
    if (browser) {
      CefMouseEvent mouse_event;
      const CefRect& rect = node_->AxLocation();
      mouse_event.x = MiddleX(rect);
      mouse_event.y = MiddleY(rect);
      mouse_event.modifiers = 0;
      browser->GetHost()->SendMouseClickEvent(mouse_event, MBT_LEFT, false, 1);
      browser->GetHost()->SendMouseClickEvent(mouse_event, MBT_LEFT, true, 1);
    }
  } else {
    retCode = E_INVALIDARG;
  }
  return retCode;
}
STDMETHODIMP CefIAccessible :: accDoDefaultAction ( VARIANT varChild ) { HRESULT retCode = DATACHECK ( node_ ) ; if ( SUCCEEDED ( retCode ) && VALID_CHILDID ( varChild ) ) { CefRefPtr < CefBrowser > browser = node_ -> GetBrowser ( ) ; if ( browser ) { CefMouseEvent mouse_event ; const CefRect & rect = node_ -> AxLocation ( ) ; mouse_event . x = MiddleX ( rect ) ; mouse_event . y = MiddleY ( rect ) ; mouse_event . modifiers = 0 ; browser -> GetHost ( ) -> SendMouseClickEvent ( mouse_event , MBT_LEFT , false , 1 ) ; browser -> GetHost ( ) -> SendMouseClickEvent ( mouse_event , MBT_LEFT , true , 1 ) ; } } else { retCode = E_INVALIDARG ; } return retCode ; }
Forces the default action of our element.
Forces the default action of our element .
// doing our default action for out button is to simply click the button.