зеркало из https://github.com/mozilla/pjs.git
Fixed a bunch of "const" problems
This commit is contained in:
Родитель
b7d8b00802
Коммит
a615ee3c8a
|
@ -174,7 +174,7 @@ public:
|
|||
NS_IMETHOD GetChildCount(PRInt32& aResult);
|
||||
NS_IMETHOD AddChild(nsIWebShell* aChild);
|
||||
NS_IMETHOD ChildAt(PRInt32 aIndex, nsIWebShell*& aResult);
|
||||
NS_IMETHOD GetName(PRUnichar** aName);
|
||||
NS_IMETHOD GetName(const PRUnichar** aName);
|
||||
NS_IMETHOD SetName(const PRUnichar* aName);
|
||||
NS_IMETHOD FindChildWithName(const PRUnichar* aName,
|
||||
nsIWebShell*& aResult);
|
||||
|
@ -212,11 +212,11 @@ public:
|
|||
NS_IMETHOD GoTo(PRInt32 aHistoryIndex);
|
||||
NS_IMETHOD GetHistoryLength(PRInt32& aResult);
|
||||
NS_IMETHOD GetHistoryIndex(PRInt32& aResult);
|
||||
NS_IMETHOD GetURL(PRInt32 aHistoryIndex, PRUnichar** aURLResult);
|
||||
NS_IMETHOD GetURL(PRInt32 aHistoryIndex, const PRUnichar** aURLResult);
|
||||
|
||||
// Chrome api's
|
||||
NS_IMETHOD SetTitle(const PRUnichar* aTitle);
|
||||
NS_IMETHOD GetTitle(PRUnichar** aResult);
|
||||
NS_IMETHOD GetTitle(const PRUnichar** aResult);
|
||||
|
||||
// nsIWebShellContainer
|
||||
NS_IMETHOD WillLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, nsLoadType aReason);
|
||||
|
@ -1090,7 +1090,7 @@ nsWebShell::ChildAt(PRInt32 aIndex, nsIWebShell*& aResult)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShell::GetName(PRUnichar** aName)
|
||||
nsWebShell::GetName(const PRUnichar** aName)
|
||||
{
|
||||
*aName = mName;
|
||||
return NS_OK;
|
||||
|
@ -1110,7 +1110,7 @@ nsWebShell::FindChildWithName(const PRUnichar* aName1,
|
|||
aResult = nsnull;
|
||||
nsString aName(aName1);
|
||||
|
||||
PRUnichar *childName;
|
||||
const PRUnichar *childName;
|
||||
PRInt32 i, n = mChildren.Count();
|
||||
for (i = 0; i < n; i++) {
|
||||
nsIWebShell* child = (nsIWebShell*) mChildren.ElementAt(i);
|
||||
|
@ -1506,7 +1506,7 @@ nsWebShell::GetHistoryIndex(PRInt32& aResult)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShell::GetURL(PRInt32 aHistoryIndex, PRUnichar** aURLResult)
|
||||
nsWebShell::GetURL(PRInt32 aHistoryIndex, const PRUnichar** aURLResult)
|
||||
{
|
||||
nsresult rv = NS_ERROR_ILLEGAL_VALUE;
|
||||
if ((aHistoryIndex >= 0) &&
|
||||
|
@ -1568,7 +1568,7 @@ nsWebShell::SetTitle(const PRUnichar* aTitle)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShell::GetTitle(PRUnichar** aResult)
|
||||
nsWebShell::GetTitle(const PRUnichar** aResult)
|
||||
{
|
||||
*aResult = mTitle;
|
||||
return NS_OK;
|
||||
|
|
|
@ -80,11 +80,11 @@ public:
|
|||
|
||||
NS_IMETHOD SetTitle(const PRUnichar* aTitle) = 0;
|
||||
|
||||
NS_IMETHOD GetTitle(PRUnichar** aResult) = 0;
|
||||
NS_IMETHOD GetTitle(const PRUnichar** aResult) = 0;
|
||||
|
||||
NS_IMETHOD SetStatus(const PRUnichar* aStatus) = 0;
|
||||
|
||||
NS_IMETHOD GetStatus(PRUnichar** aResult) = 0;
|
||||
NS_IMETHOD GetStatus(const PRUnichar** aResult) = 0;
|
||||
|
||||
NS_IMETHOD SetProgress(PRInt32 aProgress, PRInt32 aProgressMax) = 0;
|
||||
|
||||
|
|
|
@ -237,7 +237,7 @@ public:
|
|||
/**
|
||||
* Return the name of the current WebShell.
|
||||
*/
|
||||
NS_IMETHOD GetName(PRUnichar** aName) = 0;
|
||||
NS_IMETHOD GetName(const PRUnichar** aName) = 0;
|
||||
|
||||
/**
|
||||
* Set the name of the current WebShell.
|
||||
|
@ -300,12 +300,12 @@ public:
|
|||
NS_IMETHOD GoTo(PRInt32 aHistoryIndex) = 0;
|
||||
NS_IMETHOD GetHistoryLength(PRInt32& aResult) = 0;
|
||||
NS_IMETHOD GetHistoryIndex(PRInt32& aResult) = 0;
|
||||
NS_IMETHOD GetURL(PRInt32 aHistoryIndex, PRUnichar **aURLResult) = 0;
|
||||
NS_IMETHOD GetURL(PRInt32 aHistoryIndex, const PRUnichar **aURLResult) = 0;
|
||||
|
||||
// Chrome api's
|
||||
NS_IMETHOD SetTitle(const PRUnichar *aTitle) = 0;
|
||||
|
||||
NS_IMETHOD GetTitle(PRUnichar **aResult) = 0;
|
||||
NS_IMETHOD GetTitle(const PRUnichar **aResult) = 0;
|
||||
// SetToolBar
|
||||
// SetMenuBar
|
||||
// SetStatusBar
|
||||
|
|
|
@ -174,7 +174,7 @@ public:
|
|||
NS_IMETHOD GetChildCount(PRInt32& aResult);
|
||||
NS_IMETHOD AddChild(nsIWebShell* aChild);
|
||||
NS_IMETHOD ChildAt(PRInt32 aIndex, nsIWebShell*& aResult);
|
||||
NS_IMETHOD GetName(PRUnichar** aName);
|
||||
NS_IMETHOD GetName(const PRUnichar** aName);
|
||||
NS_IMETHOD SetName(const PRUnichar* aName);
|
||||
NS_IMETHOD FindChildWithName(const PRUnichar* aName,
|
||||
nsIWebShell*& aResult);
|
||||
|
@ -212,11 +212,11 @@ public:
|
|||
NS_IMETHOD GoTo(PRInt32 aHistoryIndex);
|
||||
NS_IMETHOD GetHistoryLength(PRInt32& aResult);
|
||||
NS_IMETHOD GetHistoryIndex(PRInt32& aResult);
|
||||
NS_IMETHOD GetURL(PRInt32 aHistoryIndex, PRUnichar** aURLResult);
|
||||
NS_IMETHOD GetURL(PRInt32 aHistoryIndex, const PRUnichar** aURLResult);
|
||||
|
||||
// Chrome api's
|
||||
NS_IMETHOD SetTitle(const PRUnichar* aTitle);
|
||||
NS_IMETHOD GetTitle(PRUnichar** aResult);
|
||||
NS_IMETHOD GetTitle(const PRUnichar** aResult);
|
||||
|
||||
// nsIWebShellContainer
|
||||
NS_IMETHOD WillLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, nsLoadType aReason);
|
||||
|
@ -1090,7 +1090,7 @@ nsWebShell::ChildAt(PRInt32 aIndex, nsIWebShell*& aResult)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShell::GetName(PRUnichar** aName)
|
||||
nsWebShell::GetName(const PRUnichar** aName)
|
||||
{
|
||||
*aName = mName;
|
||||
return NS_OK;
|
||||
|
@ -1110,7 +1110,7 @@ nsWebShell::FindChildWithName(const PRUnichar* aName1,
|
|||
aResult = nsnull;
|
||||
nsString aName(aName1);
|
||||
|
||||
PRUnichar *childName;
|
||||
const PRUnichar *childName;
|
||||
PRInt32 i, n = mChildren.Count();
|
||||
for (i = 0; i < n; i++) {
|
||||
nsIWebShell* child = (nsIWebShell*) mChildren.ElementAt(i);
|
||||
|
@ -1506,7 +1506,7 @@ nsWebShell::GetHistoryIndex(PRInt32& aResult)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShell::GetURL(PRInt32 aHistoryIndex, PRUnichar** aURLResult)
|
||||
nsWebShell::GetURL(PRInt32 aHistoryIndex, const PRUnichar** aURLResult)
|
||||
{
|
||||
nsresult rv = NS_ERROR_ILLEGAL_VALUE;
|
||||
if ((aHistoryIndex >= 0) &&
|
||||
|
@ -1568,7 +1568,7 @@ nsWebShell::SetTitle(const PRUnichar* aTitle)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShell::GetTitle(PRUnichar** aResult)
|
||||
nsWebShell::GetTitle(const PRUnichar** aResult)
|
||||
{
|
||||
*aResult = mTitle;
|
||||
return NS_OK;
|
||||
|
|
|
@ -429,7 +429,7 @@ nsBrowserWindow::DispatchMenuItem(PRInt32 aID)
|
|||
{
|
||||
PRInt32 theIndex;
|
||||
mWebShell->GetHistoryIndex(theIndex);
|
||||
PRUnichar* theURL;
|
||||
const PRUnichar* theURL;
|
||||
mWebShell->GetURL(theIndex,&theURL);
|
||||
nsAutoString theString(theURL);
|
||||
mApp->ViewSource(theString);
|
||||
|
@ -1711,7 +1711,7 @@ nsBrowserWindow::SetTitle(const PRUnichar* aTitle)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBrowserWindow::GetTitle(PRUnichar** aResult)
|
||||
nsBrowserWindow::GetTitle(const PRUnichar** aResult)
|
||||
{
|
||||
*aResult = mTitle;
|
||||
return NS_OK;
|
||||
|
@ -1728,7 +1728,7 @@ nsBrowserWindow::SetStatus(const PRUnichar* aStatus)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBrowserWindow::GetStatus(PRUnichar** aResult)
|
||||
nsBrowserWindow::GetStatus(const PRUnichar** aResult)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -1849,7 +1849,7 @@ nsBrowserWindow::FindWebShellWithName(const PRUnichar* aName, nsIWebShell*& aRes
|
|||
nsIWebShell *ws;
|
||||
|
||||
if (NS_OK == bw->GetWebShell(ws)) {
|
||||
PRUnichar *name;
|
||||
const PRUnichar *name;
|
||||
if (NS_OK == ws->GetName(&name)) {
|
||||
if (aNameStr.Equals(name)) {
|
||||
aResult = ws;
|
||||
|
@ -2536,7 +2536,7 @@ nsBrowserWindow::DoEditorMode(nsIWebShell *aWebShell)
|
|||
|
||||
static void DumpAWebShell(nsIWebShell* aShell, FILE* out, PRInt32 aIndent)
|
||||
{
|
||||
PRUnichar *name;
|
||||
const PRUnichar *name;
|
||||
nsAutoString str;
|
||||
nsIWebShell* parent;
|
||||
PRInt32 i, n;
|
||||
|
@ -2826,7 +2826,7 @@ nsBrowserWindow::DoDebugSave()
|
|||
PRBool doSave = PR_FALSE;
|
||||
nsString path;
|
||||
|
||||
PRUnichar *urlString;
|
||||
const PRUnichar *urlString;
|
||||
mWebShell->GetURL(0,&urlString);
|
||||
nsIURL* url;
|
||||
nsresult rv = NS_NewURL(&url, urlString);
|
||||
|
|
|
@ -90,9 +90,9 @@ public:
|
|||
NS_IMETHOD SetChrome(PRUint32 aNewChromeMask);
|
||||
NS_IMETHOD GetChrome(PRUint32& aChromeMaskResult);
|
||||
NS_IMETHOD SetTitle(const PRUnichar* aTitle);
|
||||
NS_IMETHOD GetTitle(PRUnichar** aResult);
|
||||
NS_IMETHOD GetTitle(const PRUnichar** aResult);
|
||||
NS_IMETHOD SetStatus(const PRUnichar* aStatus);
|
||||
NS_IMETHOD GetStatus(PRUnichar** aResult);
|
||||
NS_IMETHOD GetStatus(const PRUnichar** aResult);
|
||||
NS_IMETHOD SetProgress(PRInt32 aProgress, PRInt32 aProgressMax);
|
||||
NS_IMETHOD GetWebShell(nsIWebShell*& aResult);
|
||||
|
||||
|
|
|
@ -375,7 +375,7 @@ NS_IMETHODIMP nsXPBaseWindow::SetTitle(const PRUnichar* aTitle)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
NS_IMETHODIMP nsXPBaseWindow::GetTitle(PRUnichar** aResult)
|
||||
NS_IMETHODIMP nsXPBaseWindow::GetTitle(const PRUnichar** aResult)
|
||||
{
|
||||
*aResult = mTitle;
|
||||
return NS_OK;
|
||||
|
@ -437,7 +437,7 @@ NS_IMETHODIMP nsXPBaseWindow::FindWebShellWithName(const PRUnichar* aName, nsIWe
|
|||
nsIWebShell *ws;
|
||||
|
||||
if (NS_OK == GetWebShell(ws)) {
|
||||
PRUnichar *name;
|
||||
const PRUnichar *name;
|
||||
if (NS_OK == ws->GetName(&name)) {
|
||||
if (aNameStr.Equals(name)) {
|
||||
aResult = ws;
|
||||
|
|
|
@ -79,7 +79,7 @@ public:
|
|||
NS_IMETHOD SetVisible(PRBool aIsVisible);
|
||||
NS_IMETHOD Close();
|
||||
NS_IMETHOD SetTitle(const PRUnichar* aTitle);
|
||||
NS_IMETHOD GetTitle(PRUnichar** aResult);
|
||||
NS_IMETHOD GetTitle(const PRUnichar** aResult);
|
||||
NS_IMETHOD GetWebShell(nsIWebShell*& aResult);
|
||||
NS_IMETHOD GetPresShell(nsIPresShell*& aPresShell);
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ public:
|
|||
|
||||
NS_IMETHOD SetTitle(const PRUnichar* aTitle) = 0;
|
||||
|
||||
NS_IMETHOD GetTitle(PRUnichar** aResult) = 0;
|
||||
NS_IMETHOD GetTitle(const PRUnichar** aResult) = 0;
|
||||
|
||||
NS_IMETHOD GetWebShell(nsIWebShell*& aResult) = 0;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче