Exemple #1
0
        //public WinFormiumLifeSpanHandler LifeSpanHandler => (WinFormiumLifeSpanHandler)_lifeSpanHandler;

        //public WinFormiumLoadHandler LoadHandler => (WinFormiumLoadHandler)_loadHandler;


        internal BrowserClient(Formium formium)
        {
            _owner = formium;

            _lifeSpanHandler    = new WinFormiumLifeSpanHandler(_owner);
            _loadHandler        = new WinFormiumLoadHandler(_owner);
            _dragHandler        = new WinFormiumDragHandler(_owner);
            _contextMenuHandler = new WinFormiumContextMenuHandler(_owner);
            _requestHandler     = new WinFormiumRequestHandler(_owner);
            _displayHandler     = new WinFormiumDisplayHandler(_owner);
            _dialogHandler      = new WinFormiumDialogHandler(_owner);
            _downloadHandler    = new WinFormiumDownloadHandler(_owner);
            //_focusHandler = new WinFormiumFocusHandler(_owner);
            _keyboardHandler = new WinFormiumKeyboardHandler(_owner);
            _jsDialogHandler = new WinFormiumJSDialogHandler(_owner);
            _findHandler     = new WinFormiumFindHandler(_owner);

            if (formium.WindowType == HostWindow.HostWindowType.Acrylic)
            {
                _renderHandler = new WinFormiumRenderHandlerUsingHwnd(_owner);
            }


            if (formium.WindowType == HostWindow.HostWindowType.Layered)
            {
                _renderHandler = new WinFormiumRenderHandlerUsingDeviceContext(_owner);
            }
        }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CefGlueClient"/> class.
 /// </summary>
 /// <param name="clientParams">
 /// The client params.
 /// </param>
 public CefGlueClient(CefGlueClientParams clientParams)
 {
     Core                = clientParams.Browser;
     mLifeSpanHandler    = clientParams.LifeSpanHandler;
     mLoadHandler        = clientParams.LoadHandler;
     mRequestHandler     = clientParams.RequestHandler;
     mDisplayHandler     = clientParams.DisplayHandler;
     mContextMenuHandler = clientParams.ContextMenuHandler;
     mFocusHandler       = clientParams.FocusHandler;
     mKeyboardHandler    = clientParams.KeyboardHandler;
     mJsDialogHandler    = clientParams.JsDialogHandler;
     mDialogHandler      = clientParams.DialogHandler;
     mDragHandler        = clientParams.DragHandler;
     mDownloadHandler    = clientParams.DownloadHandler;
     mFindHandler        = clientParams.FindHandler;
 }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CefGlueClient"/> class.
 /// </summary>
 /// <param name="clientParams">
 /// The client params.
 /// </param>
 public CefGlueClient(CefGlueClientParams clientParams)
 {
     CoreBrowser         = clientParams.Browser;
     _lifeSpanHandler    = clientParams.LifeSpanHandler;
     _loadHandler        = clientParams.LoadHandler;
     _requestHandler     = clientParams.RequestHandler;
     _displayHandler     = clientParams.DisplayHandler;
     _contextMenuHandler = clientParams.ContextMenuHandler;
     _focusHandler       = clientParams.FocusHandler;
     _keyboardHandler    = clientParams.KeyboardHandler;
     _jsDialogHandler    = clientParams.JsDialogHandler;
     _dialogHandler      = clientParams.DialogHandler;
     _dragHandler        = clientParams.DragHandler;
     _downloadHandler    = clientParams.DownloadHandler;
     _findHandler        = clientParams.FindHandler;
 }
