/// <summary> /// Returns true (1) if this object is pointing to the same handle as |that| /// object. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_dom_capi.h">cef/include/capi/cef_dom_capi.h</see>. /// </remarks> public bool IsSame(CfrDomNode that) { var call = new CfxDomNodeIsSameRenderProcessCall(); call.@this = proxyId; call.that = CfrObject.Unwrap(that); call.RequestExecution(this); return(call.__retval); }
/// <summary> /// Returns the document element with the specified ID value. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_dom_capi.h">cef/include/capi/cef_dom_capi.h</see>. /// </remarks> public CfrDomNode GetElementById(string id) { var call = new CfxDomDocumentGetElementByIdRemoteCall(); call.@this = RemotePtr.ptr; call.id = id; call.RequestExecution(RemotePtr.connection); return(CfrDomNode.Wrap(new RemotePtr(call.__retval))); }
/// <summary> /// Returns the document element with the specified ID value. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_dom_capi.h">cef/include/capi/cef_dom_capi.h</see>. /// </remarks> public CfrDomNode GetElementById(string id) { var call = new CfxDomDocumentGetElementByIdRenderProcessCall(); call.@this = proxyId; call.id = id; call.RequestExecution(this); return(CfrDomNode.Wrap(call.__retval)); }
/// <summary> /// Returns true (1) if this object is pointing to the same handle as |that| /// object. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_dom_capi.h">cef/include/capi/cef_dom_capi.h</see>. /// </remarks> public bool IsSame(CfrDomNode that) { var call = new CfxDomNodeIsSameRemoteCall(); call.@this = RemotePtr.ptr; call.that = CfrObject.Unwrap(that).ptr; call.RequestExecution(RemotePtr.connection); return(call.__retval); }
/// <summary> /// Returns true (1) if this object is pointing to the same handle as |that| /// object. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_dom_capi.h">cef/include/capi/cef_dom_capi.h</see>. /// </remarks> public bool IsSame(CfrDomNode that) { var connection = RemotePtr.connection; var call = new CfxDomNodeIsSameRemoteCall(); call.@this = RemotePtr.ptr; if (!CfrObject.CheckConnection(that, connection)) { throw new ArgumentException("Render process connection mismatch.", "that"); } call.that = CfrObject.Unwrap(that).ptr; call.RequestExecution(connection); return(call.__retval); }
internal static CfrDomNode Wrap(IntPtr proxyId) { if (proxyId == IntPtr.Zero) { return(null); } var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache; lock (weakCache) { var cfrObj = (CfrDomNode)weakCache.Get(proxyId); if (cfrObj == null) { cfrObj = new CfrDomNode(proxyId); weakCache.Add(proxyId, cfrObj); } return(cfrObj); } }
internal static CfrDomNode Wrap(RemotePtr remotePtr) { if (remotePtr == RemotePtr.Zero) { return(null); } var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache; lock (weakCache) { var cfrObj = (CfrDomNode)weakCache.Get(remotePtr.ptr); if (cfrObj == null) { cfrObj = new CfrDomNode(remotePtr); weakCache.Add(remotePtr.ptr, cfrObj); } return(cfrObj); } }