예제 #1
0
PermissionStatus::PermissionStatus(nsPIDOMWindowInner* aWindow,
                                   PermissionName aName)
    : DOMEventTargetHelper(aWindow),
      mName(aName),
      mState(PermissionState::Denied) {
  KeepAliveIfHasListenersFor(NS_LITERAL_STRING("change"));
}
예제 #2
0
BroadcastChannel::BroadcastChannel(nsPIDOMWindowInner* aWindow,
                                   const nsAString& aChannel)
  : DOMEventTargetHelper(aWindow)
  , mChannel(aChannel)
  , mState(StateActive)
{
  // Window can be null in workers

  KeepAliveIfHasListenersFor(NS_LITERAL_STRING("message"));
}
예제 #3
0
BroadcastChannel::BroadcastChannel(nsPIDOMWindowInner* aWindow,
                                   const PrincipalInfo& aPrincipalInfo,
                                   const nsACString& aOrigin,
                                   const nsAString& aChannel)
  : DOMEventTargetHelper(aWindow)
  , mWorkerHolder(nullptr)
  , mPrincipalInfo(new PrincipalInfo(aPrincipalInfo))
  , mOrigin(aOrigin)
  , mChannel(aChannel)
  , mInnerID(0)
  , mState(StateActive)
{
  // Window can be null in workers

  KeepAliveIfHasListenersFor(NS_LITERAL_STRING("message"));
}