Exemple #4
0
 /// <summary>Initializes a new instance of the <see cref="CefGlueCustomHandlers" /> class.</summary>
 /// <param name="browserMessageRouter">The browser message router.</param>
 /// <param name="handlers">The client params.</param>
 public CefGlueClient(CefMessageRouterBrowserSide browserMessageRouter, CefGlueCustomHandlers handlers)
 {
     _browserMessageRouter = browserMessageRouter;
     _lifeSpanHandler      = handlers.LifeSpanHandler;
     _loadHandler          = handlers.LoadHandler;
     _requestHandler       = handlers.RequestHandler;
     _displayHandler       = handlers.DisplayHandler;
     _contextMenuHandler   = handlers.ContextMenuHandler;
     _focusHandler         = handlers.FocusHandler;
     _keyboardHandler      = handlers.KeyboardHandler;
     _jsDialogHandler      = handlers.JsDialogHandler;
     _dialogHandler        = handlers.DialogHandler;
     _dragHandler          = handlers.DragHandler;
     _downloadHandler      = handlers.DownloadHandler;
     _findHandler          = handlers.FindHandler;
 }
Exemple #5
0
 public CefGlueClient(CefGlueClientParams clientParams)
 {
     m_core               = clientParams.Browser;
     m_lifeSpanHandler    = clientParams.LifeSpanHandler;
     m_loadHandler        = clientParams.LoadHandler;
     m_requestHandler     = clientParams.RequestHandler;
     m_displayHandler     = clientParams.DisplayHandler;
     m_contextMenuHandler = clientParams.ContextMenuHandler;
     m_focusHandler       = clientParams.FocusHandler;
     m_keyboardHandler    = clientParams.KeyboardHandler;
     m_jsDialogHandler    = clientParams.JSDialogHandler;
     m_dialogHandler      = clientParams.DialogHandler;
     m_dragHandler        = clientParams.DragHandler;
     m_geolocationHandler = clientParams.GeolocationHandler;
     m_downloadHandler    = clientParams.DownloadHandler;
     m_findHandler        = clientParams.FindHandler;
 }
Exemple #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CefGlueClient"/> class.
 /// </summary>
 /// <param name="clientParams">
 /// The client params.
 /// </param>
 public CefGlueClient(CefGlueClientParams clientParams)
 {
     this.CoreBrowser         = clientParams.Browser;
     this.mLifeSpanHandler    = clientParams.LifeSpanHandler;
     this.mLoadHandler        = clientParams.LoadHandler;
     this.mRequestHandler     = clientParams.RequestHandler;
     this.mDisplayHandler     = clientParams.DisplayHandler;
     this.mContextMenuHandler = clientParams.ContextMenuHandler;
     this.mFocusHandler       = clientParams.FocusHandler;
     this.mKeyboardHandler    = clientParams.KeyboardHandler;
     this.mJsDialogHandler    = clientParams.JsDialogHandler;
     this.mDialogHandler      = clientParams.DialogHandler;
     this.mDragHandler        = clientParams.DragHandler;
     this.mGeolocationHandler = clientParams.GeolocationHandler;
     this.mDownloadHandler    = clientParams.DownloadHandler;
     this.mFindHandler        = clientParams.FindHandler;
 }
