void fire(LocalFrame* frame) override
 {
     OwnPtr<UserGestureIndicator> gestureIndicator = createUserGestureIndicator();
     ResourceRequest resourceRequest =
         frame->loader().resourceRequestForReload(FrameLoadTypeReload, KURL(), ClientRedirect);
     if (resourceRequest.isNull())
         return;
     FrameLoadRequest request = FrameLoadRequest(nullptr, resourceRequest);
     request.setClientRedirect(ClientRedirect);
     frame->loader().load(request, FrameLoadTypeReload);
 }
Example #2
0
void LocalFrame::reload(FrameLoadType loadType,
                        ClientRedirectPolicy clientRedirectPolicy) {
  DCHECK(isReloadLoadType(loadType));
  if (clientRedirectPolicy == ClientRedirectPolicy::NotClientRedirect) {
    if (!m_loader.currentItem())
      return;
    FrameLoadRequest request =
        FrameLoadRequest(nullptr, m_loader.resourceRequestForReload(
                                      loadType, KURL(), clientRedirectPolicy));
    request.setClientRedirect(clientRedirectPolicy);
    m_loader.load(request, loadType);
  } else {
    DCHECK_EQ(FrameLoadTypeReload, loadType);
    m_navigationScheduler->scheduleReload();
  }
}