예제 #1
0
        /// <summary>
        /// Load a URL into the document.
        /// </summary>
        /// <param name="url">The URL to laod.</param>
        /// <param name="waitForComplete">If false, makes to execution of LoadUri asynchronous.</param>
        protected override void LoadUri(Uri url, bool waitForComplete)
        {
            if (!url.IsFile)
            {
                var command = string.Format("window.location.href='{0}\';", url.AbsoluteUri);
                if (!waitForComplete)
                {
                    command = JSUtils.WrapCommandInTimer(command);
                }

                this.ClientPort.Write(command);
                this.ReAttachToTab(url);
            }
            else
            {
                // Need to reopen Chrome to go to a file based url.
                // #TODO if the current url is a file url do we still need to??
                this.Reopen(url);
            }
        }