mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 568925 - Remote History Set Title for URI. r=cjones, sr=bz
This commit is contained in:
parent
dbd3ee48de
commit
848fbc02f4
@ -454,6 +454,17 @@ ContentParent::RecvVisitURI(const IPC::URI& uri,
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
ContentParent::RecvSetURITitle(const IPC::URI& uri,
|
||||
const nsString& title)
|
||||
{
|
||||
nsCOMPtr<nsIURI> ourURI = uri;
|
||||
IHistory *history = nsContentUtils::GetHistory();
|
||||
history->SetURITitle(ourURI, title);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* void onDispatchedEvent (in nsIThreadInternal thread); */
|
||||
NS_IMETHODIMP
|
||||
ContentParent::OnDispatchedEvent(nsIThreadInternal *thread)
|
||||
|
@ -152,6 +152,9 @@ private:
|
||||
const IPC::URI& referrer,
|
||||
const PRUint32& flags);
|
||||
|
||||
virtual bool RecvSetURITitle(const IPC::URI& uri,
|
||||
const nsString& title);
|
||||
|
||||
mozilla::Monitor mMonitor;
|
||||
|
||||
GeckoChildProcessHost* mSubprocess;
|
||||
|
@ -79,6 +79,7 @@ parent:
|
||||
|
||||
async StartVisitedQuery(URI uri);
|
||||
async VisitURI(URI uri, URI referrer, PRUint32 flags);
|
||||
async SetURITitle(URI uri, nsString title);
|
||||
|
||||
// PrefService messages
|
||||
sync GetPrefType(nsCString prefName) returns (PRInt32 retValue, nsresult rv);
|
||||
|
@ -1264,6 +1264,16 @@ History::SetURITitle(nsIURI* aURI, const nsAString& aTitle)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
mozilla::dom::ContentChild * cpc =
|
||||
mozilla::dom::ContentChild::GetSingleton();
|
||||
NS_ASSERTION(cpc, "Content Protocol is NULL!");
|
||||
(void)cpc->SendSetURITitle(IPC::URI(aURI), nsDependentString(aTitle));
|
||||
return NS_OK;
|
||||
}
|
||||
#endif /* MOZ_IPC */
|
||||
|
||||
nsNavHistory* history = nsNavHistory::GetHistoryService();
|
||||
|
||||
// At first, it seems like nav history should always be available here, no
|
||||
|
Loading…
Reference in New Issue
Block a user