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