зеркало из https://github.com/mozilla/pjs.git
Bug 568925 - [e10s] remote History Set Title for URI. r=cjones
This commit is contained in:
Родитель
b909158342
Коммит
0003c77272
|
@ -421,6 +421,17 @@ ContentProcessParent::RecvVisitURI(const IPC::URI& uri,
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
ContentProcessParent::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
|
||||
ContentProcessParent::OnDispatchedEvent(nsIThreadInternal *thread)
|
||||
|
|
|
@ -145,6 +145,9 @@ private:
|
|||
|
||||
virtual bool RecvStartVisitedQuery(const IPC::URI& uri);
|
||||
|
||||
virtual bool RecvSetURITitle(const IPC::URI& uri,
|
||||
const nsString& title);
|
||||
|
||||
mozilla::Monitor mMonitor;
|
||||
|
||||
GeckoChildProcessHost* mSubprocess;
|
||||
|
|
|
@ -76,6 +76,7 @@ parent:
|
|||
PNecko();
|
||||
|
||||
async VisitURI(URI uri, URI referrer, PRUint32 flags);
|
||||
async SetURITitle(URI uri, nsString title);
|
||||
async StartVisitedQuery(URI uri);
|
||||
|
||||
// prefs-related messages ...
|
||||
|
|
|
@ -1187,6 +1187,15 @@ NS_IMETHODIMP
|
|||
History::SetURITitle(nsIURI* aURI, const nsAString& aTitle)
|
||||
{
|
||||
NS_PRECONDITION(aURI, "Must pass a non-null URI!");
|
||||
#ifdef MOZ_IPC
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
mozilla::dom::ContentProcessChild* cpc =
|
||||
mozilla::dom::ContentProcessChild::GetSingleton();
|
||||
NS_ASSERTION(cpc, "Content Protocol is NULL!");
|
||||
(void)cpc->SendSetURITitle(IPC::URI(aURI), aTitle);
|
||||
return NS_OK;
|
||||
}
|
||||
#endif /* MOZ_IPC */
|
||||
|
||||
nsNavHistory* history = nsNavHistory::GetHistoryService();
|
||||
PRBool canAdd;
|
||||
|
|
Загрузка…
Ссылка в новой задаче