Beispiel #1
0
nsresult
PresentationRequestParent::DoRequest(const StartSessionRequest& aRequest)
{
  MOZ_ASSERT(mService);
  return mService->StartSession(aRequest.url(), aRequest.sessionId(),
                                aRequest.origin(), this);
}
nsresult
PresentationRequestParent::DoRequest(const StartSessionRequest& aRequest)
{
  MOZ_ASSERT(mService);

  // Set window ID to 0 since the window is from content process.
  return mService->StartSession(aRequest.url(), aRequest.sessionId(),
                                aRequest.origin(), aRequest.deviceId(), 0, this);
}
nsresult
PresentationRequestParent::DoRequest(const StartSessionRequest& aRequest)
{
  MOZ_ASSERT(mService);
  mNeedRegisterBuilder = true;
  mSessionId = aRequest.sessionId();
  return mService->StartSession(aRequest.url(), aRequest.sessionId(),
                                aRequest.origin(), aRequest.deviceId(),
                                aRequest.windowId(), this);
}
nsresult
PresentationRequestParent::DoRequest(const StartSessionRequest& aRequest)
{
  MOZ_ASSERT(mService);
  mNeedRegisterBuilder = true;
  mSessionId = aRequest.sessionId();

  nsCOMPtr<nsIDOMEventTarget> eventTarget;
  ContentProcessManager* cpm = ContentProcessManager::GetSingleton();
  RefPtr<TabParent> tp =
    cpm->GetTopLevelTabParentByProcessAndTabId(mChildId, aRequest.tabId());
  if (tp) {
    eventTarget = do_QueryInterface(tp->GetOwnerElement());
  }
  
  return mService->StartSession(aRequest.urls(), aRequest.sessionId(),
                                aRequest.origin(), aRequest.deviceId(),
                                aRequest.windowId(), eventTarget, this);
}
nsresult
PresentationRequestParent::DoRequest(const StartSessionRequest& aRequest)
{
  MOZ_ASSERT(mService);

  mSessionId = aRequest.sessionId();

  nsCOMPtr<nsIDOMEventTarget> eventTarget;
  ContentProcessManager* cpm = ContentProcessManager::GetSingleton();
  RefPtr<TabParent> tp =
    cpm->GetTopLevelTabParentByProcessAndTabId(mChildId, aRequest.tabId());
  if (tp) {
    eventTarget = do_QueryInterface(tp->GetOwnerElement());
  }

  RefPtr<PresentationParent> parent = static_cast<PresentationParent*>(Manager());
  nsCOMPtr<nsIPresentationTransportBuilderConstructor> constructor =
    new PresentationTransportBuilderConstructorIPC(parent);
  return mService->StartSession(aRequest.urls(), aRequest.sessionId(),
                                aRequest.origin(), aRequest.deviceId(),
                                aRequest.windowId(), eventTarget,
                                aRequest.principal(), this, constructor);
}