зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1431846 part 3. Make nsPIDOMWindowOuter::GetNavigator return dom::Navigator*. r=mystor
MozReview-Commit-ID: DgZWMcSg0PT
This commit is contained in:
Родитель
16c84b6c1b
Коммит
b5937fb6a0
|
@ -2603,7 +2603,7 @@ nsPIDOMWindowOuter::SetFrameElementInternal(Element* aFrameElement)
|
||||||
mFrameElement = aFrameElement;
|
mFrameElement = aFrameElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIDOMNavigator*
|
Navigator*
|
||||||
nsGlobalWindowOuter::GetNavigator()
|
nsGlobalWindowOuter::GetNavigator()
|
||||||
{
|
{
|
||||||
FORWARD_TO_INNER(Navigator, (), nullptr);
|
FORWARD_TO_INNER(Navigator, (), nullptr);
|
||||||
|
|
|
@ -608,7 +608,7 @@ public:
|
||||||
nsIDocShellLoadInfo* aLoadInfo,
|
nsIDocShellLoadInfo* aLoadInfo,
|
||||||
bool aForceNoOpener,
|
bool aForceNoOpener,
|
||||||
nsPIDOMWindowOuter **_retval) override;
|
nsPIDOMWindowOuter **_retval) override;
|
||||||
nsIDOMNavigator* GetNavigator() override;
|
mozilla::dom::Navigator* GetNavigator() override;
|
||||||
|
|
||||||
#if defined(MOZ_WIDGET_ANDROID)
|
#if defined(MOZ_WIDGET_ANDROID)
|
||||||
int16_t Orientation(mozilla::dom::CallerType aCallerType) const;
|
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
|
// XXX(nika): These feel like they should be inner window only, but they're
|
||||||
// called on the outer window.
|
// called on the outer window.
|
||||||
virtual nsIDOMScreen* GetScreen() = 0;
|
virtual nsIDOMScreen* GetScreen() = 0;
|
||||||
virtual nsIDOMNavigator* GetNavigator() = 0;
|
virtual mozilla::dom::Navigator* GetNavigator() = 0;
|
||||||
virtual mozilla::dom::Location* GetLocation() = 0;
|
virtual mozilla::dom::Location* GetLocation() = 0;
|
||||||
|
|
||||||
virtual nsresult GetPrompter(nsIPrompt** aPrompt) = 0;
|
virtual nsresult GetPrompter(nsIPrompt** aPrompt) = 0;
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
#include "nsHttpAuthCache.h"
|
#include "nsHttpAuthCache.h"
|
||||||
#include "nsStandardURL.h"
|
#include "nsStandardURL.h"
|
||||||
#include "nsIDOMWindow.h"
|
#include "nsIDOMWindow.h"
|
||||||
#include "nsIDOMNavigator.h"
|
|
||||||
#include "nsIMozNavigatorNetwork.h"
|
|
||||||
#include "nsINetworkProperties.h"
|
#include "nsINetworkProperties.h"
|
||||||
#include "nsIHttpChannel.h"
|
#include "nsIHttpChannel.h"
|
||||||
#include "nsIStandardURL.h"
|
#include "nsIStandardURL.h"
|
||||||
|
@ -69,6 +67,7 @@
|
||||||
#include "mozilla/BasePrincipal.h"
|
#include "mozilla/BasePrincipal.h"
|
||||||
|
|
||||||
#include "mozilla/dom/ContentParent.h"
|
#include "mozilla/dom/ContentParent.h"
|
||||||
|
#include "mozilla/dom/Navigator.h"
|
||||||
|
|
||||||
#include "nsNSSComponent.h"
|
#include "nsNSSComponent.h"
|
||||||
|
|
||||||
|
@ -2655,14 +2654,12 @@ nsHttpHandler::TickleWifi(nsIInterfaceRequestor *cb)
|
||||||
if (!piWindow)
|
if (!piWindow)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMNavigator> domNavigator = piWindow->GetNavigator();
|
RefPtr<dom::Navigator> navigator = piWindow->GetNavigator();
|
||||||
nsCOMPtr<nsIMozNavigatorNetwork> networkNavigator =
|
if (!navigator)
|
||||||
do_QueryInterface(domNavigator);
|
|
||||||
if (!networkNavigator)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
nsCOMPtr<nsINetworkProperties> networkProperties;
|
nsCOMPtr<nsINetworkProperties> networkProperties;
|
||||||
networkNavigator->GetProperties(getter_AddRefs(networkProperties));
|
navigator->GetProperties(getter_AddRefs(networkProperties));
|
||||||
if (!networkProperties)
|
if (!networkProperties)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче