Ejemplo n.º 1
0
        /// <summary>
        /// Create a new CfrPostData 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 CfrPostData Create()
        {
            var call = new CfxPostDataCreateRenderProcessCall();

            call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
            return(CfrPostData.Wrap(call.__retval));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create a new CfrPostData 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 CfrPostData Create()
        {
            var call = new CfxPostDataCreateRemoteCall();

            call.RequestExecution();
            return(CfrPostData.Wrap(new RemotePtr(call.__retval)));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Create a new CfrPostData 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 CfrPostData Create()
        {
            var connection = CfxRemoteCallContext.CurrentContext.connection;
            var call       = new CfxPostDataCreateRemoteCall();

            call.RequestExecution(connection);
            return(CfrPostData.Wrap(new RemotePtr(connection, call.__retval)));
        }
        /// <summary>
        /// Set all values at one time.
        /// </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 void Set(string url, string method, CfrPostData postData, System.Collections.Generic.List <string[]> headerMap)
        {
            var call = new CfxRequestSetRenderProcessCall();

            call.@this     = proxyId;
            call.url       = url;
            call.method    = method;
            call.postData  = CfrObject.Unwrap(postData);
            call.headerMap = headerMap;
            call.RequestExecution(this);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Set all values at one time.
        /// </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 void Set(string url, string method, CfrPostData postData, System.Collections.Generic.List <string[]> headerMap)
        {
            var call = new CfxRequestSetRemoteCall();

            call.@this     = RemotePtr.ptr;
            call.url       = url;
            call.method    = method;
            call.postData  = CfrObject.Unwrap(postData).ptr;
            call.headerMap = headerMap;
            call.RequestExecution(RemotePtr.connection);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Set all values at one time.
        /// </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 void Set(string url, string method, CfrPostData postData, System.Collections.Generic.List <string[]> headerMap)
        {
            var connection = RemotePtr.connection;
            var call       = new CfxRequestSetRemoteCall();

            call.@this  = RemotePtr.ptr;
            call.url    = url;
            call.method = method;
            if (!CfrObject.CheckConnection(postData, connection))
            {
                throw new ArgumentException("Render process connection mismatch.", "postData");
            }
            call.postData  = CfrObject.Unwrap(postData).ptr;
            call.headerMap = headerMap;
            call.RequestExecution(connection);
        }
Ejemplo n.º 7
0
        internal static CfrPostData Wrap(RemotePtr remotePtr)
        {
            if (remotePtr == RemotePtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrPostData)weakCache.Get(remotePtr.ptr);
                if (cfrObj == null)
                {
                    cfrObj = new CfrPostData(remotePtr);
                    weakCache.Add(remotePtr.ptr, cfrObj);
                }
                return(cfrObj);
            }
        }
Ejemplo n.º 8
0
        internal static CfrPostData Wrap(IntPtr proxyId)
        {
            if (proxyId == IntPtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrPostData)weakCache.Get(proxyId);
                if (cfrObj == null)
                {
                    cfrObj = new CfrPostData(proxyId);
                    weakCache.Add(proxyId, cfrObj);
                }
                return(cfrObj);
            }
        }
Ejemplo n.º 9
0
 internal static CfrPostData Wrap(IntPtr proxyId)
 {
     if(proxyId == IntPtr.Zero) return null;
     var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;
     lock(weakCache) {
         var cfrObj = (CfrPostData)weakCache.Get(proxyId);
         if(cfrObj == null) {
             cfrObj = new CfrPostData(proxyId);
             weakCache.Add(proxyId, cfrObj);
         }
         return cfrObj;
     }
 }