Bug 1431846 part 3. Make nsPIDOMWindowOuter::GetNavigator return dom::Navigator*. r=mystor

MozReview-Commit-ID: DgZWMcSg0PT
This commit is contained in:
Boris Zbarsky 2018-01-22 12:59:15 -05:00
Родитель 16c84b6c1b
Коммит b5937fb6a0
4 изменённых файлов: 7 добавлений и 10 удалений

Просмотреть файл

@ -2603,7 +2603,7 @@ nsPIDOMWindowOuter::SetFrameElementInternal(Element* aFrameElement)
mFrameElement = aFrameElement;
}
nsIDOMNavigator*
Navigator*
nsGlobalWindowOuter::GetNavigator()
{
FORWARD_TO_INNER(Navigator, (), nullptr);

Просмотреть файл

@ -608,7 +608,7 @@ public:
nsIDocShellLoadInfo* aLoadInfo,
bool aForceNoOpener,
nsPIDOMWindowOuter **_retval) override;
nsIDOMNavigator* GetNavigator() override;
mozilla::dom::Navigator* GetNavigator() override;
#if defined(MOZ_WIDGET_ANDROID)
int16_t Orientation(mozilla::dom::CallerType aCallerType) const;

Просмотреть файл

@ -1101,7 +1101,7 @@ public:
// XXX(nika): These feel like they should be inner window only, but they're
// called on the outer window.
virtual nsIDOMScreen* GetScreen() = 0;
virtual nsIDOMNavigator* GetNavigator() = 0;
virtual mozilla::dom::Navigator* GetNavigator() = 0;
virtual mozilla::dom::Location* GetLocation() = 0;
virtual nsresult GetPrompter(nsIPrompt** aPrompt) = 0;

Просмотреть файл

@ -16,8 +16,6 @@
#include "nsHttpAuthCache.h"
#include "nsStandardURL.h"
#include "nsIDOMWindow.h"
#include "nsIDOMNavigator.h"
#include "nsIMozNavigatorNetwork.h"
#include "nsINetworkProperties.h"
#include "nsIHttpChannel.h"
#include "nsIStandardURL.h"
@ -69,6 +67,7 @@
#include "mozilla/BasePrincipal.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/Navigator.h"
#include "nsNSSComponent.h"
@ -2655,14 +2654,12 @@ nsHttpHandler::TickleWifi(nsIInterfaceRequestor *cb)
if (!piWindow)
return;
nsCOMPtr<nsIDOMNavigator> domNavigator = piWindow->GetNavigator();
nsCOMPtr<nsIMozNavigatorNetwork> networkNavigator =
do_QueryInterface(domNavigator);
if (!networkNavigator)
RefPtr<dom::Navigator> navigator = piWindow->GetNavigator();
if (!navigator)
return;
nsCOMPtr<nsINetworkProperties> networkProperties;
networkNavigator->GetProperties(getter_AddRefs(networkProperties));
navigator->GetProperties(getter_AddRefs(networkProperties));
if (!networkProperties)
return;