Beispiel #1
0
        protected override void ExecuteInTargetProcess(RemoteConnection connection)
        {
            var sender = CfrTask.Wrap(this.sender);
            var e      = new CfrEventArgs(eventArgsId);

            sender.raise_Execute(sender, e);
        }
Beispiel #2
0
        internal void raise_Execute(object sender, CfrEventArgs e)
        {
            var handler = m_Execute;

            if (handler == null)
            {
                return;
            }
            handler(this, e);
            e.m_isInvalid = true;
        }
        protected override void ExecuteInTargetProcess(RemoteConnection connection)
        {
            var self = (CfrRenderProcessHandler)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null || self.CallbacksDisabled)
            {
                return;
            }
            var e = new CfrEventArgs();

            self.m_OnWebKitInitialized?.Invoke(self, e);
            e.m_isInvalid = true;
        }
        protected override void RemoteProcedure()
        {
            var self = (CfrTask)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null || self.CallbacksDisabled)
            {
                return;
            }
            var e = new CfrEventArgs();

            self.m_Execute?.Invoke(self, e);
            e.m_isInvalid = true;
        }
        protected override void RemoteProcedure()
        {
            var self = (CfrRenderProcessHandler)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null || self.CallbacksDisabled)
            {
                return;
            }
            var e = new CfrEventArgs();

            e.connection = CfxRemoteCallContext.CurrentContext.connection;
            self.m_OnWebKitInitialized?.Invoke(self, e);
            e.connection = null;
        }
Beispiel #6
0
 void Task_Execute(CfrEventArgs e)
 {
     CfrV8Value retval;
     CfrV8Exception ex;
     bool result = false;
     try
     {
         var context = wb.RemoteBrowser.MainFrame.V8Context;
         result = context.Eval(code, out retval, out ex);
     }
     catch
     {
         callback(null, null);
         return;
     }
     if (result)
     {
         callback(retval, null);
     }
     else
     {
         callback(null, ex);
     }
 }
Beispiel #7
0
 protected override void ExecuteInTargetProcess(RemoteConnection connection)
 {
     var sender = CfrTask.Wrap(this.sender);
     var e = new CfrEventArgs(eventArgsId);
     sender.raise_Execute(sender, e);
 }