WebURLRequest.cpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. #include "config.h"
  10. #include "WebURLRequest.h"
  11. #include "WebContext.h"
  12. using namespace WebCore;
  13. namespace WebKit {
  14. PassRefPtr<WebURLRequest> WebURLRequest::create(const KURL& url)
  15. {
  16. return adoptRef(new WebURLRequest(ResourceRequest(url)));
  17. }
  18. WebURLRequest::WebURLRequest(const ResourceRequest& request)
  19. : m_request(request)
  20. {
  21. }
  22. double WebURLRequest::defaultTimeoutInterval()
  23. {
  24. return ResourceRequest::defaultTimeoutInterval();
  25. }
  26. // FIXME: This function should really be on WebContext.
  27. void WebURLRequest::setDefaultTimeoutInterval(double timeoutInterval)
  28. {
  29. ResourceRequest::setDefaultTimeoutInterval(timeoutInterval);
  30. const Vector<WebContext*>& contexts = WebContext::allContexts();
  31. for (size_t i = 0; i < contexts.size(); ++i)
  32. contexts[i]->setDefaultRequestTimeoutInterval(timeoutInterval);
  33. }
  34. } // namespace WebKit