/// <summary>
        /// Create a new router with the specified configuration.
        /// </summary>
        public CefMessageRouterBrowserSide(CefMessageRouterConfig config)
        {
            if (!config.Validate())
            {
                throw new ArgumentException("Invalid configuration.");
            }

            _config            = config;
            _queryMessageName  = config.JSQueryFunction + CefMessageRouter.MessageSuffix;
            _cancelMessageName = config.JSCancelFunction + CefMessageRouter.MessageSuffix;
        }
        // TODO: Dispose method ?


        /// <summary>
        /// Create a new router with the specified configuration.
        /// </summary>
        public static CefMessageRouterBrowserSide Create(CefMessageRouterConfig config)
        {
            return(new CefMessageRouterBrowserSide(config));
        }
Пример #3
0
 public V8HandlerImpl(CefMessageRouterRendererSide router, CefMessageRouterConfig config)
 {
     _router    = router;
     _config    = config;
     _contextId = CefMessageRouter.ReservedId;
 }