Bug 699356 - Show the URL of the page in the title of the View Source window. r=smaug.

This commit is contained in:
Henri Sivonen
2011-11-30 19:44:31 +02:00
parent ad196dc350
commit 72a4aefa74
9 changed files with 54 additions and 15 deletions

View File

@@ -220,6 +220,13 @@ class nsHtml5StreamParser : public nsIStreamListener,
*/
void SetEncodingFromExpat(const PRUnichar* aEncoding);
/**
* Sets the URL for View Source title in case this parser ends up being
* used for View Source. If aURL is a view-source: URL, takes the inner
* URL. data: URLs are shown with an ellipsis instead of the actual data.
*/
void SetViewSourceTitle(nsIURI* aURL);
private:
#ifdef DEBUG
@@ -385,6 +392,11 @@ class nsHtml5StreamParser : public nsIStreamListener,
nsCOMPtr<nsIRequest> mRequest;
nsCOMPtr<nsIRequestObserver> mObserver;
/**
* The document title to use if this turns out to be a View Source parser.
*/
nsCString mViewSourceTitle;
/**
* The Unicode decoder
*/