Exemple #7
0
        //CsNativeHandlerSwitchTableCodeGen::GenerateHandleNativeReq
        public static void HandleNativeReq(object inst, int met_id, IntPtr args)
        {
            switch ((met_id >> 16))
            {
            case CefAccessibilityHandler._typeNAME:
                CefAccessibilityHandler.HandleNativeReq(inst as CefAccessibilityHandler.I0, inst as CefAccessibilityHandler.I1, met_id, args);
                break;

            case CefBrowserProcessHandler._typeNAME:
                CefBrowserProcessHandler.HandleNativeReq(inst as CefBrowserProcessHandler.I0, inst as CefBrowserProcessHandler.I1, met_id, args);
                break;

            case CefContextMenuHandler._typeNAME:
                CefContextMenuHandler.HandleNativeReq(inst as CefContextMenuHandler.I0, inst as CefContextMenuHandler.I1, met_id, args);
                break;

            case CefDialogHandler._typeNAME:
                CefDialogHandler.HandleNativeReq(inst as CefDialogHandler.I0, inst as CefDialogHandler.I1, met_id, args);
                break;

            case CefDisplayHandler._typeNAME:
                CefDisplayHandler.HandleNativeReq(inst as CefDisplayHandler.I0, inst as CefDisplayHandler.I1, met_id, args);
                break;

            case CefDownloadHandler._typeNAME:
                CefDownloadHandler.HandleNativeReq(inst as CefDownloadHandler.I0, inst as CefDownloadHandler.I1, met_id, args);
                break;

            case CefDragHandler._typeNAME:
                CefDragHandler.HandleNativeReq(inst as CefDragHandler.I0, inst as CefDragHandler.I1, met_id, args);
                break;

            case CefFindHandler._typeNAME:
                CefFindHandler.HandleNativeReq(inst as CefFindHandler.I0, inst as CefFindHandler.I1, met_id, args);
                break;

            case CefFocusHandler._typeNAME:
                CefFocusHandler.HandleNativeReq(inst as CefFocusHandler.I0, inst as CefFocusHandler.I1, met_id, args);
                break;

            case CefGeolocationHandler._typeNAME:
                CefGeolocationHandler.HandleNativeReq(inst as CefGeolocationHandler.I0, inst as CefGeolocationHandler.I1, met_id, args);
                break;

            case CefJSDialogHandler._typeNAME:
                CefJSDialogHandler.HandleNativeReq(inst as CefJSDialogHandler.I0, inst as CefJSDialogHandler.I1, met_id, args);
                break;

            case CefKeyboardHandler._typeNAME:
                CefKeyboardHandler.HandleNativeReq(inst as CefKeyboardHandler.I0, inst as CefKeyboardHandler.I1, met_id, args);
                break;

            case CefLifeSpanHandler._typeNAME:
                CefLifeSpanHandler.HandleNativeReq(inst as CefLifeSpanHandler.I0, inst as CefLifeSpanHandler.I1, met_id, args);
                break;

            case CefLoadHandler._typeNAME:
                CefLoadHandler.HandleNativeReq(inst as CefLoadHandler.I0, inst as CefLoadHandler.I1, met_id, args);
                break;

            case CefPrintHandler._typeNAME:
                CefPrintHandler.HandleNativeReq(inst as CefPrintHandler.I0, inst as CefPrintHandler.I1, met_id, args);
                break;

            case CefRenderHandler._typeNAME:
                CefRenderHandler.HandleNativeReq(inst as CefRenderHandler.I0, inst as CefRenderHandler.I1, met_id, args);
                break;

            case CefRenderProcessHandler._typeNAME:
                CefRenderProcessHandler.HandleNativeReq(inst as CefRenderProcessHandler.I0, inst as CefRenderProcessHandler.I1, met_id, args);
                break;

            case CefRequestContextHandler._typeNAME:
                CefRequestContextHandler.HandleNativeReq(inst as CefRequestContextHandler.I0, inst as CefRequestContextHandler.I1, met_id, args);
                break;

            case CefRequestHandler._typeNAME:
                CefRequestHandler.HandleNativeReq(inst as CefRequestHandler.I0, inst as CefRequestHandler.I1, met_id, args);
                break;

            case CefResourceBundleHandler._typeNAME:
                CefResourceBundleHandler.HandleNativeReq(inst as CefResourceBundleHandler.I0, inst as CefResourceBundleHandler.I1, met_id, args);
                break;

            case CefResourceHandler._typeNAME:
                CefResourceHandler.HandleNativeReq(inst as CefResourceHandler.I0, inst as CefResourceHandler.I1, met_id, args);
                break;

            case CefReadHandler._typeNAME:
                CefReadHandler.HandleNativeReq(inst as CefReadHandler.I0, inst as CefReadHandler.I1, met_id, args);
                break;

            case CefWriteHandler._typeNAME:
                CefWriteHandler.HandleNativeReq(inst as CefWriteHandler.I0, inst as CefWriteHandler.I1, met_id, args);
                break;

            case CefV8Handler._typeNAME:
                CefV8Handler.HandleNativeReq(inst as CefV8Handler.I0, inst as CefV8Handler.I1, met_id, args);
                break;
            }
        }