mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 551181 - [e10s] Tell the chrome process when we visit a page. r=sdwilsh, r=cjones, sr=bz
This commit is contained in:
parent
047e7ae254
commit
88dc201cf3
@ -47,7 +47,7 @@
|
||||
#include "nsIPrefBranch2.h"
|
||||
#include "nsIPrefLocalizedString.h"
|
||||
#include "nsIObserverService.h"
|
||||
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
@ -441,6 +441,19 @@ ContentParent::RecvStartVisitedQuery(const IPC::URI& aURI)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
ContentParent::RecvVisitURI(const IPC::URI& uri,
|
||||
const IPC::URI& referrer,
|
||||
const PRUint32& flags)
|
||||
{
|
||||
nsCOMPtr<nsIURI> ourURI = uri;
|
||||
nsCOMPtr<nsIURI> ourReferrer = referrer;
|
||||
IHistory *history = nsContentUtils::GetHistory();
|
||||
history->VisitURI(ourURI, ourReferrer, flags);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* void onDispatchedEvent (in nsIThreadInternal thread); */
|
||||
NS_IMETHODIMP
|
||||
ContentParent::OnDispatchedEvent(nsIThreadInternal *thread)
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIThreadInternal.h"
|
||||
#include "mozilla/Monitor.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIPermissionManager.h"
|
||||
|
||||
@ -147,6 +148,10 @@ private:
|
||||
|
||||
virtual bool RecvStartVisitedQuery(const IPC::URI& uri);
|
||||
|
||||
virtual bool RecvVisitURI(const IPC::URI& uri,
|
||||
const IPC::URI& referrer,
|
||||
const PRUint32& flags);
|
||||
|
||||
mozilla::Monitor mMonitor;
|
||||
|
||||
GeckoChildProcessHost* mSubprocess;
|
||||
|
@ -78,6 +78,7 @@ parent:
|
||||
// Services remoting
|
||||
|
||||
async StartVisitedQuery(URI uri);
|
||||
async VisitURI(URI uri, URI referrer, PRUint32 flags);
|
||||
|
||||
// PrefService messages
|
||||
sync GetPrefType(nsCString prefName) returns (PRInt32 retValue, nsresult rv);
|
||||
|
@ -43,6 +43,11 @@
|
||||
#include "nsXULAppAPI.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
#endif
|
||||
|
||||
#include "History.h"
|
||||
#include "nsNavHistory.h"
|
||||
#include "nsNavBookmarks.h"
|
||||
@ -1079,6 +1084,16 @@ History::VisitURI(nsIURI* aURI,
|
||||
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->SendVisitURI(IPC::URI(aURI), IPC::URI(aLastVisitedURI), aFlags);
|
||||
return NS_OK;
|
||||
}
|
||||
#endif /* MOZ_IPC */
|
||||
|
||||
nsNavHistory* history = nsNavHistory::GetHistoryService();
|
||||
NS_ENSURE_TRUE(history, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
|
@ -104,4 +104,6 @@ EXTRA_PP_JS_MODULES = \
|
||||
PlacesUtils.jsm \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
Loading…
Reference in New Issue
Block a user