1 /* 2 * WebURLRequest.cpp 3 * WebKit2 4 * 5 * Created by Sam Weinig on 8/30/10. 6 * Copyright 2010 Apple Inc. All rights reserved. 7 * 8 */ 9 10 #include "config.h" 11 #include "WebURLRequest.h" 12 13 #include "WebContext.h" 14 15 using namespace WebCore; 16 17 namespace WebKit { 18 19 PassRefPtr<WebURLRequest> WebURLRequest::create(const KURL& url) 20 { 21 return adoptRef(new WebURLRequest(ResourceRequest(url))); 22 } 23 24 WebURLRequest::WebURLRequest(const ResourceRequest& request) 25 : m_request(request) 26 { 27 } 28 29 double WebURLRequest::defaultTimeoutInterval() 30 { 31 return ResourceRequest::defaultTimeoutInterval(); 32 } 33 34 // FIXME: This function should really be on WebContext. 35 void WebURLRequest::setDefaultTimeoutInterval(double timeoutInterval) 36 { 37 ResourceRequest::setDefaultTimeoutInterval(timeoutInterval); 38 39 const Vector<WebContext*>& contexts = WebContext::allContexts(); 40 for (size_t i = 0; i < contexts.size(); ++i) 41 contexts[i]->setDefaultRequestTimeoutInterval(timeoutInterval); 42 } 43 44 } // namespace WebKit 45