Example #1
0
 /// <summary>
 /// Returns true (1) if called on the specified thread. Equivalent to using
 /// CfrTaskRunner.GetForThread(threadId).BelongsToCurrentThread().
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
 /// </remarks>
 public static bool CurrentlyOn(CfxThreadId threadId)
 {
     var call = new CfxRuntimeCurrentlyOnRenderProcessCall();
     call.threadId = (int)threadId;
     call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
     return call.__retval;
 }
        /// <summary>
        /// Returns the task runner for the specified CEF thread.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
        /// </remarks>
        public static CfrTaskRunner GetForThread(CfxThreadId threadId)
        {
            var call = new CfxTaskRunnerGetForThreadRenderProcessCall();

            call.threadId = (int)threadId;
            call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
            return(CfrTaskRunner.Wrap(call.__retval));
        }
Example #3
0
        /// <summary>
        /// Returns true (1) if called on the specified thread. Equivalent to using
        /// CfrTaskRunner.GetForThread(threadId).BelongsToCurrentThread().
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
        /// </remarks>
        public static bool CurrentlyOn(CfxThreadId threadId)
        {
            var call = new CfxRuntimeCurrentlyOnRenderProcessCall();

            call.threadId = (int)threadId;
            call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
            return(call.__retval);
        }
Example #4
0
        /// <summary>
        /// Returns the task runner for the specified CEF thread.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
        /// </remarks>
        public static CfrTaskRunner GetForThread(CfxThreadId threadId)
        {
            var call = new CfxTaskRunnerGetForThreadRemoteCall();

            call.threadId = (int)threadId;
            call.RequestExecution();
            return(CfrTaskRunner.Wrap(new RemotePtr(call.__retval)));
        }
Example #5
0
        /// <summary>
        /// Returns true (1) if called on the specified thread. Equivalent to using
        /// CfrTaskRunner.GetForThread(threadId).BelongsToCurrentThread().
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
        /// </remarks>
        public static bool CurrentlyOn(CfxThreadId threadId)
        {
            var call = new CfxRuntimeCurrentlyOnRemoteCall();

            call.threadId = (int)threadId;
            call.RequestExecution();
            return(call.__retval);
        }
        /// <summary>
        /// Returns true (1) if this task runner is for the specified CEF thread.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
        /// </remarks>
        public bool BelongsToThread(CfxThreadId threadId)
        {
            var call = new CfxTaskRunnerBelongsToThreadRenderProcessCall();

            call.@this    = proxyId;
            call.threadId = (int)threadId;
            call.RequestExecution(this);
            return(call.__retval);
        }
Example #7
0
        /// <summary>
        /// Returns true (1) if this task runner is for the specified CEF thread.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
        /// </remarks>
        public bool BelongsToThread(CfxThreadId threadId)
        {
            var call = new CfxTaskRunnerBelongsToThreadRemoteCall();

            call.@this    = RemotePtr.ptr;
            call.threadId = (int)threadId;
            call.RequestExecution(RemotePtr.connection);
            return(call.__retval);
        }
Example #8
0
 /// <summary>
 /// Post a task for delayed execution on the specified thread. Equivalent to
 /// using CfrTaskRunner.GetForThread(threadId).PostDelayedTask(task,
 /// delay_ms).
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
 /// </remarks>
 public static bool PostDelayedTask(CfxThreadId threadId, CfrTask task, long delayMs)
 {
     var call = new CfxRuntimePostDelayedTaskRenderProcessCall();
     call.threadId = (int)threadId;
     call.task = CfrObject.Unwrap(task);
     call.delayMs = delayMs;
     call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
     return call.__retval;
 }
Example #9
0
        /// <summary>
        /// Post a task for execution on the specified thread. Equivalent to using
        /// CfrTaskRunner.GetForThread(threadId).PostTask(task).
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
        /// </remarks>
        public static bool PostTask(CfxThreadId threadId, CfrTask task)
        {
            var call = new CfxRuntimePostTaskRemoteCall();

            call.threadId = (int)threadId;
            call.task     = CfrObject.Unwrap(task).ptr;
            call.RequestExecution();
            return(call.__retval);
        }
