这篇教程C++ willSendRequest函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中willSendRequest函数的典型用法代码示例。如果您正苦于以下问题:C++ willSendRequest函数的具体用法?C++ willSendRequest怎么用?C++ willSendRequest使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了willSendRequest函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ASSERTbool ResourceLoader::load(const ResourceRequest& r){ ASSERT(!m_handle); ASSERT(m_deferredRequest.isNull()); ASSERT(!frameLoader()->isArchiveLoadPending(this)); m_originalURL = r.url(); ResourceRequest clientRequest(r); willSendRequest(clientRequest, ResourceResponse()); if (clientRequest.isNull()) { didFail(frameLoader()->cancelledError(r)); return false; } if (frameLoader()->willUseArchive(this, clientRequest, m_originalURL)) return true; if (m_defersLoading) { m_deferredRequest = clientRequest; return true; } m_handle = ResourceHandle::create(clientRequest, this, m_frame.get(), m_defersLoading, m_shouldContentSniff, true); return true;}
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:27,
示例2: clientRequestbool ResourceLoader::init(const ResourceRequest& r) { ResourceRequest clientRequest(r); willSendRequest(clientRequest, ResourceResponse()); m_request = clientRequest; return true;}
开发者ID:faust93,项目名称:Notes,代码行数:7,
示例3: ASSERTbool ResourceLoader::load(const ResourceRequest& r){ ASSERT(!m_handle); ASSERT(m_deferredRequest.isNull()); ASSERT(!m_documentLoader->isSubstituteLoadPending(this)); ResourceRequest clientRequest(r); willSendRequest(clientRequest, ResourceResponse()); if (clientRequest.isNull()) { didFail(frameLoader()->cancelledError(r)); return false; } if (m_documentLoader->scheduleArchiveLoad(this, clientRequest, r.url())) return true; #if ENABLE(OFFLINE_WEB_APPLICATIONS) if (m_documentLoader->applicationCacheHost()->maybeLoadResource(this, clientRequest, r.url())) return true;#endif if (m_defersLoading) { m_deferredRequest = clientRequest; return true; } m_handle = ResourceHandle::create(clientRequest, this, m_frame.get(), m_defersLoading, m_shouldContentSniff, true); return true;}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:30,
示例4: ENABLEvoid ResourceLoader::willSendRequest(ResourceHandle*, ResourceRequest& request, const ResourceResponse& redirectResponse){#if ENABLE(OFFLINE_WEB_APPLICATIONS) if (documentLoader()->applicationCacheHost()->maybeLoadFallbackForRedirect(this, request, redirectResponse)) return;#endif willSendRequest(request, redirectResponse);}
开发者ID:UIKit0,项目名称:WebkitAIR,代码行数:8,
示例5: ENABLEvoid ResourceLoader::willSendRequest(ResourceHandle*, ResourceRequest& request, const ResourceResponse& redirectResponse){#if ENABLE(OFFLINE_WEB_APPLICATIONS) if (!redirectResponse.isNull() && !protocolHostAndPortAreEqual(request.url(), redirectResponse.url())) { if (scheduleLoadFallbackResourceFromApplicationCache()) return; }#endif willSendRequest(request, redirectResponse);}
开发者ID:Katarzynasrom,项目名称:patch-hosting-for-android-x86-support,代码行数:10,
示例6: ResourceErrorvoid DocumentLoader::startLoadingMainResource(){ m_mainDocumentError = ResourceError(); timing()->markNavigationStart(); ASSERT(!m_mainResource); ASSERT(!m_loadingMainResource); m_loadingMainResource = true; if (maybeLoadEmpty()) return; ASSERT(timing()->navigationStart()); ASSERT(!timing()->fetchStart()); timing()->markFetchStart(); willSendRequest(m_request, ResourceResponse()); // willSendRequest() may lead to our Frame being detached or cancelling the load via nulling the ResourceRequest. if (!m_frame || m_request.isNull()) return; m_applicationCacheHost->willStartLoadingMainResource(m_request); prepareSubframeArchiveLoadIfNeeded(); if (m_substituteData.isValid()) { m_identifierForLoadWithoutResourceLoader = createUniqueIdentifier(); frameLoader()->notifier()->dispatchWillSendRequest(this, m_identifierForLoadWithoutResourceLoader, m_request, ResourceResponse()); handleSubstituteDataLoadSoon(); return; } ResourceRequest request(m_request); DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions, (SendCallbacks, SniffContent, DoNotBufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientForCrossOriginCredentials, SkipSecurityCheck, CheckContentSecurityPolicy, UseDefaultOriginRestrictionsForType)); CachedResourceRequest cachedResourceRequest(request, cachedResourceRequestInitiators().document, mainResourceLoadOptions); m_mainResource = m_cachedResourceLoader->requestMainResource(cachedResourceRequest); if (!m_mainResource) { setRequest(ResourceRequest()); // If the load was aborted by clearing m_request, it's possible the ApplicationCacheHost // is now in a state where starting an empty load will be inconsistent. Replace it with // a new ApplicationCacheHost. m_applicationCacheHost = adoptPtr(new ApplicationCacheHost(this)); maybeLoadEmpty(); return; } m_mainResource->addClient(this); // A bunch of headers are set when the underlying ResourceLoader is created, and m_request needs to include those. if (mainResourceLoader()) request = mainResourceLoader()->originalRequest(); // If there was a fragment identifier on m_request, the cache will have stripped it. m_request should include // the fragment identifier, so add that back in. if (equalIgnoringFragmentIdentifier(m_request.url(), request.url())) request.setURL(m_request.url()); setRequest(request);}
开发者ID:windyuuy,项目名称:opera,代码行数:55,
示例7: requestvoid ResourceFetcher::notifyLoadedFromMemoryCache(Resource* resource){ if (!frame() || !frame()->page() || resource->status() != Resource::Cached || m_validatedURLs.contains(resource->url())) return; ResourceRequest request(resource->url()); unsigned long identifier = createUniqueIdentifier(); context().dispatchDidLoadResourceFromMemoryCache(request, resource->response()); // FIXME: If willSendRequest changes the request, we don't respect it. willSendRequest(identifier, request, ResourceResponse(), resource->options().initiatorInfo); context().sendRemainingDelegateMessages(m_document, identifier, resource->response(), resource->encodedSize());}
开发者ID:greg100795,项目名称:mojo,代码行数:12,
示例8: ASSERTvoid ContentFilter::redirectReceived(CachedResource* resource, ResourceRequest& request, const ResourceResponse& redirectResponse){ ASSERT(resource); ASSERT(resource == m_mainResource); ASSERT(m_state != State::Initialized); if (m_state == State::Filtering) willSendRequest(request, redirectResponse); if (m_state != State::Blocked) m_documentLoader.redirectReceived(resource, request, redirectResponse);}
开发者ID:hnney,项目名称:webkit,代码行数:12,
示例9: protectvoid DocumentLoader::startLoadingMainResource(){ RefPtr<DocumentLoader> protect(this); m_mainDocumentError = ResourceError(); timing()->markNavigationStart(); ASSERT(!m_mainResource); ASSERT(!m_loadingMainResource); m_loadingMainResource = true; if (maybeLoadEmpty()) return; ASSERT(timing()->navigationStart()); ASSERT(!timing()->fetchStart()); timing()->markFetchStart(); willSendRequest(m_request, ResourceResponse()); // willSendRequest() may lead to our LocalFrame being detached or cancelling the load via nulling the ResourceRequest. if (!m_frame || m_request.isNull()) return; m_applicationCacheHost->willStartLoadingMainResource(m_request); prepareSubframeArchiveLoadIfNeeded(); ResourceRequest request(m_request); DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions, (DoNotBufferData, AllowStoredCredentials, ClientRequestedCredentials, CheckContentSecurityPolicy, DocumentContext)); FetchRequest cachedResourceRequest(request, FetchInitiatorTypeNames::document, mainResourceLoadOptions); m_mainResource = m_fetcher->fetchMainResource(cachedResourceRequest, m_substituteData); if (!m_mainResource) { m_request = ResourceRequest(); // If the load was aborted by clearing m_request, it's possible the ApplicationCacheHost // is now in a state where starting an empty load will be inconsistent. Replace it with // a new ApplicationCacheHost. m_applicationCacheHost = ApplicationCacheHost::create(this); maybeLoadEmpty(); return; } m_mainResource->addClient(this); // A bunch of headers are set when the underlying ResourceLoader is created, and m_request needs to include those. if (mainResourceLoader()) request = mainResourceLoader()->originalRequest(); // If there was a fragment identifier on m_request, the cache will have stripped it. m_request should include // the fragment identifier, so add that back in. if (equalIgnoringFragmentIdentifier(m_request.url(), request.url())) request.setURL(m_request.url()); m_request = request;}
开发者ID:rzr,项目名称:blink-crosswalk,代码行数:49,
示例10: ASSERTbool ResourceLoader::load(const ResourceRequest& r){ ASSERT(!m_handle); ASSERT(m_deferredRequest.isNull()); ASSERT(!m_documentLoader->isSubstituteLoadPending(this)); ResourceRequest clientRequest(r); // https://bugs.webkit.org/show_bug.cgi?id=26391 // The various plug-in implementations call directly to ResourceLoader::load() instead of piping requests // through FrameLoader. As a result, they miss the FrameLoader::addExtraFieldsToRequest() step which sets // up the 1st party for cookies URL. Until plug-in implementations can be reigned in to pipe through that // method, we need to make sure there is always a 1st party for cookies set. if (clientRequest.firstPartyForCookies().isNull()) { if (Document* document = m_frame->document()) clientRequest.setFirstPartyForCookies(document->firstPartyForCookies()); } willSendRequest(clientRequest, ResourceResponse()); if (clientRequest.isNull()) { didFail(frameLoader()->cancelledError(r)); return false; } if (m_documentLoader->scheduleArchiveLoad(this, clientRequest, r.url())) return true; #if ENABLE(OFFLINE_WEB_APPLICATIONS) if (m_documentLoader->applicationCacheHost()->maybeLoadResource(this, clientRequest, r.url())) return true; // Based on http://www.w3.org/TR/html5/offline.html, any urls listed in FALLBACK or NETWORK should bypass cache. if (m_documentLoader->applicationCacheHost()->isFallbackOrNetworkResource(clientRequest.url())) clientRequest.setCachePolicy(ReloadIgnoringCacheData);#endif if (m_defersLoading) { m_deferredRequest = clientRequest; return true; } m_handle = ResourceHandle::create(m_frame->loader()->networkingContext(), clientRequest, this, m_defersLoading, m_shouldContentSniff); return true;}
开发者ID:azrul2202,项目名称:WebKit-Smartphone,代码行数:45,
示例11: ASSERT_UNUSEDvoid DocumentLoader::redirectReceived(Resource* resource, ResourceRequest& request, const ResourceResponse& redirectResponse){ ASSERT_UNUSED(resource, resource == m_mainResource); willSendRequest(request, redirectResponse);}
开发者ID:rzr,项目名称:blink-crosswalk,代码行数:5,
示例12: willSendRequestvoid ResourceLoader::willSendRequest(ResourceHandle*, ResourceRequest& request, const ResourceResponse& redirectResponse){ willSendRequest(request, redirectResponse);}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:4,
示例13: willSendRequestvoid ResourceLoader::willSendRequest(ResourceRequest&& request, const ResourceResponse& redirectResponse, std::function<void(ResourceRequest&)> callback){ willSendRequest(request, redirectResponse); callback(request);}
开发者ID:clbr,项目名称:webkitfltk,代码行数:5,
注:本文中的willSendRequest函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ will_return函数代码示例 C++ willMutate函数代码示例 |