示例#1
0
        /// <summary>
        /// Create a new CfrPostDataElement object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
        /// </remarks>
        public static CfrPostDataElement Create()
        {
            var call = new CfxPostDataElementCreateRenderProcessCall();

            call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
            return(CfrPostDataElement.Wrap(call.__retval));
        }
示例#2
0
        /// <summary>
        /// Create a new CfrPostDataElement object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
        /// </remarks>
        public static CfrPostDataElement Create()
        {
            var call = new CfxPostDataElementCreateRemoteCall();

            call.RequestExecution();
            return(CfrPostDataElement.Wrap(new RemotePtr(call.__retval)));
        }
        /// <summary>
        /// Create a new CfrPostDataElement object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
        /// </remarks>
        public static CfrPostDataElement Create()
        {
            var connection = CfxRemoteCallContext.CurrentContext.connection;
            var call       = new CfxPostDataElementCreateRemoteCall();

            call.RequestExecution(connection);
            return(CfrPostDataElement.Wrap(new RemotePtr(connection, call.__retval)));
        }
示例#4
0
        /// <summary>
        /// Add the specified post data element.  Returns true (1) if the add succeeds.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
        /// </remarks>
        public bool AddElement(CfrPostDataElement element)
        {
            var call = new CfxPostDataAddElementRemoteCall();

            call.@this   = RemotePtr.ptr;
            call.element = CfrObject.Unwrap(element).ptr;
            call.RequestExecution(RemotePtr.connection);
            return(call.__retval);
        }
示例#5
0
        /// <summary>
        /// Add the specified post data element.  Returns true (1) if the add succeeds.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
        /// </remarks>
        public bool AddElement(CfrPostDataElement element)
        {
            var call = new CfxPostDataAddElementRenderProcessCall();

            call.self    = CfrObject.Unwrap(this);
            call.element = CfrObject.Unwrap(element);
            call.RequestExecution(this);
            return(call.__retval);
        }
示例#6
0
        /// <summary>
        /// Remove the specified post data element.  Returns true (1) if the removal
        /// succeeds.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
        /// </remarks>
        public bool RemoveElement(CfrPostDataElement element)
        {
            var call = new CfxPostDataRemoveElementRenderProcessCall();

            call.@this   = proxyId;
            call.element = CfrObject.Unwrap(element);
            call.RequestExecution(this);
            return(call.__retval);
        }
示例#7
0
        /// <summary>
        /// Add the specified post data element.  Returns true (1) if the add succeeds.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
        /// </remarks>
        public bool AddElement(CfrPostDataElement element)
        {
            var connection = RemotePtr.connection;
            var call       = new CfxPostDataAddElementRemoteCall();

            call.@this = RemotePtr.ptr;
            if (!CfrObject.CheckConnection(element, connection))
            {
                throw new ArgumentException("Render process connection mismatch.", "element");
            }
            call.element = CfrObject.Unwrap(element).ptr;
            call.RequestExecution(connection);
            return(call.__retval);
        }
示例#8
0
        internal static CfrPostDataElement Wrap(IntPtr proxyId)
        {
            if (proxyId == IntPtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrPostDataElement)weakCache.Get(proxyId);
                if (cfrObj == null)
                {
                    cfrObj = new CfrPostDataElement(proxyId);
                    weakCache.Add(proxyId, cfrObj);
                }
                return(cfrObj);
            }
        }
示例#9
0
        internal static CfrPostDataElement Wrap(RemotePtr remotePtr)
        {
            if (remotePtr == RemotePtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrPostDataElement)weakCache.Get(remotePtr.ptr);
                if (cfrObj == null)
                {
                    cfrObj = new CfrPostDataElement(remotePtr);
                    weakCache.Add(remotePtr.ptr, cfrObj);
                }
                return(cfrObj);
            }
        }
示例#10
0
 /// <summary>
 /// Remove the specified post data element.  Returns true (1) if the removal
 /// succeeds.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
 /// </remarks>
 public bool RemoveElement(CfrPostDataElement element)
 {
     var call = new CfxPostDataRemoveElementRenderProcessCall();
     call.self = CfrObject.Unwrap(this);
     call.element = CfrObject.Unwrap(element);
     call.RequestExecution(this);
     return call.__retval;
 }
示例#11
0
 internal static CfrPostDataElement Wrap(IntPtr proxyId)
 {
     if(proxyId == IntPtr.Zero) return null;
     var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;
     lock(weakCache) {
         var cfrObj = (CfrPostDataElement)weakCache.Get(proxyId);
         if(cfrObj == null) {
             cfrObj = new CfrPostDataElement(proxyId);
             weakCache.Add(proxyId, cfrObj);
         }
         return cfrObj;
     }
 }