Esempio n. 1
0
        /// <summary>
        /// Create a new CfrResponse object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_response_capi.h">cef/include/capi/cef_response_capi.h</see>.
        /// </remarks>
        public static CfrResponse Create()
        {
            var call = new CfxResponseCreateRemoteCall();

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

            call.RequestExecution(connection);
            return(CfrResponse.Wrap(new RemotePtr(connection, call.__retval)));
        }
Esempio n. 3
0
        internal static CfrResponse Wrap(RemotePtr remotePtr)
        {
            if (remotePtr == RemotePtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrResponse)weakCache.Get(remotePtr.ptr);
                if (cfrObj == null)
                {
                    cfrObj = new CfrResponse(remotePtr);
                    weakCache.Add(remotePtr.ptr, cfrObj);
                }
                return(cfrObj);
            }
        }