Bug 1285570 - Implement VISITED event as native method; r=snorp
Convert the VISITED event in GeckoEvent to a native method call in GeckoAppShell.
This commit is contained in:
@@ -373,6 +373,19 @@ public:
|
||||
aAccuracy, aBearing, aSpeed, aTime));
|
||||
gLocationCallback->Update(geoPosition);
|
||||
}
|
||||
|
||||
static void NotifyUriVisited(jni::String::Param aUri)
|
||||
{
|
||||
#ifdef MOZ_ANDROID_HISTORY
|
||||
nsCOMPtr<IHistory> history = services::GetHistoryService();
|
||||
nsCOMPtr<nsIURI> visitedURI;
|
||||
if (history &&
|
||||
NS_SUCCEEDED(NS_NewURI(getter_AddRefs(visitedURI),
|
||||
aUri->ToString()))) {
|
||||
history->NotifyVisited(visitedURI);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
nsAppShell::nsAppShell()
|
||||
@@ -823,19 +836,6 @@ nsAppShell::LegacyGeckoEvent::Run()
|
||||
break;
|
||||
}
|
||||
|
||||
case AndroidGeckoEvent::VISITED: {
|
||||
#ifdef MOZ_ANDROID_HISTORY
|
||||
nsCOMPtr<IHistory> history = services::GetHistoryService();
|
||||
nsCOMPtr<nsIURI> visitedURI;
|
||||
if (history &&
|
||||
NS_SUCCEEDED(NS_NewURI(getter_AddRefs(visitedURI),
|
||||
curEvent->Characters()))) {
|
||||
history->NotifyVisited(visitedURI);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
case AndroidGeckoEvent::NETWORK_CHANGED: {
|
||||
hal::NotifyNetworkChange(hal::NetworkInformation(curEvent->ConnectionType(),
|
||||
curEvent->IsWifi(),
|
||||
|
||||
Reference in New Issue
Block a user