예제 #1
0
        /// <summary>Destroy our childs.</summary>
        protected void DestroyChildren()
        {
            if (LOG.IsDebugEnabled)
            {
                LOG.Debug("destroyChildren");
            }
            JobManager.RemoveAllJobs();

            // try to deal with js thread adding a new window in between
            while (childWindows_.Count != 0)
            {
                WebWindowImpl window = childWindows_[0];
                RemoveChildWindow(window);
            }
        }
예제 #2
0
        /// <summary>
        /// <p><span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span></p>
        /// Destroy the child window.
        /// </summary>
        /// <param name="window">the child to destroy</param>
        public void RemoveChildWindow(WebWindowImpl window)
        {
            if (LOG.IsDebugEnabled)
            {
                LOG.Debug("closing child window: " + window);
            }
            window.IsClosed = true;
            window.JobManager.Shutdown();
            IPage page = window.EnclosedPage;

            if (page != null)
            {
                page.CleanUp();
            }
            window.DestroyChildren();

            lock (childWindows_)
            {
                childWindows_.Remove(window);
            }
        }
예제 #3
0
        /// <summary>
        /// <p><span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span></p>
        /// Destroy the child window.
        /// </summary>
        /// <param name="window">the child to destroy</param>
        public void RemoveChildWindow(WebWindowImpl window)
        {
            if (LOG.IsDebugEnabled)
            {
                LOG.Debug("closing child window: " + window);
            }
            window.IsClosed = true;
            window.JobManager.Shutdown();
            IPage page = window.EnclosedPage;
            if (page != null)
            {
                page.CleanUp();
            }
            window.DestroyChildren();

            lock (childWindows_)
            {
                childWindows_.Remove(window);
            }
        }