void displayHandler_OnConsoleMessage(object sender, CfxOnConsoleMessageEventArgs e)
 {
     if (FConsoleIn[0])
     {
         FLogger.Log(LogType.Message, string.Format("{0} ({1}:{2})", e.Message, e.Source, e.Line));
     }
     e.SetReturnValue(false);
 }
Example #2
0
 private void HandleConsoleMessage(object sender, CfxOnConsoleMessageEventArgs e)
 {
     LastConsole = $"{e.Message} ({e.Source}: {e.Line})";
     if (BrowserSettings.ListenConsole)
     {
         VvvvLogger?.Log(LogType.Message, $"CEF: {e.Message} ({e.Source}: {e.Line})");
     }
     e.SetReturnValue(false);
 }
Example #3
0
        internal static void on_console_message(IntPtr gcHandlePtr, out int __retval, IntPtr browser, out int browser_release, IntPtr message_str, int message_length, IntPtr source_str, int source_length, int line)
        {
            var self = (CfxDisplayHandler)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null || self.CallbacksDisabled)
            {
                __retval        = default(int);
                browser_release = 1;
                return;
            }
            var e = new CfxOnConsoleMessageEventArgs(browser, message_str, message_length, source_str, source_length, line);

            self.m_OnConsoleMessage?.Invoke(self, e);
            e.m_isInvalid   = true;
            browser_release = e.m_browser_wrapped == null? 1 : 0;
            __retval        = e.m_returnValue ? 1 : 0;
        }
Example #4
0
        internal static void on_console_message(IntPtr gcHandlePtr, out int __retval, IntPtr browser, IntPtr message_str, int message_length, IntPtr source_str, int source_length, int line)
        {
            var self = (CfxDisplayHandler)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null)
            {
                __retval = default(int);
                return;
            }
            var e            = new CfxOnConsoleMessageEventArgs(browser, message_str, message_length, source_str, source_length, line);
            var eventHandler = self.m_OnConsoleMessage;

            if (eventHandler != null)
            {
                eventHandler(self, e);
            }
            e.m_isInvalid = true;
            if (e.m_browser_wrapped == null)
            {
                CfxApi.cfx_release(e.m_browser);
            }
            __retval = e.m_returnValue ? 1 : 0;
        }
Example #5
0
 private void OnConsoleMessage(object sender, CfxOnConsoleMessageEventArgs e)
 {
     ConsoleMessage?.Invoke(this, new ConsoleMessageArgs(e.Message, e.Source, e.Line));
 }
 private void OnConsoleMessage(object sender, CfxOnConsoleMessageEventArgs e)
 {
     e.SetReturnValue(false);
     ConsoleMessage?.Invoke(this, new ConsoleMessageArgs(e.Message, e.Source, e.Line));
 }
 private void OnConsoleMessage(object sender, CfxOnConsoleMessageEventArgs e)
 {
     ConsoleMessage?.Invoke(this, new ConsoleMessageArgs(e.Message, e.Source, e.Line));
 }
Example #8
0
 private void Handler_OnConsoleMessage(object sender, CfxOnConsoleMessageEventArgs e)
 {
     e.SetReturnValue(true);
 }