Example #10
0
        /// <summary>
        /// Post a task for execution on the specified thread. Equivalent to using
        /// CfrTaskRunner.GetForThread(threadId).PostTask(task).
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
        /// </remarks>
        public static bool PostTask(CfxThreadId threadId, CfrTask task)
        {
            var call = new CfxRuntimePostTaskRenderProcessCall();

            call.threadId = (int)threadId;
            call.task     = CfrObject.Unwrap(task);
            call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
            return(call.__retval);
        }
Example #11
0
        /// <summary>
        /// Post a task for execution on the specified thread. Equivalent to using
        /// CfrTaskRunner.GetForThread(threadId).PostTask(task).
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
        /// </remarks>
        public static bool PostTask(CfxThreadId threadId, CfrTask task)
        {
            var connection = CfxRemoteCallContext.CurrentContext.connection;
            var call       = new CfxRuntimePostTaskRemoteCall();

            call.threadId = (int)threadId;
            if (!CfrObject.CheckConnection(task, connection))
            {
                throw new ArgumentException("Render process connection mismatch.", "task");
            }
            call.task = CfrObject.Unwrap(task).ptr;
            call.RequestExecution(connection);
            return(call.__retval);
        }
Example #12
0
 /// <summary>
 /// Returns true (1) if called on the specified thread. Equivalent to using
 /// CfxTaskRunner.GetForThread(threadId).BelongsToCurrentThread().
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
 /// </remarks>
 public static bool CurrentlyOn(CfxThreadId threadId)
 {
     return(0 != CfxApi.cfx_currently_on((int)threadId));
 }
Example #13
0
 /// <summary>
 /// Returns true (1) if this task runner is for the specified CEF thread.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
 /// </remarks>
 public bool BelongsToThread(CfxThreadId threadId)
 {
     return(0 != CfxApi.cfx_task_runner_belongs_to_thread(NativePtr, (int)threadId));
 }
Example #14
0
 /// <summary>
 /// Returns the task runner for the specified CEF thread.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
 /// </remarks>
 public static CfxTaskRunner GetForThread(CfxThreadId threadId)
 {
     return(CfxTaskRunner.Wrap(CfxApi.cfx_task_runner_get_for_thread((int)threadId)));
 }
Example #15
0
 /// <summary>
 /// Returns the task runner for the specified CEF thread.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
 /// </remarks>
 public static CfxTaskRunner GetForThread(CfxThreadId threadId)
 {
     return CfxTaskRunner.Wrap(CfxApi.cfx_task_runner_get_for_thread((int)threadId));
 }
Example #16
0
 /// <summary>
 /// Post a task for delayed execution on the specified thread. Equivalent to
 /// using CfxTaskRunner.GetForThread(threadId).PostDelayedTask(task,
 /// delay_ms).
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
 /// </remarks>
 public static bool PostDelayedTask(CfxThreadId threadId, CfxTask task, long delayMs)
 {
     return(0 != CfxApi.cfx_post_delayed_task((int)threadId, CfxTask.Unwrap(task), delayMs));
 }
Example #17
0
 /// <summary>
 /// Post a task for execution on the specified thread. Equivalent to using
 /// CfxTaskRunner.GetForThread(threadId).PostTask(task).
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
 /// </remarks>
 public static bool PostTask(CfxThreadId threadId, CfxTask task)
 {
     return(0 != CfxApi.cfx_post_task((int)threadId, CfxTask.Unwrap(task)));
 }
Example #18
0
 /// <summary>
 /// Returns true (1) if this task runner is for the specified CEF thread.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_task_capi.h">cef/include/capi/cef_task_capi.h</see>.
 /// </remarks>
 public bool BelongsToThread(CfxThreadId threadId)
 {
     return 0 != CfxApi.cfx_task_runner_belongs_to_thread(NativePtr, (int)threadId);
 }