コード例 #1
0
        protected override bool OnProcessMessageReceived(CefBrowser browser, CefProcessId sourceProcess,
                                                         CefProcessMessage message)
        {
            var handled = false;

            if (browsers.TryGetValue(browser.Identifier, out var browserController))
            {
                handled = browserController.OnProcessMessage(message);
            }

            if (!handled)
            {
                var args = new ProcessMessageReceivedArgs(browser, message);
                ProcessMessageReceived?.Invoke(this, args);
                handled = args.Handled;
            }

            return(handled);
        }
コード例 #2
0
 protected virtual void OnProcessMessageReceived(ProcessMessageReceivedArgs e)
 {
     ProcessMessageReceived?.Invoke(this, e);
 }