Adding new history interface method onto webshell, removing enums types from linkhandler

This commit is contained in:
joki%netscape.com 1999-01-28 23:13:48 +00:00
parent ab06020c2a
commit 785c19b2d1
4 changed files with 17 additions and 14 deletions

View File

@ -207,6 +207,7 @@ public:
NS_IMETHOD Forward(void);
NS_IMETHOD CanForward(void);
NS_IMETHOD GoTo(PRInt32 aHistoryIndex);
NS_IMETHOD GetHistoryLength(PRInt32& aResult);
NS_IMETHOD GetHistoryIndex(PRInt32& aResult);
NS_IMETHOD GetURL(PRInt32 aHistoryIndex, PRUnichar** aURLResult);
@ -1452,6 +1453,13 @@ nsWebShell::GoTo(PRInt32 aHistoryIndex)
return rv;
}
NS_IMETHODIMP
nsWebShell::GetHistoryLength(PRInt32& aResult)
{
aResult = mHistory.Count();
return NS_OK;
}
NS_IMETHODIMP
nsWebShell::GetHistoryIndex(PRInt32& aResult)
{
@ -1840,12 +1848,6 @@ nsWebShell:: GetLinkState(const PRUnichar* aURLSpec, nsLinkState& aState)
else if (URLSpec.Equals("http://out-of-date/")) {
aState = eLinkState_OutOfDate;
}
else if (URLSpec.Equals("http://active/")) {
aState = eLinkState_Active;
}
else if (URLSpec.Equals("http://hover/")) {
aState = eLinkState_Hover;
}
#endif
return NS_OK;
}

View File

@ -34,8 +34,6 @@ enum nsLinkState {
eLinkState_Unvisited = 0,
eLinkState_Visited = 1,
eLinkState_OutOfDate = 2, // visited, but the cache is stale
eLinkState_Active = 3, // mouse is down on link
eLinkState_Hover = 4 // mouse is hovering over link
};
// XXX Verb to use for link actuation. These are the verbs specified

View File

@ -298,6 +298,7 @@ public:
NS_IMETHOD Forward() = 0;
NS_IMETHOD CanForward() = 0;
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;

View File

@ -207,6 +207,7 @@ public:
NS_IMETHOD Forward(void);
NS_IMETHOD CanForward(void);
NS_IMETHOD GoTo(PRInt32 aHistoryIndex);
NS_IMETHOD GetHistoryLength(PRInt32& aResult);
NS_IMETHOD GetHistoryIndex(PRInt32& aResult);
NS_IMETHOD GetURL(PRInt32 aHistoryIndex, PRUnichar** aURLResult);
@ -1452,6 +1453,13 @@ nsWebShell::GoTo(PRInt32 aHistoryIndex)
return rv;
}
NS_IMETHODIMP
nsWebShell::GetHistoryLength(PRInt32& aResult)
{
aResult = mHistory.Count();
return NS_OK;
}
NS_IMETHODIMP
nsWebShell::GetHistoryIndex(PRInt32& aResult)
{
@ -1840,12 +1848,6 @@ nsWebShell:: GetLinkState(const PRUnichar* aURLSpec, nsLinkState& aState)
else if (URLSpec.Equals("http://out-of-date/")) {
aState = eLinkState_OutOfDate;
}
else if (URLSpec.Equals("http://active/")) {
aState = eLinkState_Active;
}
else if (URLSpec.Equals("http://hover/")) {
aState = eLinkState_Hover;
}
#endif
return NS_OK;
}