internal ChromiumBrowserContext(
     ChromiumSession client,
     ChromiumBrowser chromiumBrowser,
     string contextId,
     BrowserContextOptions options)
 {
     _client    = client;
     Browser    = chromiumBrowser;
     _contextId = contextId;
     Options    = options;
 }
Esempio n. 2
0
        internal static Task <T> WaitEventAsync <T>(ChromiumSession emitter) where T : IChromiumEvent
        {
            var completion = new TaskCompletionSource <T>();

            void handler(object sender, IChromiumEvent e)
            {
                if (e is T)
                {
                    emitter.MessageReceived -= handler;
                    completion.SetResult((T)e);
                }

                return;
            }

            emitter.MessageReceived += handler;
            return(completion.Task);
        }
Esempio n. 3
0
 public ChromiumRawKeyboard(ChromiumSession client)
 {
     _client = client;
 }
 internal ChromiumBrowserContext(ChromiumSession client, ChromiumBrowser chromiumBrowser) : this(client, chromiumBrowser, null, null)
 {
 }
 public ChromiumRawMouse(ChromiumSession client)
 {
     _client = client;
 }