Exemple #1
0
        internal static void Initialize(CfxRenderProcessMainDelegate renderProcessMainCallback, ref CfxApp app)
        {
            if(app == null) {
                m_app = new CfxApp();
                app = m_app;
            } else {
                m_app = app;
                m_browserProcessHandler = m_app.RetrieveBrowserProcessHandler();
            }

            if(m_browserProcessHandler == null) {
                m_browserProcessHandler = new CfxBrowserProcessHandler();
                m_app.GetBrowserProcessHandler += (sender, e) => e.SetReturnValue(m_browserProcessHandler);
            }

            RemoteService.renderProcessMainCallback = renderProcessMainCallback;
            m_browserProcessHandler.OnBeforeChildProcessLaunch += OnBeforeChildProcessLaunch;
        }
Exemple #2
0
        internal static void Initialize(CfxRenderProcessMainDelegate renderProcessMainCallback, ref CfxApp app)
        {
            if (app == null)
            {
                m_app = new CfxApp();
                app   = m_app;
            }
            else
            {
                m_app = app;
                m_browserProcessHandler = m_app.RetrieveBrowserProcessHandler();
            }

            if (m_browserProcessHandler == null)
            {
                m_browserProcessHandler         = new CfxBrowserProcessHandler();
                m_app.GetBrowserProcessHandler += (sender, e) => e.SetReturnValue(m_browserProcessHandler);
            }

            RemoteService.renderProcessMainCallback             = renderProcessMainCallback;
            m_browserProcessHandler.OnBeforeChildProcessLaunch += OnBeforeChildProcessLaunch;
        }
Exemple #3
0
 /// <summary>
 /// This function should be called on the main application thread to initialize
 /// the CEF browser process with support for the remote interface to the render
 /// process. The |application| parameter may be NULL. A return value of true (1)
 /// indicates that it succeeded and false (0) indicates that it failed.
 ///
 /// If |renderProcessMain| is provided, then every newly created render process
 /// main thread will be redirected through this callback and the callee is
 /// responsible for calling CfrRuntime.ExecuteProcess() from within the
 /// scope of this callback.
 ///
 /// The chromium sandbox is currently not supported within ChromiumFX.
 /// </summary>
 public static bool Initialize(CfxSettings settings, CfxApp application, CfxRenderProcessMainDelegate renderProcessMain)
 {
     CfxApi.Probe();
     Chromium.Remote.RemoteService.Initialize(renderProcessMain, ref application);
     return(Initialize(settings, application));
 }
Exemple #4
0
 /// <summary>
 /// This function should be called on the main application thread to initialize
 /// the CEF browser process with support for the remote interface to the render
 /// process. The |application| parameter may be NULL. A return value of true (1) 
 /// indicates that it succeeded and false (0) indicates that it failed.
 /// 
 /// If |renderProcessMain| is provided, then every newly created render process 
 /// main thread will be redirected through this callback and the callee is
 /// responsible for calling CfrRuntime.ExecuteProcess() from within the 
 /// scope of this callback.
 /// 
 /// The chromium sandbox is currently not supported within ChromiumFX.
 /// </summary>
 public static bool Initialize(CfxSettings settings, CfxApp application, CfxRenderProcessMainDelegate renderProcessMain)
 {
     CfxApi.Probe();
     Chromium.Remote.RemoteService.Initialize(renderProcessMain, ref application);
     return Initialize(settings, application);
 }