Example #1
0
        protected override bool OnProcessMessageReceived(CefBrowser browser, CefProcessId sourceProcess, CefProcessMessage message)
        {
            Debug.WriteLine(DBGPREFIX + "OnProcessMessageReceived: " + message.ToString());
            var isHandled = _messageRouter.OnProcessMessageReceived(browser, sourceProcess, message);

            if (isHandled)
            {
                return(true);
            }

            var handler = OnProcessMessageReceivedEvent;

            if (handler != null)
            {
                Debug.WriteLine(DBGPREFIX + "OnProcessMessageReceived Delegate");
                var e = new OnProcessMessageReceivedEventArgs(browser, sourceProcess, message);
                handler(this, e);
                return(e.Handled);
            }
            return(false);
        }