예제 #1
0
 internal Browser(IChannelOwner parent, string guid, BrowserInitializer initializer) : base(parent, guid)
 {
     Channel         = new BrowserChannel(guid, parent.Connection, this);
     IsConnected     = true;
     Channel.Closed += (sender, e) => DidClose();
     _initializer    = initializer;
 }
예제 #2
0
 internal Browser(IChannelOwner parent, string guid, BrowserInitializer initializer) : base(parent, guid)
 {
     Channel         = new Microsoft.Playwright.Transport.Channels.BrowserChannel(guid, parent.Connection, this);
     IsConnected     = true;
     Channel.Closed += (_, _) => DidClose();
     _initializer    = initializer;
 }
예제 #3
0
 internal Browser(ConnectionScope scope, string guid, BrowserInitializer initializer)
 {
     _scope           = scope.CreateChild(guid);
     _channel         = new BrowserChannel(guid, scope, this);
     IsConnected      = true;
     _channel.Closed += (sender, e) =>
     {
         IsConnected        = false;
         _isClosedOrClosing = true;
         Disconnected?.Invoke(this, EventArgs.Empty);
         _scope.Dispose();
         _closedTcs.TrySetResult(true);
     };
 }
예제 #4
0
        private static void Main()
        {
            HookAssemblyResolve(BrowserInitializer.PATH_CEF, BrowserInitializer.PATH_LIB);

            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            Application.ThreadException += ApplicationOnThreadException;
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);

            AppDomain.CurrentDomain.ProcessExit += CurrentDomainOnProcessExit;
            var stage1 = BrowserInitializer.InitStage1();

            Logger.GetLogger().Info($"Loaded libcef.dll -> {stage1}");

            LaunchBrowser();
        }
예제 #5
0
 internal ChromiumBrowser(IChannelOwner parent, string guid, BrowserInitializer initializer) : base(parent, guid, initializer)
 {
 }
예제 #6
0
 public Browser(ConnectionScope scope, string guid, BrowserInitializer initializer)
 {
     _scope   = scope;
     _channel = new BrowserChannel(guid, scope, this);
 }