Rubber stamped by Darin.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Oct 2006 09:44:37 +0000 (09:44 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Oct 2006 09:44:37 +0000 (09:44 +0000)
        - renamed ResourceLoader to ResourceHandle (and same for related classes)

        * CMakeLists.txt:
        * Projects/gdk/webcore-gdk.bkl:
        * WebCore.vcproj/WebCore/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        * bridge/mac/FrameMac.mm:
        * bridge/win/FrameWin.cpp:
        * dom/XMLTokenizer.cpp:
        * loader/Cache.cpp:
        * loader/CachedResource.h:
        * loader/LoaderFunctions.h:
        * loader/icon/IconLoader.cpp:
        (IconLoader::startLoading):
        (IconLoader::didReceiveData):
        (IconLoader::didFinishLoading):
        * loader/icon/IconLoader.h:
        * loader/loader.cpp:
        (WebCore::Loader::servePendingRequests):
        (WebCore::Loader::receivedAllData):
        (WebCore::Loader::receivedResponse):
        (WebCore::Loader::didReceiveData):
        (WebCore::Loader::cancelRequests):
        (WebCore::Loader::jobForRequest):
        * loader/loader.h:
        * loader/mac/IconLoaderMac.mm:
        (IconLoader::receivedResponse):
        * loader/mac/LoaderFunctionsMac.mm:
        * loader/mac/WebLoader.h:
        * loader/mac/WebSubresourceLoader.h:
        * loader/mac/WebSubresourceLoader.mm:
        (WebCore::SubresourceLoader::SubresourceLoader):
        (WebCore::SubresourceLoader::create):
        * platform/gdk/FrameGdk.cpp:
        (WebCore::FrameGdkClientDefault::FrameGdkClientDefault):
        (WebCore::FrameGdkClientDefault::openURL):
        (WebCore::FrameGdkClientDefault::submitForm):
        (WebCore::FrameGdkClientDefault::receivedResponse):
        (WebCore::FrameGdkClientDefault::didReceiveData):
        (WebCore::FrameGdkClientDefault::receivedAllData):
        * platform/gdk/FrameGdk.h:
        * platform/gdk/TemporaryLinkStubs.cpp:
        (WebCore::ServeSynchronousRequest):
        (WebCore::ResourceHandle::assembleResponseHeaders):
        (WebCore::ResourceHandle::retrieveCharset):
        * platform/network/ResourceHandle.cpp: Added.
        (WebCore::ResourceHandle::ResourceHandle):
        (WebCore::ResourceHandle::create):
        (WebCore::ResourceHandle::isErrorPage):
        (WebCore::ResourceHandle::error):
        (WebCore::ResourceHandle::setError):
        (WebCore::ResourceHandle::responseEncoding):
        (WebCore::ResourceHandle::responseHTTPHeadersAsString):
        (WebCore::ResourceHandle::kill):
        (WebCore::ResourceHandle::requestHeaders):
        (WebCore::ResourceHandle::url):
        (WebCore::ResourceHandle::postData):
        (WebCore::ResourceHandle::method):
        (WebCore::ResourceHandle::client):
        * platform/network/ResourceHandle.h: Added.
        (WebCore::ResourceHandle::getInternal):
        * platform/network/ResourceHandleClient.h: Added.
        (WebCore::ResourceHandleClient::~ResourceHandleClient):
        (WebCore::ResourceHandleClient::didReceiveData):
        (WebCore::ResourceHandleClient::didFinishLoading):
        (WebCore::ResourceHandleClient::receivedRedirect):
        (WebCore::ResourceHandleClient::receivedResponse):
        (WebCore::ResourceHandleClient::receivedAllData):
        * platform/network/ResourceHandleInternal.h: Added.
        (WebCore::ResourceHandleInternal::ResourceHandleInternal):
        * platform/network/ResourceLoader.cpp: Removed.
        * platform/network/ResourceLoader.h: Removed.
        * platform/network/ResourceLoaderClient.h: Removed.
        * platform/network/ResourceLoaderInternal.h: Removed.
        * platform/network/cf/ResourceHandleCFNet.cpp: Added.
        (WebCore::willSendRequest):
        (WebCore::didReceiveResponse):
        (WebCore::didReceiveData):
        (WebCore::didFinishLoading):
        (WebCore::didFail):
        (WebCore::willCacheResponse):
        (WebCore::didReceiveChallenge):
        (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
        (WebCore::ResourceHandle::~ResourceHandle):
        (WebCore::ResourceHandle::start):
        (WebCore::ResourceHandle::cancel):
        * platform/network/cf/ResourceLoaderCFNet.cpp: Removed.
        * platform/network/gdk/ResourceHandleCurl.cpp: Added.
        (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
        (WebCore::ResourceHandle::~ResourceHandle):
        (WebCore::ResourceHandle::start):
        (WebCore::ResourceHandle::cancel):
        * platform/network/gdk/ResourceHandleManager.cpp: Added.
        (WebCore::ResourceHandleManager::ResourceHandleManager):
        (WebCore::ResourceHandleManager::get):
        (WebCore::ResourceHandleManager::useSimpleTransfer):
        (WebCore::writeCallback):
        (WebCore::ResourceHandleManager::downloadTimerCallback):
        (WebCore::ResourceHandleManager::remove):
        (WebCore::ResourceHandleManager::add):
        (WebCore::ResourceHandleManager::cancel):
        * platform/network/gdk/ResourceHandleManager.h: Added.
        * platform/network/gdk/ResourceLoaderCurl.cpp: Removed.
        * platform/network/gdk/ResourceLoaderManager.cpp: Removed.
        * platform/network/gdk/ResourceLoaderManager.h: Removed.
        * platform/network/mac/ResourceHandleMac.mm: Added.
        (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
        (WebCore::ResourceHandle::~ResourceHandle):
        (WebCore::ResourceHandle::start):
        (WebCore::ResourceHandle::assembleResponseHeaders):
        (WebCore::ResourceHandle::retrieveResponseEncoding):
        (WebCore::ResourceHandle::receivedResponse):
        (WebCore::ResourceHandle::cancel):
        (WebCore::ResourceHandle::redirectedToURL):
        (WebCore::ResourceHandle::addData):
        (WebCore::ResourceHandle::finishJobAndHandle):
        (WebCore::ResourceHandle::reportError):
        * platform/network/mac/ResourceLoaderMac.mm: Removed.
        * platform/network/qt/ResourceHandleManager.cpp: Added.
        (WebCore::ResourceHandleManager::ResourceHandleManager):
        (WebCore::ResourceHandleManager::~ResourceHandleManager):
        (WebCore::ResourceHandleManager::self):
        (WebCore::ResourceHandleManager::slotData):
        (WebCore::ResourceHandleManager::slotMimetype):
        (WebCore::ResourceHandleManager::slotResult):
        (WebCore::ResourceHandleManager::remove):
        (WebCore::ResourceHandleManager::add):
        (WebCore::ResourceHandleManager::cancel):
        * platform/network/qt/ResourceHandleManager.h: Added.
        * platform/network/qt/ResourceHandleQt.cpp: Added.
        (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
        (WebCore::ResourceHandle::~ResourceHandle):
        (WebCore::ResourceHandle::start):
        (WebCore::ResourceHandle::cancel):
        (WebCore::ResourceHandle::assembleResponseHeaders):
        (WebCore::ResourceHandle::retrieveResponseEncoding):
        (WebCore::ResourceHandle::receivedResponse):
        (WebCore::ResourceHandle::extractCharsetFromHeaders):
        * platform/network/qt/ResourceLoaderManager.cpp: Removed.
        * platform/network/qt/ResourceLoaderManager.h: Removed.
        * platform/network/qt/ResourceLoaderQt.cpp: Removed.
        * platform/network/win/ResourceHandleWin.cpp: Added.
        (WebCore::):
        (WebCore::addToOutstandingJobs):
        (WebCore::lookupResourceHandle):
        (WebCore::ResourceHandleWndProc):
        (WebCore::initializeOffScreenResourceHandleWindow):
        (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
        (WebCore::ResourceHandle::~ResourceHandle):
        (WebCore::ResourceHandle::onHandleCreated):
        (WebCore::ResourceHandle::onRequestRedirected):
        (WebCore::ResourceHandle::onRequestComplete):
        (WebCore::ResourceHandle::start):
        (WebCore::ResourceHandle::fileLoadTimer):
        (WebCore::ResourceHandle::cancel):
        (WebCore::ResourceHandle::setHasReceivedResponse):
        (WebCore::ResourceHandle::hasReceivedResponse):
        * platform/network/win/ResourceHandleWin.h: Added.
        * platform/network/win/ResourceLoaderWin.cpp: Removed.
        * platform/network/win/ResourceLoaderWin.h: Removed.
        * platform/qt/FrameQt.cpp:
        * platform/qt/FrameQtClient.cpp:
        (WebCore::FrameQtClientDefault::openURL):
        (WebCore::FrameQtClientDefault::submitForm):
        (WebCore::FrameQtClientDefault::receivedResponse):
        (WebCore::FrameQtClientDefault::didReceiveData):
        (WebCore::FrameQtClientDefault::receivedAllData):
        * platform/qt/FrameQtClient.h:
        * platform/win/TemporaryLinkStubs.cpp:
        (WebCore::ResourceHandle::assembleResponseHeaders):
        (WebCore::ResourceHandle::retrieveResponseEncoding):
        (WebCore::ServeSynchronousRequest):
        * xml/XSLTProcessor.cpp:
        * xml/xmlhttprequest.cpp:
        (WebCore::XMLHttpRequest::send):
        (WebCore::XMLHttpRequest::didFinishLoading):
        (WebCore::XMLHttpRequest::receivedRedirect):
        (WebCore::XMLHttpRequest::didReceiveData):
        * xml/xmlhttprequest.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17410 268f45cc-cd09-0410-ab3c-d52691b4dbfc

45 files changed:
WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/Projects/gdk/webcore-gdk.bkl
WebCore/WebCore.vcproj/WebCore/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/WebCoreSources.bkl
WebCore/bridge/mac/FrameMac.mm
WebCore/bridge/win/FrameWin.cpp
WebCore/dom/XMLTokenizer.cpp
WebCore/loader/Cache.cpp
WebCore/loader/CachedResource.h
WebCore/loader/LoaderFunctions.h
WebCore/loader/icon/IconLoader.cpp
WebCore/loader/icon/IconLoader.h
WebCore/loader/loader.cpp
WebCore/loader/loader.h
WebCore/loader/mac/IconLoaderMac.mm
WebCore/loader/mac/LoaderFunctionsMac.mm
WebCore/loader/mac/WebLoader.h
WebCore/loader/mac/WebSubresourceLoader.h
WebCore/loader/mac/WebSubresourceLoader.mm
WebCore/platform/gdk/FrameGdk.cpp
WebCore/platform/gdk/FrameGdk.h
WebCore/platform/gdk/TemporaryLinkStubs.cpp
WebCore/platform/network/ResourceHandle.cpp [moved from WebCore/platform/network/ResourceLoader.cpp with 70% similarity]
WebCore/platform/network/ResourceHandle.h [moved from WebCore/platform/network/ResourceLoader.h with 83% similarity]
WebCore/platform/network/ResourceHandleClient.h [moved from WebCore/platform/network/ResourceLoaderClient.h with 77% similarity]
WebCore/platform/network/ResourceHandleInternal.h [moved from WebCore/platform/network/ResourceLoaderInternal.h with 88% similarity]
WebCore/platform/network/cf/ResourceHandleCFNet.cpp [moved from WebCore/platform/network/cf/ResourceLoaderCFNet.cpp with 94% similarity]
WebCore/platform/network/gdk/ResourceHandleCurl.cpp [moved from WebCore/platform/network/gdk/ResourceLoaderCurl.cpp with 81% similarity]
WebCore/platform/network/gdk/ResourceHandleManager.cpp [moved from WebCore/platform/network/gdk/ResourceLoaderManager.cpp with 85% similarity]
WebCore/platform/network/gdk/ResourceHandleManager.h [moved from WebCore/platform/network/gdk/ResourceLoaderManager.h with 81% similarity]
WebCore/platform/network/mac/ResourceHandleMac.mm [moved from WebCore/platform/network/mac/ResourceLoaderMac.mm with 83% similarity]
WebCore/platform/network/qt/ResourceHandleManager.cpp [moved from WebCore/platform/network/qt/ResourceLoaderManager.cpp with 78% similarity]
WebCore/platform/network/qt/ResourceHandleManager.h [moved from WebCore/platform/network/qt/ResourceLoaderManager.h with 79% similarity]
WebCore/platform/network/qt/ResourceHandleQt.cpp [moved from WebCore/platform/network/qt/ResourceLoaderQt.cpp with 80% similarity]
WebCore/platform/network/win/ResourceHandleWin.cpp [moved from WebCore/platform/network/win/ResourceLoaderWin.cpp with 90% similarity]
WebCore/platform/network/win/ResourceHandleWin.h [moved from WebCore/platform/network/win/ResourceLoaderWin.h with 96% similarity]
WebCore/platform/qt/FrameQt.cpp
WebCore/platform/qt/FrameQtClient.cpp
WebCore/platform/qt/FrameQtClient.h
WebCore/platform/win/TemporaryLinkStubs.cpp
WebCore/xml/XSLTProcessor.cpp
WebCore/xml/xmlhttprequest.cpp
WebCore/xml/xmlhttprequest.h

index 379256f3492ba1aa6412a1c122acfadaadfc280e..fb9a840087438e2866e9e6f6a8eb461183d09ee5 100644 (file)
@@ -64,7 +64,7 @@ ENDIF(__KDE_HAVE_WVARIADIC_MACROS)
 
 kde4_automoc(WebCore platform/qt/SharedTimerQt.cpp)
 kde4_automoc(WebCore platform/qt/ScrollViewCanvasQt.cpp)
-kde4_automoc(WebCore platform/network/qt/ResourceLoaderManager.cpp)
+kde4_automoc(WebCore platform/network/qt/ResourceHandleManager.cpp)
 
 SET(FEATURE_DEFINES_JAVASCRIPT LANGUAGE_JAVASCRIPT)
 
@@ -1014,7 +1014,7 @@ set(WebCore_SRCS
     platform/KURL.cpp
     platform/StringImpl.cpp
     platform/FloatRect.cpp
-    platform/network/ResourceLoader.cpp
+    platform/network/ResourceHandle.cpp
     platform/Path.cpp
     platform/qt/EditorClientQt.cpp
     platform/qt/SoundQt.cpp
@@ -1037,8 +1037,8 @@ set(WebCore_SRCS
     platform/qt/FontDataQt.cpp
     platform/qt/SharedTimerQt.cpp
     platform/qt/PopupMenuQt.cpp
-    platform/network/qt/ResourceLoaderManager.cpp
-    platform/network/qt/ResourceLoaderQt.cpp
+    platform/network/qt/ResourceHandleManager.cpp
+    platform/network/qt/ResourceHandleQt.cpp
     platform/qt/FloatPointQt.cpp
     platform/qt/ListBoxQt.cpp
     platform/qt/FloatRectQt.cpp
index eea7c3a9a72c2f57692d95b4462d258e11233187..9151393618ecb0036a7bae59f3947e4a89d3924b 100644 (file)
@@ -1,3 +1,188 @@
+2006-10-29  Maciej Stachowiak  <mjs@apple.com>
+
+        Rubber stamped by Darin.
+
+        - renamed ResourceLoader to ResourceHandle (and same for related classes)
+
+        * CMakeLists.txt:
+        * Projects/gdk/webcore-gdk.bkl:
+        * WebCore.vcproj/WebCore/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * WebCoreSources.bkl:
+        * bridge/mac/FrameMac.mm:
+        * bridge/win/FrameWin.cpp:
+        * dom/XMLTokenizer.cpp:
+        * loader/Cache.cpp:
+        * loader/CachedResource.h:
+        * loader/LoaderFunctions.h:
+        * loader/icon/IconLoader.cpp:
+        (IconLoader::startLoading):
+        (IconLoader::didReceiveData):
+        (IconLoader::didFinishLoading):
+        * loader/icon/IconLoader.h:
+        * loader/loader.cpp:
+        (WebCore::Loader::servePendingRequests):
+        (WebCore::Loader::receivedAllData):
+        (WebCore::Loader::receivedResponse):
+        (WebCore::Loader::didReceiveData):
+        (WebCore::Loader::cancelRequests):
+        (WebCore::Loader::jobForRequest):
+        * loader/loader.h:
+        * loader/mac/IconLoaderMac.mm:
+        (IconLoader::receivedResponse):
+        * loader/mac/LoaderFunctionsMac.mm:
+        * loader/mac/WebLoader.h:
+        * loader/mac/WebSubresourceLoader.h:
+        * loader/mac/WebSubresourceLoader.mm:
+        (WebCore::SubresourceLoader::SubresourceLoader):
+        (WebCore::SubresourceLoader::create):
+        * platform/gdk/FrameGdk.cpp:
+        (WebCore::FrameGdkClientDefault::FrameGdkClientDefault):
+        (WebCore::FrameGdkClientDefault::openURL):
+        (WebCore::FrameGdkClientDefault::submitForm):
+        (WebCore::FrameGdkClientDefault::receivedResponse):
+        (WebCore::FrameGdkClientDefault::didReceiveData):
+        (WebCore::FrameGdkClientDefault::receivedAllData):
+        * platform/gdk/FrameGdk.h:
+        * platform/gdk/TemporaryLinkStubs.cpp:
+        (WebCore::ServeSynchronousRequest):
+        (WebCore::ResourceHandle::assembleResponseHeaders):
+        (WebCore::ResourceHandle::retrieveCharset):
+        * platform/network/ResourceHandle.cpp: Added.
+        (WebCore::ResourceHandle::ResourceHandle):
+        (WebCore::ResourceHandle::create):
+        (WebCore::ResourceHandle::isErrorPage):
+        (WebCore::ResourceHandle::error):
+        (WebCore::ResourceHandle::setError):
+        (WebCore::ResourceHandle::responseEncoding):
+        (WebCore::ResourceHandle::responseHTTPHeadersAsString):
+        (WebCore::ResourceHandle::kill):
+        (WebCore::ResourceHandle::requestHeaders):
+        (WebCore::ResourceHandle::url):
+        (WebCore::ResourceHandle::postData):
+        (WebCore::ResourceHandle::method):
+        (WebCore::ResourceHandle::client):
+        * platform/network/ResourceHandle.h: Added.
+        (WebCore::ResourceHandle::getInternal):
+        * platform/network/ResourceHandleClient.h: Added.
+        (WebCore::ResourceHandleClient::~ResourceHandleClient):
+        (WebCore::ResourceHandleClient::didReceiveData):
+        (WebCore::ResourceHandleClient::didFinishLoading):
+        (WebCore::ResourceHandleClient::receivedRedirect):
+        (WebCore::ResourceHandleClient::receivedResponse):
+        (WebCore::ResourceHandleClient::receivedAllData):
+        * platform/network/ResourceHandleInternal.h: Added.
+        (WebCore::ResourceHandleInternal::ResourceHandleInternal):
+        * platform/network/ResourceLoader.cpp: Removed.
+        * platform/network/ResourceLoader.h: Removed.
+        * platform/network/ResourceLoaderClient.h: Removed.
+        * platform/network/ResourceLoaderInternal.h: Removed.
+        * platform/network/cf/ResourceHandleCFNet.cpp: Added.
+        (WebCore::willSendRequest):
+        (WebCore::didReceiveResponse):
+        (WebCore::didReceiveData):
+        (WebCore::didFinishLoading):
+        (WebCore::didFail):
+        (WebCore::willCacheResponse):
+        (WebCore::didReceiveChallenge):
+        (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
+        (WebCore::ResourceHandle::~ResourceHandle):
+        (WebCore::ResourceHandle::start):
+        (WebCore::ResourceHandle::cancel):
+        * platform/network/cf/ResourceLoaderCFNet.cpp: Removed.
+        * platform/network/gdk/ResourceHandleCurl.cpp: Added.
+        (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
+        (WebCore::ResourceHandle::~ResourceHandle):
+        (WebCore::ResourceHandle::start):
+        (WebCore::ResourceHandle::cancel):
+        * platform/network/gdk/ResourceHandleManager.cpp: Added.
+        (WebCore::ResourceHandleManager::ResourceHandleManager):
+        (WebCore::ResourceHandleManager::get):
+        (WebCore::ResourceHandleManager::useSimpleTransfer):
+        (WebCore::writeCallback):
+        (WebCore::ResourceHandleManager::downloadTimerCallback):
+        (WebCore::ResourceHandleManager::remove):
+        (WebCore::ResourceHandleManager::add):
+        (WebCore::ResourceHandleManager::cancel):
+        * platform/network/gdk/ResourceHandleManager.h: Added.
+        * platform/network/gdk/ResourceLoaderCurl.cpp: Removed.
+        * platform/network/gdk/ResourceLoaderManager.cpp: Removed.
+        * platform/network/gdk/ResourceLoaderManager.h: Removed.
+        * platform/network/mac/ResourceHandleMac.mm: Added.
+        (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
+        (WebCore::ResourceHandle::~ResourceHandle):
+        (WebCore::ResourceHandle::start):
+        (WebCore::ResourceHandle::assembleResponseHeaders):
+        (WebCore::ResourceHandle::retrieveResponseEncoding):
+        (WebCore::ResourceHandle::receivedResponse):
+        (WebCore::ResourceHandle::cancel):
+        (WebCore::ResourceHandle::redirectedToURL):
+        (WebCore::ResourceHandle::addData):
+        (WebCore::ResourceHandle::finishJobAndHandle):
+        (WebCore::ResourceHandle::reportError):
+        * platform/network/mac/ResourceLoaderMac.mm: Removed.
+        * platform/network/qt/ResourceHandleManager.cpp: Added.
+        (WebCore::ResourceHandleManager::ResourceHandleManager):
+        (WebCore::ResourceHandleManager::~ResourceHandleManager):
+        (WebCore::ResourceHandleManager::self):
+        (WebCore::ResourceHandleManager::slotData):
+        (WebCore::ResourceHandleManager::slotMimetype):
+        (WebCore::ResourceHandleManager::slotResult):
+        (WebCore::ResourceHandleManager::remove):
+        (WebCore::ResourceHandleManager::add):
+        (WebCore::ResourceHandleManager::cancel):
+        * platform/network/qt/ResourceHandleManager.h: Added.
+        * platform/network/qt/ResourceHandleQt.cpp: Added.
+        (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
+        (WebCore::ResourceHandle::~ResourceHandle):
+        (WebCore::ResourceHandle::start):
+        (WebCore::ResourceHandle::cancel):
+        (WebCore::ResourceHandle::assembleResponseHeaders):
+        (WebCore::ResourceHandle::retrieveResponseEncoding):
+        (WebCore::ResourceHandle::receivedResponse):
+        (WebCore::ResourceHandle::extractCharsetFromHeaders):
+        * platform/network/qt/ResourceLoaderManager.cpp: Removed.
+        * platform/network/qt/ResourceLoaderManager.h: Removed.
+        * platform/network/qt/ResourceLoaderQt.cpp: Removed.
+        * platform/network/win/ResourceHandleWin.cpp: Added.
+        (WebCore::):
+        (WebCore::addToOutstandingJobs):
+        (WebCore::lookupResourceHandle):
+        (WebCore::ResourceHandleWndProc):
+        (WebCore::initializeOffScreenResourceHandleWindow):
+        (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
+        (WebCore::ResourceHandle::~ResourceHandle):
+        (WebCore::ResourceHandle::onHandleCreated):
+        (WebCore::ResourceHandle::onRequestRedirected):
+        (WebCore::ResourceHandle::onRequestComplete):
+        (WebCore::ResourceHandle::start):
+        (WebCore::ResourceHandle::fileLoadTimer):
+        (WebCore::ResourceHandle::cancel):
+        (WebCore::ResourceHandle::setHasReceivedResponse):
+        (WebCore::ResourceHandle::hasReceivedResponse):
+        * platform/network/win/ResourceHandleWin.h: Added.
+        * platform/network/win/ResourceLoaderWin.cpp: Removed.
+        * platform/network/win/ResourceLoaderWin.h: Removed.
+        * platform/qt/FrameQt.cpp:
+        * platform/qt/FrameQtClient.cpp:
+        (WebCore::FrameQtClientDefault::openURL):
+        (WebCore::FrameQtClientDefault::submitForm):
+        (WebCore::FrameQtClientDefault::receivedResponse):
+        (WebCore::FrameQtClientDefault::didReceiveData):
+        (WebCore::FrameQtClientDefault::receivedAllData):
+        * platform/qt/FrameQtClient.h:
+        * platform/win/TemporaryLinkStubs.cpp:
+        (WebCore::ResourceHandle::assembleResponseHeaders):
+        (WebCore::ResourceHandle::retrieveResponseEncoding):
+        (WebCore::ServeSynchronousRequest):
+        * xml/XSLTProcessor.cpp:
+        * xml/xmlhttprequest.cpp:
+        (WebCore::XMLHttpRequest::send):
+        (WebCore::XMLHttpRequest::didFinishLoading):
+        (WebCore::XMLHttpRequest::receivedRedirect):
+        (WebCore::XMLHttpRequest::didReceiveData):
+        * xml/xmlhttprequest.h:
+
 t2006-10-29  Darin Adler  <darin@apple.com>
 
         Reviewed by Maciej.
index fe20b171373c7e1ba9b7b3e0a5c0fea7a32e3690..2a4df7c9570c83723abe735e4826cdf1066d24bb 100644 (file)
@@ -78,7 +78,7 @@
           platform/gdk/KeyEventGdk.cpp
           platform/gdk/MouseEventGdk.cpp
           platform/gdk/PageGdk.cpp
-          platform/network/gdk/ResourceLoaderManager.cpp
+          platform/network/gdk/ResourceHandleManager.cpp
           platform/gdk/RenderThemeGdk.cpp
           platform/gdk/RenderPopupMenuGdk.cpp
           platform/gdk/ScreenGdk.cpp
@@ -86,7 +86,7 @@
           platform/gdk/SharedTimerLinux.cpp
           platform/gdk/SystemTimeLinux.cpp
           platform/gdk/TemporaryLinkStubs.cpp
-          platform/network/gdk/ResourceLoaderCurl.cpp
+          platform/network/gdk/ResourceHandleCurl.cpp
           platform/gdk/WheelEventGdk.cpp
           platform/gdk/WidgetGdk.cpp
                </sources>
index 1c3a34fce9deab5c5dd023eeb4320ec3ce7ad7dd..293398b7341939af55656f66a20fa48e5dc0f370 100644 (file)
                                >
                        </File>
                        <File
-                               RelativePath="..\..\platform\ResourceLoader.cpp"
+                               RelativePath="..\..\platform\ResourceHandle.cpp"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\platform\ResourceLoader.h"
+                               RelativePath="..\..\platform\ResourceHandle.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\platform\ResourceLoaderClient.h"
+                               RelativePath="..\..\platform\ResourceHandleClient.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\platform\ResourceLoaderInternal.h"
+                               RelativePath="..\..\platform\ResourceHandleInternal.h"
                                >
                        </File>
                        <File
                                        >
                                </File>
                                <File
-                                       RelativePath="..\..\platform\win\ResourceLoaderWin.cpp"
+                                       RelativePath="..\..\platform\win\ResourceHandleWin.cpp"
                                        >
                                </File>
                                <File
-                                       RelativePath="..\..\platform\win\ResourceLoaderWin.h"
+                                       RelativePath="..\..\platform\win\ResourceHandleWin.h"
                                        >
                                </File>
                                <File
index 14e5805a284d27f9b72478a49ba8fb0eaaa7d0af..5ccddb3b498f71d27a5c1bf68c4bce830cb7d1fc 100644 (file)
                6565820009D1508D000E61D7 /* SVGNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581E909D1508D000E61D7 /* SVGNames.h */; };
                6565820209D1508D000E61D7 /* XLinkNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581EB09D1508D000E61D7 /* XLinkNames.h */; };
                6565821309D15111000E61D7 /* ksvgcssvalues.h in Headers */ = {isa = PBXBuildFile; fileRef = 6565820F09D15111000E61D7 /* ksvgcssvalues.h */; };
-               656B84E00AEA1D3100A095B4 /* ResourceLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 656B84DC0AEA1D3100A095B4 /* ResourceLoader.cpp */; };
-               656B84E20AEA1D3100A095B4 /* ResourceLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 656B84DE0AEA1D3100A095B4 /* ResourceLoaderClient.h */; };
-               656B84E30AEA1D3100A095B4 /* ResourceLoaderInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 656B84DF0AEA1D3100A095B4 /* ResourceLoaderInternal.h */; };
-               656B84EB0AEA1DDA00A095B4 /* ResourceLoaderMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 656B84EA0AEA1DDA00A095B4 /* ResourceLoaderMac.mm */; };
-               656B85380AEA1F9A00A095B4 /* ResourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 656B85370AEA1F9A00A095B4 /* ResourceLoader.h */; };
+               656B84E00AEA1D3100A095B4 /* ResourceHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 656B84DC0AEA1D3100A095B4 /* ResourceHandle.cpp */; };
+               656B84E20AEA1D3100A095B4 /* ResourceHandleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 656B84DE0AEA1D3100A095B4 /* ResourceHandleClient.h */; };
+               656B84E30AEA1D3100A095B4 /* ResourceHandleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 656B84DF0AEA1D3100A095B4 /* ResourceHandleInternal.h */; };
+               656B84EB0AEA1DDA00A095B4 /* ResourceHandleMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 656B84EA0AEA1DDA00A095B4 /* ResourceHandleMac.mm */; };
+               656B85380AEA1F9A00A095B4 /* ResourceHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = 656B85370AEA1F9A00A095B4 /* ResourceHandle.h */; };
                656D37320ADBA5DE00A4554D /* LoaderNSURLExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 656D371A0ADBA5DE00A4554D /* LoaderNSURLExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
                656D37330ADBA5DE00A4554D /* LoaderNSURLExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = 656D371B0ADBA5DE00A4554D /* LoaderNSURLExtras.m */; };
                656D37340ADBA5DE00A4554D /* WebDataProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 656D371C0ADBA5DE00A4554D /* WebDataProtocol.h */; settings = {ATTRIBUTES = (Private, ); }; };
                6565820E09D15111000E61D7 /* ksvgcssvalues.gperf */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ksvgcssvalues.gperf; sourceTree = "<group>"; };
                6565820F09D15111000E61D7 /* ksvgcssvalues.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ksvgcssvalues.h; sourceTree = "<group>"; };
                6565821009D15111000E61D7 /* ksvgcssvalues.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ksvgcssvalues.in; sourceTree = "<group>"; };
-               656B84DC0AEA1D3100A095B4 /* ResourceLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLoader.cpp; sourceTree = "<group>"; };
-               656B84DE0AEA1D3100A095B4 /* ResourceLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ResourceLoaderClient.h; sourceTree = "<group>"; };
-               656B84DF0AEA1D3100A095B4 /* ResourceLoaderInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ResourceLoaderInternal.h; sourceTree = "<group>"; };
-               656B84EA0AEA1DDA00A095B4 /* ResourceLoaderMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceLoaderMac.mm; sourceTree = "<group>"; };
-               656B85370AEA1F9A00A095B4 /* ResourceLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ResourceLoader.h; sourceTree = "<group>"; };
+               656B84DC0AEA1D3100A095B4 /* ResourceHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceHandle.cpp; sourceTree = "<group>"; };
+               656B84DE0AEA1D3100A095B4 /* ResourceHandleClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ResourceHandleClient.h; sourceTree = "<group>"; };
+               656B84DF0AEA1D3100A095B4 /* ResourceHandleInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ResourceHandleInternal.h; sourceTree = "<group>"; };
+               656B84EA0AEA1DDA00A095B4 /* ResourceHandleMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceHandleMac.mm; sourceTree = "<group>"; };
+               656B85370AEA1F9A00A095B4 /* ResourceHandle.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ResourceHandle.h; sourceTree = "<group>"; };
                656D371A0ADBA5DE00A4554D /* LoaderNSURLExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LoaderNSURLExtras.h; sourceTree = "<group>"; };
                656D371B0ADBA5DE00A4554D /* LoaderNSURLExtras.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = LoaderNSURLExtras.m; sourceTree = "<group>"; };
                656D371C0ADBA5DE00A4554D /* WebDataProtocol.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebDataProtocol.h; sourceTree = "<group>"; };
                                656B84E70AEA1DAE00A095B4 /* mac */,
                                6522BCDE09C9DAA800C9BA7A /* ResourceRequest.h */,
                                655A81BD0AEF67E6000975F0 /* HTTPHeaderMap.h */,
-                               656B85370AEA1F9A00A095B4 /* ResourceLoader.h */,
-                               656B84DC0AEA1D3100A095B4 /* ResourceLoader.cpp */,
-                               656B84DE0AEA1D3100A095B4 /* ResourceLoaderClient.h */,
-                               656B84DF0AEA1D3100A095B4 /* ResourceLoaderInternal.h */,
+                               656B85370AEA1F9A00A095B4 /* ResourceHandle.h */,
+                               656B84DC0AEA1D3100A095B4 /* ResourceHandle.cpp */,
+                               656B84DE0AEA1D3100A095B4 /* ResourceHandleClient.h */,
+                               656B84DF0AEA1D3100A095B4 /* ResourceHandleInternal.h */,
                        );
                        path = network;
                        sourceTree = "<group>";
                656B84E70AEA1DAE00A095B4 /* mac */ = {
                        isa = PBXGroup;
                        children = (
-                               656B84EA0AEA1DDA00A095B4 /* ResourceLoaderMac.mm */,
+                               656B84EA0AEA1DDA00A095B4 /* ResourceHandleMac.mm */,
                        );
                        path = mac;
                        sourceTree = "<group>";
                                8542A7970AE5C94300DF58DF /* JSSVGNumber.h in Headers */,
                                8542A7990AE5C94400DF58DF /* JSSVGElementWrapperFactory.h in Headers */,
                                EDEC98030AED7E170059137F /* WebCorePrefix.h in Headers */,
-                               656B84E20AEA1D3100A095B4 /* ResourceLoaderClient.h in Headers */,
-                               656B84E30AEA1D3100A095B4 /* ResourceLoaderInternal.h in Headers */,
-                               656B85380AEA1F9A00A095B4 /* ResourceLoader.h in Headers */,
+                               656B84E20AEA1D3100A095B4 /* ResourceHandleClient.h in Headers */,
+                               656B84E30AEA1D3100A095B4 /* ResourceHandleInternal.h in Headers */,
+                               656B85380AEA1F9A00A095B4 /* ResourceHandle.h in Headers */,
                                85B916840AEBDB47008DD727 /* DOMHTMLFormElementPrivate.h in Headers */,
                                853CA9D70AEEC5E9002372DC /* RenderSVGContainer.h in Headers */,
                                853CA9D90AEEC5E9002372DC /* RenderSVGImage.h in Headers */,
                                8542A7960AE5C94200DF58DF /* JSSVGPoint.cpp in Sources */,
                                8542A7980AE5C94300DF58DF /* JSSVGNumber.cpp in Sources */,
                                8542A79A0AE5C94400DF58DF /* JSSVGElementWrapperFactory.cpp in Sources */,
-                               656B84E00AEA1D3100A095B4 /* ResourceLoader.cpp in Sources */,
-                               656B84EB0AEA1DDA00A095B4 /* ResourceLoaderMac.mm in Sources */,
+                               656B84E00AEA1D3100A095B4 /* ResourceHandle.cpp in Sources */,
+                               656B84EB0AEA1DDA00A095B4 /* ResourceHandleMac.mm in Sources */,
                                853CA9D60AEEC5E9002372DC /* RenderSVGContainer.cpp in Sources */,
                                853CA9D80AEEC5E9002372DC /* RenderSVGImage.cpp in Sources */,
                                853CA9DA0AEEC5E9002372DC /* RenderSVGInline.cpp in Sources */,
index b785344f9b93b86b9e06f1c7dba5b303a42b2c05..8e3332a1a347fd7757a61864bddddfab1dfd12d2 100644 (file)
                platform/TextEncodingRegistry.cpp
                platform/TextStream.cpp
                platform/Timer.cpp
-               platform/network/ResourceLoader.cpp
+               platform/network/ResourceHandle.cpp
                platform/Widget.cpp
 
        </set>
                platform/win/SharedTimerWin.cpp
                platform/win/SystemTimeWin.cpp
                platform/win/TemporaryLinkStubs.cpp
-               platform/network/win/ResourceLoaderWin.cpp
+               platform/network/win/ResourceHandleWin.cpp
                platform/win/WidgetWin.cpp
 
        </set>
index 301949447786896c2413f33c67ce7101280e990a..0150cf6f08119df171e404f72a3f3f164a871fd1 100644 (file)
@@ -71,7 +71,7 @@
 #import "RenderTableCell.h"
 #import "RenderTheme.h"
 #import "RenderView.h"
-#import "ResourceLoader.h"
+#import "ResourceHandle.h"
 #import "TextIterator.h"
 #import "WebCoreEditCommand.h"
 #import "WebCoreFrameBridge.h"
index 1520a667b4ff6c352c2b3704030acbfec68aab9f..ced6e3df733fc24b272245fab810ef9ef3dcc3a8 100644 (file)
@@ -36,7 +36,7 @@
 #include "PlatformKeyboardEvent.h"
 #include "Plugin.h"
 #include "RenderFrame.h"
-#include "ResourceLoader.h"
+#include "ResourceHandle.h"
 #include <windows.h>
 
 namespace WebCore {
index 445aafceb045f15a2576a16617606a6ff3ce647b..bcb67fe49b6c7c867926d312044c8e313642463a 100644 (file)
@@ -41,7 +41,7 @@
 #include "HTMLTokenizer.h"
 #include "LoaderFunctions.h"
 #include "ProcessingInstruction.h"
-#include "ResourceLoader.h"
+#include "ResourceHandle.h"
 #include <libxml/parser.h>
 #include <libxml/parserInternals.h>
 #include <wtf/Platform.h>
index a008c81746c5c2eebd230c1fcf4bb1e89f5a4dcd..7480c92c11fcca3ca8c16c63275078699b1956fa 100644 (file)
@@ -35,7 +35,7 @@
 #include "DocLoader.h"
 #include "Document.h"
 #include "Image.h"
-#include "ResourceLoader.h"
+#include "ResourceHandle.h"
 
 using namespace std;
 
index f5cf5e69591198d6ebe3641adc54406172f9e9ca..a1e16168f9a13e44661a3bcad5b9e015be581da8 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "CachePolicy.h"
 #include "PlatformString.h"
-#include "ResourceLoaderClient.h" // defines PlatformResponse and PlatformData
+#include "ResourceHandleClient.h" // defines PlatformResponse and PlatformData
 #include <wtf/HashSet.h>
 #include <wtf/Vector.h>
 #include <time.h>
index a9bfd4d42b4fcf86a7329860fdaded0461f91749..f6339139c45b14a35a66ab4403381fe8ba328dab 100644 (file)
@@ -26,7 +26,7 @@
 #include <wtf/Vector.h>
 #include <wtf/HashMap.h>
 #include "PlatformString.h"
-#include "ResourceLoaderClient.h"  // Defines PlatformResponse
+#include "ResourceHandleClient.h"  // Defines PlatformResponse
 #include "HTTPHeaderMap.h"
 
 #ifdef __OBJC__
index f3d7b10ea572420a80414ddcd5c5592085282667..5f8b0e5400dbd24d705db7a9e2741504a3b2ce8c 100644 (file)
@@ -72,7 +72,7 @@ void IconLoader::startLoading()
     
     m_url = m_frame->iconURL();
     ResourceRequest request(m_url);
-    m_resourceLoader = ResourceLoader::create(request, this, m_frame->document()->docLoader());
+    m_resourceLoader = ResourceHandle::create(request, this, m_frame->document()->docLoader());
 
     if (!m_resourceLoader)
         LOG_ERROR("Failed to start load for icon at url %s", m_frame->iconURL().url().ascii());
@@ -86,7 +86,7 @@ void IconLoader::stopLoading()
     m_data.clear();
 }
 
-void IconLoader::didReceiveData(ResourceLoader* resourceLoader, const char* data, int size)
+void IconLoader::didReceiveData(ResourceHandle* resourceLoader, const char* data, int size)
 {
     ASSERT(resourceLoader == m_resourceLoader);
     ASSERT(data);
@@ -96,7 +96,7 @@ void IconLoader::didReceiveData(ResourceLoader* resourceLoader, const char* data
         m_data.append(data[i]);
 }
 
-void IconLoader::didFinishLoading(ResourceLoader* resourceLoader)
+void IconLoader::didFinishLoading(ResourceHandle* resourceLoader)
 {
     ASSERT(resourceLoader == m_resourceLoader);
 
index fb7505d69083436887f9cef294a36914d81f2249..42fbed8e4f54c4c0285a45fbc2ac65bf6cfe8ee5 100644 (file)
 #ifndef ICONLOADER_H_
 #define ICONLOADER_H_
 
-#include "ResourceLoader.h"
+#include "ResourceHandle.h"
 
 namespace WebCore {
 
 class Frame;
 
-class IconLoader : public ResourceLoaderClient
+class IconLoader : public ResourceHandleClient
 {
 public:
     static IconLoader* createForFrame(Frame* frame);
@@ -40,17 +40,17 @@ public:
     void startLoading();
     void stopLoading();
     
-// ResourceLoaderClient delegate methods
-    virtual void receivedResponse(ResourceLoader*, PlatformResponse);
-    virtual void didReceiveData(ResourceLoader*, const char*, int);
-    virtual void didFinishLoading(ResourceLoader*);
+// ResourceHandleClient delegate methods
+    virtual void receivedResponse(ResourceHandle*, PlatformResponse);
+    virtual void didReceiveData(ResourceHandle*, const char*, int);
+    virtual void didFinishLoading(ResourceHandle*);
 private:
     IconLoader(Frame* frame);
     
     void notifyIconChanged(const KURL& iconURL);
 
     KURL m_url;
-    RefPtr<ResourceLoader> m_resourceLoader;
+    RefPtr<ResourceHandle> m_resourceLoader;
     Frame* m_frame;
     
     static const int IconLoaderDefaultBuffer = 4096;
index 0958ae8de61f1491f71b4f36b7d32e9979e9c8d6..975a082954a93fa40f58d7becfd284d3b7ff9d25 100644 (file)
@@ -37,7 +37,7 @@
 #include "HTMLDocument.h"
 #include "LoaderFunctions.h"
 #include "Request.h"
-#include "ResourceLoader.h"
+#include "ResourceHandle.h"
 #include <wtf/Assertions.h>
 #include <wtf/Vector.h>
 
@@ -82,13 +82,13 @@ void Loader::servePendingRequests()
             domain = static_cast<HTMLDocument*>(req->docLoader()->doc())->domain().deprecatedString();
     }
     
-    RefPtr<ResourceLoader> loader = ResourceLoader::create(request, this, req->docLoader());
+    RefPtr<ResourceHandle> loader = ResourceHandle::create(request, this, req->docLoader());
 
     if (loader)
         m_requestsLoading.add(loader.get(), req);
 }
 
-void Loader::receivedAllData(ResourceLoader* job, PlatformData allData)
+void Loader::receivedAllData(ResourceHandle* job, PlatformData allData)
 {
     RequestMap::iterator i = m_requestsLoading.find(job);
     if (i == m_requestsLoading.end())
@@ -118,7 +118,7 @@ void Loader::receivedAllData(ResourceLoader* job, PlatformData allData)
     servePendingRequests();
 }
 
-void Loader::receivedResponse(ResourceLoader* job, PlatformResponse response)
+void Loader::receivedResponse(ResourceHandle* job, PlatformResponse response)
 {
     Request* req = m_requestsLoading.get(job);
     ASSERT(req);
@@ -145,7 +145,7 @@ void Loader::receivedResponse(ResourceLoader* job, PlatformResponse response)
     }
 }
 
-void Loader::didReceiveData(ResourceLoader* job, const char* data, int size)
+void Loader::didReceiveData(ResourceHandle* job, const char* data, int size)
 {
     Request* request = m_requestsLoading.get(job);
     if (!request)
@@ -202,7 +202,7 @@ void Loader::cancelRequests(DocLoader* dl)
             ++pIt;
     }
 
-    Vector<ResourceLoader*, 256> jobsToCancel;
+    Vector<ResourceHandle*, 256> jobsToCancel;
 
     RequestMap::iterator end = m_requestsLoading.end();
     for (RequestMap::iterator i = m_requestsLoading.begin(); i != end; ++i) {
@@ -212,7 +212,7 @@ void Loader::cancelRequests(DocLoader* dl)
     }
 
     for (unsigned i = 0; i < jobsToCancel.size(); ++i) {
-        ResourceLoader* job = jobsToCancel[i];
+        ResourceHandle* job = jobsToCancel[i];
         Request* r = m_requestsLoading.get(job);
         m_requestsLoading.remove(job);
         cache()->remove(r->cachedObject());
@@ -235,7 +235,7 @@ void Loader::removeBackgroundDecodingRequest(Request* r)
         m_requestsBackgroundDecoding.remove(r);
 }
 
-ResourceLoader* Loader::jobForRequest(const String& URL) const
+ResourceHandle* Loader::jobForRequest(const String& URL) const
 {
     RequestMap::const_iterator end = m_requestsLoading.end();
     for (RequestMap::const_iterator i = m_requestsLoading.begin(); i != end; ++i) {
index f6ecc6da128abc54b467261c0941f3d66f8d8505..eb36b8305b55baec52786d8d301fcefa124e8ca0 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef loader_h
 #define loader_h
 
-#include "ResourceLoaderClient.h"
+#include "ResourceHandleClient.h"
 #include <wtf/HashMap.h>
 #include "DeprecatedPtrList.h"
 
@@ -46,7 +46,7 @@ namespace WebCore {
     class Request;
     class String;
 
-    class Loader : ResourceLoaderClient
+    class Loader : ResourceHandleClient
     {
     public:
         Loader();
@@ -60,17 +60,17 @@ namespace WebCore {
         void removeBackgroundDecodingRequest(Request*);
         
         // may return 0
-        ResourceLoader* jobForRequest(const String& URL) const;
+        ResourceHandle* jobForRequest(const String& URL) const;
 
     private:
-        virtual void receivedResponse(ResourceLoader*, PlatformResponse);
-        virtual void didReceiveData(ResourceLoader*, const char*, int);
-        virtual void receivedAllData(ResourceLoader*, PlatformData);
+        virtual void receivedResponse(ResourceHandle*, PlatformResponse);
+        virtual void didReceiveData(ResourceHandle*, const char*, int);
+        virtual void receivedAllData(ResourceHandle*, PlatformData);
 
         void servePendingRequests();
 
         DeprecatedPtrList<Request> m_requestsPending;
-        typedef HashMap<ResourceLoader*, Request*> RequestMap;
+        typedef HashMap<ResourceHandle*, Request*> RequestMap;
         RequestMap m_requestsLoading;
 
         DeprecatedPtrList<Request> m_requestsBackgroundDecoding;
index 994dec7b3de7a7242a02e347def3061862a501f3..004afb4f336e2c575aedd1d3078c8d3f33161100 100644 (file)
@@ -31,7 +31,7 @@
 
 using namespace WebCore;
 
-void IconLoader::receivedResponse(ResourceLoader* resourceLoader, NSURLResponse* responsePtr)
+void IconLoader::receivedResponse(ResourceHandle* resourceLoader, NSURLResponse* responsePtr)
 {
     ASSERT(resourceLoader);
     ASSERT(responsePtr);
index 83b1d989c8f2fd96de3628a7d4a4008d92209756..c2e2e6567865037336f1ec7db766ae4376b820aa 100644 (file)
@@ -37,7 +37,7 @@
 #import "FrameLoader.h"
 #import "Logging.h"
 #import "Request.h"
-#import "ResourceLoader.h"
+#import "ResourceHandle.h"
 #import "ResourceRequest.h"
 #import "WebCoreFrameBridge.h"
 #import "loader.h"
index 48b518e46409cbdc2982ec7299583eba083e1dd2..081a3b1353c1f8dff58b5dda6dedc1c05398db2c 100644 (file)
@@ -57,7 +57,7 @@ namespace WebCore {
     class Frame;
     class FrameLoader;
 
-    // FIXME: Rename to ResourceLoader after resolving conflict with existing class of that name.
+    // FIXME: Rename to ResourceHandle after resolving conflict with existing class of that name.
     class WebResourceLoader : public Shared<WebResourceLoader> {
     public:
         virtual ~WebResourceLoader();
index 55b6b3d675a8df046ec5ee47e8e47f69a3c05271..0236a79a5bdf4c1f28810379c2143da916c5ccbf 100644 (file)
@@ -42,12 +42,12 @@ namespace WebCore {
 
     class FormData;
     class String;
-    class ResourceLoader;
+    class ResourceHandle;
     class ResourceRequest;
     
     class SubresourceLoader : public WebResourceLoader {
     public:
-        static PassRefPtr<SubresourceLoader> create(Frame*, ResourceLoader*, ResourceRequest&);
+        static PassRefPtr<SubresourceLoader> create(Frame*, ResourceHandle*, ResourceRequest&);
 
         virtual ~SubresourceLoader();
 
@@ -58,14 +58,14 @@ namespace WebCore {
         virtual void didFail(NSError *);
 
     private:
-        static PassRefPtr<SubresourceLoader> create(Frame*, ResourceLoader*,
+        static PassRefPtr<SubresourceLoader> create(Frame*, ResourceHandle*,
             NSMutableURLRequest *, NSDictionary *customHeaders, const String& referrer);
 
-        SubresourceLoader(Frame*, ResourceLoader*);
+        SubresourceLoader(Frame*, ResourceHandle*);
 
         virtual void didCancel(NSError *);
 
-        RefPtr<ResourceLoader> m_loader;
+        RefPtr<ResourceHandle> m_loader;
         bool m_loadingMultipartContent;
     };
 
index b350fdf98c4e9e64e948d60fbc2a67d867d2bfa7..2e63009fb875633260aa9234e288c040d8f9f13f 100644 (file)
@@ -34,7 +34,7 @@
 #import "LoaderFunctions.h"
 #import "LoaderNSURLExtras.h"
 #import "LoaderNSURLRequestExtras.h"
-#import "ResourceLoader.h"
+#import "ResourceHandle.h"
 #import "WebCoreFrameBridge.h"
 #import "WebCoreSystemInterface.h"
 #import "WebFormDataStream.h"
@@ -45,7 +45,7 @@ using namespace WebCore;
 
 namespace WebCore {
 
-SubresourceLoader::SubresourceLoader(Frame* frame, ResourceLoader* loader)
+SubresourceLoader::SubresourceLoader(Frame* frame, ResourceHandle* loader)
     : WebResourceLoader(frame)
     , m_loader(loader)
     , m_loadingMultipartContent(false)
@@ -57,7 +57,7 @@ SubresourceLoader::~SubresourceLoader()
 {
 }
 
-PassRefPtr<SubresourceLoader> SubresourceLoader::create(Frame* frame, ResourceLoader* loader, ResourceRequest& request)
+PassRefPtr<SubresourceLoader> SubresourceLoader::create(Frame* frame, ResourceHandle* loader, ResourceRequest& request)
 {
     FrameLoader* fl = frame->loader();
     if (fl->state() == FrameStateProvisional)
index 7454256423efba43e286e964acd932b9e9bcbcb7..0b88762fb3350032147f56224282d3530cba18f3 100644 (file)
@@ -42,8 +42,8 @@
 #include "FramePrivate.h"
 #include "GraphicsContext.h"
 #include "HTMLDocument.h"
-#include "ResourceLoader.h"
-#include "ResourceLoaderInternal.h"
+#include "ResourceHandle.h"
+#include "ResourceHandleInternal.h"
 #include "PlatformMouseEvent.h"
 #include "PlatformKeyboardEvent.h"
 #include "PlatformWheelEvent.h"
@@ -72,7 +72,7 @@ Vector<char> loadResourceIntoArray(const char* resourceName)
 namespace WebCore {
 
 FrameGdkClientDefault::FrameGdkClientDefault()
-    : ResourceLoaderClient()
+    : ResourceHandleClient()
     , m_frame(0)
     , m_beginCalled(false)
 {
@@ -93,7 +93,7 @@ void FrameGdkClientDefault::openURL(const KURL& url)
     m_beginCalled = false;
 
     ResourceRequest request(url);
-    RefPtr<ResourceLoader> loader = ResourceLoader::create(request, this, 0);
+    RefPtr<ResourceHandle> loader = ResourceHandle::create(request, this, 0);
 }
 
 void FrameGdkClientDefault::submitForm(const String& method, const KURL& url, const FormData* postData)
@@ -104,22 +104,22 @@ void FrameGdkClientDefault::submitForm(const String& method, const KURL& url, co
     request.setHTTPMethod(method);
     request.setHTTPBody(*postData);
 
-    RefPtr<ResourceLoader> loader = ResourceLoader::create(request, this, 0);
+    RefPtr<ResourceHandle> loader = ResourceHandle::create(request, this, 0);
 }
 
-void FrameGdkClientDefault::receivedResponse(ResourceLoader*, PlatformResponse)
+void FrameGdkClientDefault::receivedResponse(ResourceHandle*, PlatformResponse)
 {
     // no-op
 }
 
-void FrameGdkClientDefault::didReceiveData(ResourceLoader* job, const char* data, int length)
+void FrameGdkClientDefault::didReceiveData(ResourceHandle* job, const char* data, int length)
 {
     if (!m_beginCalled) {
         m_beginCalled = true;
 
 #if 0  // FIXME: This is from Qt version, need to be removed or Gdk equivalent written
         // Assign correct mimetype _before_ calling begin()!
-        ResourceLoaderInternal* d = job->getInternal();
+        ResourceHandleInternal* d = job->getInternal();
         if (d) {
             ResourceRequest request(m_frame->resourceRequest());
             request.m_responseMIMEType = d->m_mimetype;
@@ -132,7 +132,7 @@ void FrameGdkClientDefault::didReceiveData(ResourceLoader* job, const char* data
     m_frame->write(data, length);
 }
 
-void FrameGdkClientDefault::receivedAllData(ResourceLoader* job, PlatformData data)
+void FrameGdkClientDefault::receivedAllData(ResourceHandle* job, PlatformData data)
 {
     m_frame->end();
     m_beginCalled = false;
index be9b58f50bc73c256068dba04dbea186b9d7b33a..352d57948578a0bde4d0576ff07f13a77b1eb0dc 100644 (file)
@@ -29,7 +29,7 @@
 #define FrameGdk_H_
 
 #include "Frame.h"
-#include "ResourceLoaderClient.h"
+#include "ResourceHandleClient.h"
 #include <gdk/gdk.h>
 
 namespace WebCore {
@@ -48,7 +48,7 @@ public:
 };
 
 class FrameGdkClientDefault : public FrameGdkClient,
-                              public  ResourceLoaderClient 
+                              public  ResourceHandleClient 
 {
 public:
 
@@ -60,10 +60,10 @@ public:
     virtual void openURL(const KURL&);
     virtual void submitForm(const String& method, const KURL&, const FormData*);
 
-    // ResourceLoaderClient
-    virtual void receivedResponse(ResourceLoader*, PlatformResponse);
-    virtual void didReceiveData(ResourceLoader*, const char*, int);
-    virtual void receivedAllData(ResourceLoader*, PlatformData);
+    // ResourceHandleClient
+    virtual void receivedResponse(ResourceHandle*, PlatformResponse);
+    virtual void didReceiveData(ResourceHandle*, const char*, int);
+    virtual void receivedAllData(ResourceHandle*, PlatformData);
 
 private:
     FrameGdk* m_frame;
index 70bd73cd9c9bd7d4bd46d5e99a4571ff613f82bb..e578366d077db3ea9bbace1dd6556f2016fde893 100644 (file)
@@ -140,7 +140,7 @@ int WebCore::findNextWordFromIndex(UChar const*, int, int, bool) { notImplemente
 
 namespace WebCore {
 
-Vector<char> ServeSynchronousRequest(Loader*,DocLoader*,ResourceLoader*,KURL&,DeprecatedString&) { notImplemented(); return Vector<char>(); }
+Vector<char> ServeSynchronousRequest(Loader*,DocLoader*,ResourceHandle*,KURL&,DeprecatedString&) { notImplemented(); return Vector<char>(); }
 
 }
 
@@ -219,8 +219,8 @@ unsigned PlugInInfoStore::pluginCount() const { return 0; }
 bool WebCore::PlugInInfoStore::supportsMIMEType(const WebCore::String&) { return false; }
 void WebCore::refreshPlugins(bool) { }
 
-void WebCore::ResourceLoader::assembleResponseHeaders() const { }
-void WebCore::ResourceLoader::retrieveCharset() const { }
+void WebCore::ResourceHandle::assembleResponseHeaders() const { }
+void WebCore::ResourceHandle::retrieveCharset() const { }
 
 void FrameGdk::restoreDocumentState() { }
 void FrameGdk::partClearedInBegin() { }
similarity index 70%
rename from WebCore/platform/network/ResourceLoader.cpp
rename to WebCore/platform/network/ResourceHandle.cpp
index 7b87981bb62dad7f02586efa918a6c162c96670e..4d0bf8f737d726498791d3b8808367cf8a1b4923 100644 (file)
  */
 
 #include "config.h"
-#include "ResourceLoader.h"
-#include "ResourceLoaderInternal.h"
+#include "ResourceHandle.h"
+#include "ResourceHandleInternal.h"
 
 #include "LoaderFunctions.h"
 #include "Logging.h"
 
 namespace WebCore {
 
-ResourceLoader::ResourceLoader(const ResourceRequest& request, ResourceLoaderClient* client)
-    : d(new ResourceLoaderInternal(this, request, client))
+ResourceHandle::ResourceHandle(const ResourceRequest& request, ResourceHandleClient* client)
+    : d(new ResourceHandleInternal(this, request, client))
 {
 }
 
-PassRefPtr<ResourceLoader> ResourceLoader::create(const ResourceRequest& request, ResourceLoaderClient* client, DocLoader* dl)
+PassRefPtr<ResourceHandle> ResourceHandle::create(const ResourceRequest& request, ResourceHandleClient* client, DocLoader* dl)
 {
-    RefPtr<ResourceLoader> newLoader(new ResourceLoader(request, client));
+    RefPtr<ResourceHandle> newLoader(new ResourceHandle(request, client));
     
     if (newLoader->start(dl))
         return newLoader.release();
@@ -47,35 +47,35 @@ PassRefPtr<ResourceLoader> ResourceLoader::create(const ResourceRequest& request
     return 0;
 }
 
-bool ResourceLoader::isErrorPage() const
+bool ResourceHandle::isErrorPage() const
 {
     return d->status != 0;
 }
 
-int ResourceLoader::error() const
+int ResourceHandle::error() const
 {
     return d->status;
 }
 
-void ResourceLoader::setError(int e)
+void ResourceHandle::setError(int e)
 {
     d->status = e;
 }
 
-String ResourceLoader::responseEncoding() const
+String ResourceHandle::responseEncoding() const
 {
     retrieveResponseEncoding();
     
     return d->m_responseEncoding;
 }
 
-String ResourceLoader::responseHTTPHeadersAsString() const
+String ResourceHandle::responseHTTPHeadersAsString() const
 {
     assembleResponseHeaders();
     return d->responseHeaders;
 }
 
-void ResourceLoader::kill()
+void ResourceHandle::kill()
 {
     if (d->m_loading){
         ASSERT(!d->m_cancelled);
@@ -85,27 +85,27 @@ void ResourceLoader::kill()
     }
 }
 
-const HTTPHeaderMap& ResourceLoader::requestHeaders() const
+const HTTPHeaderMap& ResourceHandle::requestHeaders() const
 {
     return d->m_request.httpHeaderFields();
 }
 
-const KURL& ResourceLoader::url() const
+const KURL& ResourceHandle::url() const
 {
     return d->m_request.url();
 }
 
-const FormData& ResourceLoader::postData() const
+const FormData& ResourceHandle::postData() const
 {
     return d->m_request.httpBody();
 }
 
-const String& ResourceLoader::method() const
+const String& ResourceHandle::method() const
 {
     return d->m_request.httpMethod();
 }
 
-ResourceLoaderClient* ResourceLoader::client() const
+ResourceHandleClient* ResourceHandle::client() const
 {
     return d->m_client;
 }
similarity index 83%
rename from WebCore/platform/network/ResourceLoader.h
rename to WebCore/platform/network/ResourceHandle.h
index 28909cb8020c8b6299b0094363635f2c933442a5..57b1243957e5de78621dcbcb8dd1548bbaea5b56 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef ResourceLoader_h
-#define ResourceLoader_h
+#ifndef ResourceHandle_h
+#define ResourceHandle_h
 
-#include "ResourceLoaderClient.h" // for PlatformResponse
+#include "ResourceHandleClient.h" // for PlatformResponse
 #include "ResourceRequest.h"
 #include "StringHash.h"
 #include "Timer.h"
@@ -58,17 +58,17 @@ namespace WebCore {
 class DocLoader;
 class FormData;
 class KURL;
-class ResourceLoaderInternal;
+class ResourceHandleInternal;
 
-class ResourceLoader : public Shared<ResourceLoader> {
+class ResourceHandle : public Shared<ResourceHandle> {
 private:
-    ResourceLoader(const ResourceRequest&, ResourceLoaderClient*);
+    ResourceHandle(const ResourceRequest&, ResourceHandleClient*);
 
 public:
     // FIXME: should not need the DocLoader
-    static PassRefPtr<ResourceLoader> create(const ResourceRequest&, ResourceLoaderClient*, DocLoader*);
+    static PassRefPtr<ResourceHandle> create(const ResourceRequest&, ResourceHandleClient*, DocLoader*);
 
-    ~ResourceLoader();
+    ~ResourceHandle();
 
     int error() const;
     void setError(int);
@@ -90,16 +90,16 @@ public:
 #if USE(WININET)
     void setHasReceivedResponse(bool b = true);
     bool hasReceivedResponse() const;
-    void fileLoadTimer(Timer<ResourceLoader>* timer);
+    void fileLoadTimer(Timer<ResourceHandle>* timer);
     void onHandleCreated(LPARAM);
     void onRequestRedirected(LPARAM);
     void onRequestComplete(LPARAM);
     friend void __stdcall transferJobStatusCallback(HINTERNET, DWORD_PTR, DWORD, LPVOID, DWORD);
-    friend LRESULT __stdcall ResourceLoaderWndProc(HWND, unsigned message, WPARAM, LPARAM);
+    friend LRESULT __stdcall ResourceHandleWndProc(HWND, unsigned message, WPARAM, LPARAM);
 #endif
 
 #if PLATFORM(GDK) || PLATFORM(QT)
-    ResourceLoaderInternal* getInternal() { return d; }
+    ResourceHandleInternal* getInternal() { return d; }
 #endif
 
 #if PLATFORM(QT)
@@ -109,7 +109,7 @@ public:
 
     void cancel();
     
-    ResourceLoaderClient* client() const;
+    ResourceHandleClient* client() const;
 
     void receivedResponse(PlatformResponse);
 
@@ -124,9 +124,9 @@ private:
     void assembleResponseHeaders() const;
     void retrieveResponseEncoding() const;
 
-    ResourceLoaderInternal* d;
+    ResourceHandleInternal* d;
 };
 
 }
 
-#endif // ResourceLoader_h
+#endif // ResourceHandle_h
similarity index 77%
rename from WebCore/platform/network/ResourceLoaderClient.h
rename to WebCore/platform/network/ResourceHandleClient.h
index 29107907660a3a5a599b6524b707dc338a34ef34..ece27eea8b03bf80d440e169ea24793914accdc3 100644 (file)
@@ -23,8 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef ResourceLoaderClient_h
-#define ResourceLoaderClient_h
+#ifndef ResourceHandleClient_h
+#define ResourceHandleClient_h
 
 #include <wtf/Platform.h>
 #if USE(CFNETWORK)
@@ -73,30 +73,30 @@ namespace WebCore {
 #endif
 
     class KURL;
-    class ResourceLoader;
+    class ResourceHandle;
 
-    class ResourceLoaderClient {
+    class ResourceHandleClient {
     public:
-        virtual ~ResourceLoaderClient() { }
+        virtual ~ResourceHandleClient() { }
 
         // request may be modified
-        // void willSendRequest(ResourceLoader*, Request&, const ResourceResonse& redirectResponse) { }
+        // void willSendRequest(ResourceHandle*, Request&, const ResourceResonse& redirectResponse) { }
     
-        // void didReceiveAuthenticationChallenge(ResourceLoader*, const AuthenticationChallenge&) { }
-        // void didCancelAuthenticationChallenge(ResourceLoader*, const AuthenticationChallenge&) { }
+        // void didReceiveAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge&) { }
+        // void didCancelAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge&) { }
 
-        // void didReceiveResponse(ResourceLoader*, const ResourceResponse&) { }
-        virtual void didReceiveData(ResourceLoader*, const char*, int) { }
-        virtual void didFinishLoading(ResourceLoader*) { }
+        // void didReceiveResponse(ResourceHandle*, const ResourceResponse&) { }
+        virtual void didReceiveData(ResourceHandle*, const char*, int) { }
+        virtual void didFinishLoading(ResourceHandle*) { }
         // void didFailWithError(ResourceError*) { }
 
         // cached response may be modified
-        // void willCacheResponse(ResourceLoader*, CachedResourceResponse&) { }
+        // void willCacheResponse(ResourceHandle*, CachedResourceResponse&) { }
 
         // old-style methods
-        virtual void receivedRedirect(ResourceLoader*, const KURL&) { }
-        virtual void receivedResponse(ResourceLoader*, PlatformResponse) { }
-        virtual void receivedAllData(ResourceLoader*, PlatformData) { }
+        virtual void receivedRedirect(ResourceHandle*, const KURL&) { }
+        virtual void receivedResponse(ResourceHandle*, PlatformResponse) { }
+        virtual void receivedAllData(ResourceHandle*, PlatformData) { }
     };
 
 }
similarity index 88%
rename from WebCore/platform/network/ResourceLoaderInternal.h
rename to WebCore/platform/network/ResourceHandleInternal.h
index 3adad37b6d31a2039becdc357ab87a2fcb9638a3..41c4d8be9865f985440d0415c849a8f05401aeff 100644 (file)
@@ -24,8 +24,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef ResourceLoaderInternal_h
-#define ResourceLoaderInternal_h
+#ifndef ResourceHandleInternal_h
+#define ResourceHandleInternal_h
 
 #include "FormData.h"
 #include "KURL.h"
@@ -53,16 +53,16 @@ typedef void CURL;
 #include "WebSubresourceLoader.h"
 #endif
 
-// The allocations and releases in ResourceLoaderInternal are
+// The allocations and releases in ResourceHandleInternal are
 // Cocoa-exception-free (either simple Foundation classes or
 // WebCoreResourceLoaderImp which avoids doing work in dealloc).
 
 namespace WebCore {
 
-    class ResourceLoaderInternal
+    class ResourceHandleInternal
     {
     public:
-        ResourceLoaderInternal(ResourceLoader* loader, const ResourceRequest& request, ResourceLoaderClient* c)
+        ResourceHandleInternal(ResourceHandle* loader, const ResourceRequest& request, ResourceHandleClient* c)
             : m_client(c)
             , m_request(request)
             , status(0)
@@ -78,7 +78,7 @@ namespace WebCore {
 #endif
 #if USE(WININET)
             , m_fileHandle(INVALID_HANDLE_VALUE)
-            , m_fileLoadTimer(loader, &ResourceLoader::fileLoadTimer)
+            , m_fileLoadTimer(loader, &ResourceHandle::fileLoadTimer)
             , m_resourceHandle(0)
             , m_secondaryHandle(0)
             , m_jobId(0)
@@ -96,9 +96,9 @@ namespace WebCore {
         {
         }
         
-        ~ResourceLoaderInternal();
+        ~ResourceHandleInternal();
         
-        ResourceLoaderClient* m_client;
+        ResourceHandleClient* m_client;
         
         ResourceRequest m_request;
         
@@ -121,7 +121,7 @@ namespace WebCore {
 #endif
 #if USE(WININET)
         HANDLE m_fileHandle;
-        Timer<ResourceLoader> m_fileLoadTimer;
+        Timer<ResourceHandle> m_fileLoadTimer;
         HINTERNET m_resourceHandle;
         HINTERNET m_secondaryHandle;
         unsigned m_jobId;
@@ -146,4 +146,4 @@ namespace WebCore {
 
 } // namespace WebCore
 
-#endif // ResourceLoaderInternal_h
+#endif // ResourceHandleInternal_h
similarity index 94%
rename from WebCore/platform/network/cf/ResourceLoaderCFNet.cpp
rename to WebCore/platform/network/cf/ResourceHandleCFNet.cpp
index b8705d636e650eb5750a272e5774e3cec942eadc..9b2fd48376621b027b36c84c8cc79b127e394a09 100644 (file)
@@ -27,8 +27,8 @@
 
 #if USE(CFNETWORK)
 
-#include "ResourceLoader.h"
-#include "ResourceLoaderInternal.h"
+#include "ResourceHandle.h"
+#include "ResourceHandleInternal.h"
 #include "DocLoader.h"
 #include "Frame.h"
 
@@ -47,7 +47,7 @@ namespace WebCore {
 
 CFURLRequestRef willSendRequest(CFURLConnectionRef conn, CFURLRequestRef request, CFURLResponseRef redirectionResponse, const void* clientInfo) 
 {
-    ResourceLoader* job = (ResourceLoader*)clientInfo;
+    ResourceHandle* job = (ResourceHandle*)clientInfo;
     CFURLRef url = CFURLRequestGetURL(request);
     CFStringRef urlString = CFURLGetString(url);
     const char *bytes = CFStringGetCStringPtr(urlString, kCFStringEncodingUTF8);
@@ -80,7 +80,7 @@ CFURLRequestRef willSendRequest(CFURLConnectionRef conn, CFURLRequestRef request
 
 void didReceiveResponse(CFURLConnectionRef conn, CFURLResponseRef response, const void* clientInfo) 
 {
-    ResourceLoader* job = (ResourceLoader*)clientInfo;
+    ResourceHandle* job = (ResourceHandle*)clientInfo;
 
 #if defined(LOG_RESOURCELOADER_EVENTS)
     CFStringRef str = CFStringCreateWithFormat(0, 0, CFSTR("didReceiveResponse(conn=%p, job = %p)\n"), conn, job);
@@ -93,7 +93,7 @@ void didReceiveResponse(CFURLConnectionRef conn, CFURLResponseRef response, cons
 
 void didReceiveData(CFURLConnectionRef conn, CFDataRef data, CFIndex originalLength, const void* clientInfo) 
 {
-    ResourceLoader* job = (ResourceLoader*)clientInfo;
+    ResourceHandle* job = (ResourceHandle*)clientInfo;
     const UInt8* bytes = CFDataGetBytePtr(data);
     CFIndex length = CFDataGetLength(data);
 
@@ -108,7 +108,7 @@ void didReceiveData(CFURLConnectionRef conn, CFDataRef data, CFIndex originalLen
 
 void didFinishLoading(CFURLConnectionRef conn, const void* clientInfo) 
 {
-    ResourceLoader* job = (ResourceLoader*)clientInfo;
+    ResourceHandle* job = (ResourceHandle*)clientInfo;
 
 #if defined(LOG_RESOURCELOADER_EVENTS)
     CFStringRef str = CFStringCreateWithFormat(0, 0, CFSTR("didFinishLoading(conn=%p, job = %p)\n"), conn, job);
@@ -123,7 +123,7 @@ void didFinishLoading(CFURLConnectionRef conn, const void* clientInfo)
 
 void didFail(CFURLConnectionRef conn, CFStreamError error, const void* clientInfo) 
 {
-    ResourceLoader* job = (ResourceLoader*)clientInfo;
+    ResourceHandle* job = (ResourceHandle*)clientInfo;
 
 #if defined(LOG_RESOURCELOADER_EVENTS)
     CFStringRef str = CFStringCreateWithFormat(0, 0, CFSTR("didFail(conn=%p, job = %p, error = {%d, %d})\n"), conn, job, error.domain, error.error);
@@ -139,13 +139,13 @@ void didFail(CFURLConnectionRef conn, CFStreamError error, const void* clientInf
 
 CFCachedURLResponseRef willCacheResponse(CFURLConnectionRef conn, CFCachedURLResponseRef cachedResponse, const void* clientInfo) 
 {
-    ResourceLoader* job = (ResourceLoader*)clientInfo;
+    ResourceHandle* job = (ResourceHandle*)clientInfo;
     return cachedResponse;
 }
 
 void didReceiveChallenge(CFURLConnectionRef conn, CFURLAuthChallengeRef challenge, const void* clientInfo)
 {
-    ResourceLoader* job = (ResourceLoader*)clientInfo;
+    ResourceHandle* job = (ResourceHandle*)clientInfo;
 
     // Do nothing right now
 }
@@ -168,7 +168,7 @@ void addHeadersFromHashMap(CFHTTPMessageRef request, const HTTPHeaderMap& reques
     CFRelease(allHeaders);
 }
 
-ResourceLoaderInternal::~ResourceLoaderInternal()
+ResourceHandleInternal::~ResourceHandleInternal()
 {
     if (m_connection) {
 
@@ -183,7 +183,7 @@ ResourceLoaderInternal::~ResourceLoaderInternal()
     }
 }
 
-ResourceLoader::~ResourceLoader()
+ResourceHandle::~ResourceHandle()
 {
 #if defined(LOG_RESOURCELOADER_EVENTS)
     CFStringRef str = CFStringCreateWithFormat(0, 0, CFSTR("Destroying job %p\n"), this);
@@ -230,7 +230,7 @@ void runLoaderThread(void *unused)
     CFRunLoopRun();
 }
 
-bool ResourceLoader::start(DocLoader* docLoader)
+bool ResourceHandle::start(DocLoader* docLoader)
 {
     CFURLRef url = d->m_request.url().createCFURL();
     CFStringRef requestMethod = d->m_request.httpMethod().createCFString();
@@ -331,7 +331,7 @@ bool ResourceLoader::start(DocLoader* docLoader)
     return true;
 }
 
-void ResourceLoader::cancel()
+void ResourceHandle::cancel()
 {
     if (d->m_connection) {
         CFURLConnectionCancel(d->m_connection);
@@ -339,7 +339,7 @@ void ResourceLoader::cancel()
         d->m_connection = 0;
     }
 
-    // Copied directly from ResourceLoaderWin.cpp
+    // Copied directly from ResourceHandleWin.cpp
     setError(1);
     d->m_client->receivedAllData(this, 0);
     d->m_client->didFinishLoading(this);
similarity index 81%
rename from WebCore/platform/network/gdk/ResourceLoaderCurl.cpp
rename to WebCore/platform/network/gdk/ResourceHandleCurl.cpp
index 1b51ac93e124e6bebda59fdbac6330d228c6d422..07a54ccaa545c3358c2ded7864786a54f5b00690 100644 (file)
  */
 
 #include "config.h"
-#include "ResourceLoader.h"
+#include "ResourceHandle.h"
 
 #include "DocLoader.h"
-#include "ResourceLoaderInternal.h"
-#include "ResourceLoaderManager.h"
+#include "ResourceHandleInternal.h"
+#include "ResourceHandleManager.h"
 
 namespace WebCore {
 
-ResourceLoaderInternal::~ResourceLoaderInternal()
+ResourceHandleInternal::~ResourceHandleInternal()
 {
 }
 
-ResourceLoader::~ResourceLoader()
+ResourceHandle::~ResourceHandle()
 {
     cancel();
 }
 
-bool ResourceLoader::start(DocLoader* docLoader)
+bool ResourceHandle::start(DocLoader* docLoader)
 {
     ref();
-    ResourceLoaderManager::get()->add(this);
+    ResourceHandleManager::get()->add(this);
     return true;
 }
 
-void ResourceLoader::cancel()
+void ResourceHandle::cancel()
 {
-    ResourceLoaderManager::get()->cancel(this);
+    ResourceHandleManager::get()->cancel(this);
 }
 
 } // namespace WebCore
similarity index 85%
rename from WebCore/platform/network/gdk/ResourceLoaderManager.cpp
rename to WebCore/platform/network/gdk/ResourceHandleManager.cpp
index 413d11a2ccaaece1f006e0e815e140b3eabec275..ebbb167a5cdbe3ce738d8307b35a6dd2e22c0c15 100644 (file)
  */
 
 #include "config.h"
-#include "ResourceLoaderManager.h"
+#include "ResourceHandleManager.h"
 
-#include "ResourceLoader.h"
-#include "ResourceLoaderInternal.h"
+#include "ResourceHandle.h"
+#include "ResourceHandleInternal.h"
 
 namespace WebCore {
 
 const int selectTimeoutMS = 5;
 const double pollTimeSeconds = 0.05;
 
-ResourceLoaderManager::ResourceLoaderManager()
+ResourceHandleManager::ResourceHandleManager()
     : m_useSimple(false)
-    , jobs(new HashSet<ResourceLoader*>)
-    , m_downloadTimer(this, &ResourceLoaderManager::downloadTimerCallback)
+    , jobs(new HashSet<ResourceHandle*>)
+    , m_downloadTimer(this, &ResourceHandleManager::downloadTimerCallback)
 {
     curl_global_init(CURL_GLOBAL_ALL);
     curlMultiHandle = curl_multi_init();
 }
 
-ResourceLoaderManager* ResourceLoaderManager::get()
+ResourceHandleManager* ResourceHandleManager::get()
 {
-    static ResourceLoaderManager* singleton;
+    static ResourceHandleManager* singleton;
     if (!singleton)
-        singleton = new ResourceLoaderManager;
+        singleton = new ResourceHandleManager;
     return singleton;
 }
 
-void ResourceLoaderManager::useSimpleTransfer(bool useSimple)
+void ResourceHandleManager::useSimpleTransfer(bool useSimple)
 {
     m_useSimple = useSimple;
 }
 
 static size_t writeCallback(void* ptr, size_t size, size_t nmemb, void* obj)
 {
-    ResourceLoader* job = static_cast<ResourceLoader*>(obj);
-    ResourceLoaderInternal* d = job->getInternal();
+    ResourceHandle* job = static_cast<ResourceHandle*>(obj);
+    ResourceHandleInternal* d = job->getInternal();
     int totalSize = size * nmemb;
     d->client->didReceiveData(job, static_cast<char*>(ptr), totalSize);
     return totalSize;
@@ -73,16 +73,16 @@ static size_t headerCallback(char* ptr, size_t size, size_t nmemb, void* data)
     return totalSize;
 }
 
-void ResourceLoaderManager::downloadTimerCallback(Timer<ResourceLoaderManager>* timer)
+void ResourceHandleManager::downloadTimerCallback(Timer<ResourceHandleManager>* timer)
 {
     if (jobs->isEmpty()) {
         m_downloadTimer.stop();
         return;
     }
     if (m_useSimple) {
-        for (HashSet<ResourceLoader*>::iterator it = jobs->begin(); it != jobs->end(); ++it) {
-            ResourceLoader* job = *it;
-            ResourceLoaderInternal* d = job->getInternal();
+        for (HashSet<ResourceHandle*>::iterator it = jobs->begin(); it != jobs->end(); ++it) {
+            ResourceHandle* job = *it;
+            ResourceHandleInternal* d = job->getInternal();
             CURLcode res = curl_easy_perform(d->m_handle);
             if (res != CURLE_OK)
                 printf("Error WITH JOB %d\n", res);
@@ -128,12 +128,12 @@ void ResourceLoaderManager::downloadTimerCallback(Timer<ResourceLoaderManager>*
                 // find the node which has same d->m_handle as completed transfer
                 CURL* chandle = msg->easy_handle;
                 assert(chandle);
-                ResourceLoader *job;
+                ResourceHandle *job;
                 curl_easy_getinfo(chandle, CURLINFO_PRIVATE, &job);
                 assert(job); //fixme: assert->if ?
                 // if found, delete it
                 if (job) {
-                    ResourceLoaderInternal *d = job->getInternal();
+                    ResourceHandleInternal *d = job->getInternal();
                     switch (msg->data.result) {
                         case CURLE_OK: {
                             // use this to authenticate
@@ -160,9 +160,9 @@ void ResourceLoaderManager::downloadTimerCallback(Timer<ResourceLoaderManager>*
         m_downloadTimer.startOneShot(pollTimeSeconds);
 }
 
-void ResourceLoaderManager::remove(ResourceLoader* job)
+void ResourceHandleManager::remove(ResourceHandle* job)
 {
-    ResourceLoaderInternal* d = job->getInternal();
+    ResourceHandleInternal* d = job->getInternal();
     if (!d->m_handle)
         return;
     if (jobs->contains(job))
@@ -178,10 +178,10 @@ void ResourceLoaderManager::remove(ResourceLoader* job)
     }
 }
 
-void ResourceLoaderManager::add(ResourceLoader* job)
+void ResourceHandleManager::add(ResourceHandle* job)
 {
     bool startTimer = jobs->isEmpty();
-    ResourceLoaderInternal* d = job->getInternal();
+    ResourceHandleInternal* d = job->getInternal();
     DeprecatedString url = d->URL.url();
     d->m_handle = curl_easy_init();
     curl_easy_setopt(d->m_handle, CURLOPT_PRIVATE, job);
@@ -213,7 +213,7 @@ void ResourceLoaderManager::add(ResourceLoader* job)
         m_downloadTimer.startOneShot(pollTimeSeconds);
 }
 
-void ResourceLoaderManager::cancel(ResourceLoader* job)
+void ResourceHandleManager::cancel(ResourceHandle* job)
 {
     remove(job);
     job->setError(1);
similarity index 81%
rename from WebCore/platform/network/gdk/ResourceLoaderManager.h
rename to WebCore/platform/network/gdk/ResourceHandleManager.h
index de3d9bc616c0acf2f75c14696d03371a64c38fe5..f317dfa6d850015ec33f90a38dc53520701c7b93 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef ResourceLoaderManager_H_
-#define ResourceLoaderManager_H_
+#ifndef ResourceHandleManager_H_
+#define ResourceHandleManager_H_
 
 #include "Frame.h"
 #include "Timer.h"
-#include "ResourceLoaderClient.h"
+#include "ResourceHandleClient.h"
 #include <curl/curl.h>
 
 namespace WebCore {
 
-class ResourceLoaderManager {
+class ResourceHandleManager {
 public:
-    static ResourceLoaderManager* get();
-    void add(ResourceLoader*);
-    void cancel(ResourceLoader*);
+    static ResourceHandleManager* get();
+    void add(ResourceHandle*);
+    void cancel(ResourceHandle*);
 
     // If true, don't multiplex downloads: download completely one at a time.
     void useSimpleTransfer(bool useSimple);
 
 private:
-    ResourceLoaderManager();
-    void downloadTimerCallback(Timer<ResourceLoaderManager>*);
-    void remove(ResourceLoader*);
+    ResourceHandleManager();
+    void downloadTimerCallback(Timer<ResourceHandleManager>*);
+    void remove(ResourceHandle*);
 
     bool m_useSimple;
-    HashSet<ResourceLoader*>* jobs;
-    Timer<ResourceLoaderManager> m_downloadTimer;
+    HashSet<ResourceHandle*>* jobs;
+    Timer<ResourceHandleManager> m_downloadTimer;
     CURLM* curlMultiHandle; // not freed
 
     // curl filehandles to poll with select
similarity index 83%
rename from WebCore/platform/network/mac/ResourceLoaderMac.mm
rename to WebCore/platform/network/mac/ResourceHandleMac.mm
index b5c1b999e8dbc5fc8a8d6f995b86b7e31081d36a..f0fdbebf5f56a973ca3e3dd084932b7e551907e6 100644 (file)
@@ -24,8 +24,8 @@
  */
 
 #import "config.h"
-#import "ResourceLoader.h"
-#import "ResourceLoaderInternal.h"
+#import "ResourceHandle.h"
+#import "ResourceHandleInternal.h"
 
 #import "BlockExceptions.h"
 #import "DocLoader.h"
@@ -33,6 +33,7 @@
 #import "FrameLoader.h"
 #import "FrameMac.h"
 #import "KURL.h"
+#import "FormDataMac.h"
 #import "LoaderFunctions.h"
 #import "Logging.h"
 #import "WebCoreFrameBridge.h"
 
 namespace WebCore {
     
-ResourceLoaderInternal::~ResourceLoaderInternal()
+ResourceHandleInternal::~ResourceHandleInternal()
 {
     HardRelease(response);
     HardRelease(loader);
 }
 
-ResourceLoader::~ResourceLoader()
+ResourceHandle::~ResourceHandle()
 {
     if (d->m_subresourceLoader)
         d->m_subresourceLoader->cancel();
     delete d;
 }
 
-bool ResourceLoader::start(DocLoader* docLoader)
+bool ResourceHandle::start(DocLoader* docLoader)
 {
     ref();
     d->m_loading = true;
@@ -88,7 +89,7 @@ bool ResourceLoader::start(DocLoader* docLoader)
     return false;
 }
 
-void ResourceLoader::assembleResponseHeaders() const
+void ResourceHandle::assembleResponseHeaders() const
 {
     if (!d->assembledResponseHeaders) {
         if ([d->response isKindOfClass:[NSHTTPURLResponse class]]) {
@@ -100,7 +101,7 @@ void ResourceLoader::assembleResponseHeaders() const
     }
 }
 
-void ResourceLoader::retrieveResponseEncoding() const
+void ResourceHandle::retrieveResponseEncoding() const
 {
     if (!d->m_retrievedResponseEncoding) {
         NSString *textEncodingName = [d->response textEncodingName];
@@ -110,7 +111,7 @@ void ResourceLoader::retrieveResponseEncoding() const
     }
 }
 
-void ResourceLoader::receivedResponse(NSURLResponse* response)
+void ResourceHandle::receivedResponse(NSURLResponse* response)
 {
     ASSERT(response);
 
@@ -122,35 +123,35 @@ void ResourceLoader::receivedResponse(NSURLResponse* response)
         client()->receivedResponse(this, response);
 }
 
-void ResourceLoader::cancel()
+void ResourceHandle::cancel()
 {
     d->m_subresourceLoader->cancel();
 }
 
-void ResourceLoader::redirectedToURL(NSURL *url)
+void ResourceHandle::redirectedToURL(NSURL *url)
 {
     ASSERT(url);
-    if (ResourceLoaderClient* c = client())
+    if (ResourceHandleClient* c = client())
         c->receivedRedirect(this, KURL(url));
 }
 
-void ResourceLoader::addData(NSData *data)
+void ResourceHandle::addData(NSData *data)
 {
     ASSERT(data);
-    if (ResourceLoaderClient* c = client())
+    if (ResourceHandleClient* c = client())
         c->didReceiveData(this, (const char *)[data bytes], [data length]);
 }
 
-void ResourceLoader::finishJobAndHandle(NSData *data)
+void ResourceHandle::finishJobAndHandle(NSData *data)
 {
-    if (ResourceLoaderClient* c = client()) {
+    if (ResourceHandleClient* c = client()) {
         c->receivedAllData(this, data);
         c->didFinishLoading(this);
     }
     kill();
 }
 
-void ResourceLoader::reportError()
+void ResourceHandle::reportError()
 {
     setError(1);
     finishJobAndHandle(nil);
similarity index 78%
rename from WebCore/platform/network/qt/ResourceLoaderManager.cpp
rename to WebCore/platform/network/qt/ResourceHandleManager.cpp
index 6b614b7f7e08ad045569f00b24edc2c08ff62822..442da8aa8923cab3e6a7ad6f82c2597ac994ab58 100644 (file)
 #include <kio/job.h>
 
 #include "FrameQt.h"
-#include "ResourceLoaderManager.h"
-#include "ResourceLoaderInternal.h"
+#include "ResourceHandleManager.h"
+#include "ResourceHandleInternal.h"
 
 namespace WebCore {
 
-static ResourceLoaderManager* s_self = 0;
+static ResourceHandleManager* s_self = 0;
 
-ResourceLoaderManager::ResourceLoaderManager()
+ResourceHandleManager::ResourceHandleManager()
     : m_jobToKioMap()
     , m_kioToJobMap()
     , m_frameClient(0)
 {
 }
 
-ResourceLoaderManager::~ResourceLoaderManager()
+ResourceHandleManager::~ResourceHandleManager()
 {
 }
 
-ResourceLoaderManager* ResourceLoaderManager::self()
+ResourceHandleManager* ResourceHandleManager::self()
 {
     if (!s_self)
-        s_self = new ResourceLoaderManager();
+        s_self = new ResourceHandleManager();
 
     return s_self;
 }
 
-void ResourceLoaderManager::slotData(KIO::Job* kioJob, const QByteArray& data)
+void ResourceHandleManager::slotData(KIO::Job* kioJob, const QByteArray& data)
 {
-    ResourceLoader* job = 0;
+    ResourceHandle* job = 0;
 
     // Check if we know about 'kioJob'...
-    QMap<KIO::Job*, ResourceLoader*>::const_iterator it = m_kioToJobMap.find(kioJob);
+    QMap<KIO::Job*, ResourceHandle*>::const_iterator it = m_kioToJobMap.find(kioJob);
     if (it != m_kioToJobMap.end())
         job = it.value();
 
     if (!job)
         return;
 
-    ResourceLoaderInternal* d = job->getInternal();
+    ResourceHandleInternal* d = job->getInternal();
     if (!d || !d->m_client)
         return;
 
     d->m_client->didReceiveData(job, data.data(), data.size());
 }
 
-void ResourceLoaderManager::slotMimetype(KIO::Job* kioJob, const QString& type)
+void ResourceHandleManager::slotMimetype(KIO::Job* kioJob, const QString& type)
 {
-    ResourceLoader* job = 0;
+    ResourceHandle* job = 0;
 
     // Check if we know about 'kioJob'...
-    QMap<KIO::Job*, ResourceLoader*>::const_iterator it = m_kioToJobMap.find(kioJob);
+    QMap<KIO::Job*, ResourceHandle*>::const_iterator it = m_kioToJobMap.find(kioJob);
     if (it != m_kioToJobMap.end())
         job = it.value();
 
     if (!job)
         return;
 
-    ResourceLoaderInternal* d = job->getInternal();
+    ResourceHandleInternal* d = job->getInternal();
     if (!d || !d->m_client)
         return;
 
     d->m_mimetype = type;
 }
 
-void ResourceLoaderManager::slotResult(KJob* kjob)
+void ResourceHandleManager::slotResult(KJob* kjob)
 {
     KIO::Job* kioJob = qobject_cast<KIO::Job*>(kjob);
     if (!kioJob)
         return;
 
-    ResourceLoader* job = 0;
+    ResourceHandle* job = 0;
 
     // Check if we know about 'kioJob'...
-    QMap<KIO::Job*, ResourceLoader*>::const_iterator it = m_kioToJobMap.find(kioJob);
+    QMap<KIO::Job*, ResourceHandle*>::const_iterator it = m_kioToJobMap.find(kioJob);
     if (it != m_kioToJobMap.end())
         job = it.value();
 
@@ -117,16 +117,16 @@ void ResourceLoaderManager::slotResult(KJob* kjob)
     m_frameClient->checkLoaded();
 }
 
-void ResourceLoaderManager::remove(ResourceLoader* job)
+void ResourceHandleManager::remove(ResourceHandle* job)
 {
-    ResourceLoaderInternal* d = job->getInternal();
+    ResourceHandleInternal* d = job->getInternal();
     if (!d || !d->m_client)
         return;
 
     KIO::Job* kioJob = 0;
 
     // Check if we know about 'job'...
-    QMap<ResourceLoader*, KIO::Job*>::const_iterator it = m_jobToKioMap.find(job);
+    QMap<ResourceHandle*, KIO::Job*>::const_iterator it = m_jobToKioMap.find(job);
     if (it != m_jobToKioMap.end())
         kioJob = it.value();
 
@@ -154,9 +154,9 @@ void ResourceLoaderManager::remove(ResourceLoader* job)
     m_kioToJobMap.remove(kioJob);
 }
 
-void ResourceLoaderManager::add(ResourceLoader* job, FrameQtClient* frameClient)
+void ResourceHandleManager::add(ResourceHandle* job, FrameQtClient* frameClient)
 {
-    ResourceLoaderInternal* d = job->getInternal();
+    ResourceHandleInternal* d = job->getInternal();
     DeprecatedString url = d->m_request.url().url();
 
     KIO::Job* kioJob = 0;
@@ -186,7 +186,7 @@ void ResourceLoaderManager::add(ResourceLoader* job, FrameQtClient* frameClient)
         ASSERT(m_frameClient == frameClient);
 }
 
-void ResourceLoaderManager::cancel(ResourceLoader* job)
+void ResourceHandleManager::cancel(ResourceHandle* job)
 {
     remove(job);
     job->setError(1);
@@ -194,4 +194,4 @@ void ResourceLoaderManager::cancel(ResourceLoader* job)
 
 } // namespace WebCore
 
-#include "ResourceLoaderManager.moc"
+#include "ResourceHandleManager.moc"
similarity index 79%
rename from WebCore/platform/network/qt/ResourceLoaderManager.h
rename to WebCore/platform/network/qt/ResourceHandleManager.h
index 5b383b44b65455b3d5aa186ade58e954541f1e8e..533af563a7194665b89d747dc295ba2ff8c99265 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef ResourceLoaderManager_H
-#define ResourceLoaderManager_H
+#ifndef ResourceHandleManager_H
+#define ResourceHandleManager_H
 
 #include <QMap>
 #include <QObject>
 
-#include "ResourceLoader.h"
+#include "ResourceHandle.h"
 
 namespace WebCore {
 
 class FrameQtClient;
 
-class ResourceLoaderManager : public QObject {
+class ResourceHandleManager : public QObject {
 Q_OBJECT
 public:
-    static ResourceLoaderManager* self();
+    static ResourceHandleManager* self();
 
-    void add(ResourceLoader*, FrameQtClient*);
-    void cancel(ResourceLoader*);
+    void add(ResourceHandle*, FrameQtClient*);
+    void cancel(ResourceHandle*);
 
 public Q_SLOTS:
     void slotData(KIO::Job*, const QByteArray& data);
@@ -51,14 +51,14 @@ public Q_SLOTS:
     void slotResult(KJob*);
     
 private:
-    ResourceLoaderManager();
-    ~ResourceLoaderManager();
+    ResourceHandleManager();
+    ~ResourceHandleManager();
 
-    void remove(ResourceLoader*);
+    void remove(ResourceHandle*);
 
     // KIO Job <-> WebKit Job mapping
-    QMap<ResourceLoader*, KIO::Job*> m_jobToKioMap;
-    QMap<KIO::Job*, ResourceLoader*> m_kioToJobMap;
+    QMap<ResourceHandle*, KIO::Job*> m_jobToKioMap;
+    QMap<KIO::Job*, ResourceHandle*> m_kioToJobMap;
 
     FrameQtClient* m_frameClient;
 };
similarity index 80%
rename from WebCore/platform/network/qt/ResourceLoaderQt.cpp
rename to WebCore/platform/network/qt/ResourceHandleQt.cpp
index c9c40bf74c4f147c88618339bc1adca412a77adc..e0b85bef534c41ebf42c42947bcb0f9c4cc0b69e 100644 (file)
 
 #include "FrameQt.h"
 #include "DocLoader.h"
-#include "ResourceLoader.h"
+#include "ResourceHandle.h"
 #include "DeprecatedString.h"
-#include "ResourceLoaderManager.h"
-#include "ResourceLoaderInternal.h"
+#include "ResourceHandleManager.h"
+#include "ResourceHandleInternal.h"
 
 namespace WebCore {
 
-ResourceLoaderInternal::~ResourceLoaderInternal()
+ResourceHandleInternal::~ResourceHandleInternal()
 {
 }
 
-ResourceLoader::~ResourceLoader()
+ResourceHandle::~ResourceHandle()
 {
     cancel();
     delete d;
 }
 
-bool ResourceLoader::start(DocLoader* docLoader)
+bool ResourceHandle::start(DocLoader* docLoader)
 {
     ref();
     d->m_loading = true;
@@ -59,16 +59,16 @@ bool ResourceLoader::start(DocLoader* docLoader)
         ASSERT(frame);
     }
 
-    ResourceLoaderManager::self()->add(this, frame ? frame->client() : 0);
+    ResourceHandleManager::self()->add(this, frame ? frame->client() : 0);
     return true;
 }
 
-void ResourceLoader::cancel()
+void ResourceHandle::cancel()
 {
-    ResourceLoaderManager::self()->cancel(this);
+    ResourceHandleManager::self()->cancel(this);
 }
 
-void ResourceLoader::assembleResponseHeaders() const
+void ResourceHandle::assembleResponseHeaders() const
 {
     if (!d->assembledResponseHeaders) {
         ASSERT(d->m_response);
@@ -78,7 +78,7 @@ void ResourceLoader::assembleResponseHeaders() const
     }
 }
 
-void ResourceLoader::retrieveResponseEncoding() const
+void ResourceHandle::retrieveResponseEncoding() const
 {
     if (!d->m_retrievedResponseEncoding) {
         d->m_responseEncoding = extractCharsetFromHeaders(d->responseHeaders);
@@ -86,7 +86,7 @@ void ResourceLoader::retrieveResponseEncoding() const
     }
 }
 
-void ResourceLoader::receivedResponse(PlatformResponse response)
+void ResourceHandle::receivedResponse(PlatformResponse response)
 {
     Q_ASSERT(method() == "POST");
 
@@ -95,10 +95,10 @@ void ResourceLoader::receivedResponse(PlatformResponse response)
     d->m_response = response;
 
     if (d->m_client)
-        d->m_client->receivedResponse(const_cast<ResourceLoader*>(this), response);
+        d->m_client->receivedResponse(const_cast<ResourceHandle*>(this), response);
 }
 
-QString ResourceLoader::extractCharsetFromHeaders(QString headers) const
+QString ResourceHandle::extractCharsetFromHeaders(QString headers) const
 {
     int pos = headers.find("content-type:", 0, false);
 
similarity index 90%
rename from WebCore/platform/network/win/ResourceLoaderWin.cpp
rename to WebCore/platform/network/win/ResourceHandleWin.cpp
index e6c53961376f3c3a28cb3e85ea9896cc743b8877..2ae5fd36ab3c860fabb4e2ecff7634d759c4483c 100644 (file)
@@ -24,9 +24,9 @@
  */
 
 #include "config.h"
-#include "ResourceLoader.h"
-#include "ResourceLoaderInternal.h"
-#include "ResourceLoaderWin.h"
+#include "ResourceHandle.h"
+#include "ResourceHandleInternal.h"
+#include "ResourceHandleWin.h"
 
 #include "CString.h"
 #include "DocLoader.h"
 namespace WebCore {
 
 static unsigned transferJobId = 0;
-static HashMap<int, ResourceLoader*>* jobIdMap = 0;
+static HashMap<int, ResourceHandle*>* jobIdMap = 0;
 
 static HWND transferJobWindowHandle = 0;
-const LPCWSTR kResourceLoaderWindowClassName = L"ResourceLoaderWindowClass";
+const LPCWSTR kResourceHandleWindowClassName = L"ResourceHandleWindowClass";
 
 // Message types for internal use (keep in sync with kMessageHandlers)
 enum {
@@ -51,17 +51,17 @@ enum {
   requestCompleteMessage
 };
 
-typedef void (ResourceLoader:: *ResourceLoaderEventHandler)(LPARAM);
-static const ResourceLoaderEventHandler messageHandlers[] = {
-    &ResourceLoader::onHandleCreated,
-    &ResourceLoader::onRequestRedirected,
-    &ResourceLoader::onRequestComplete
+typedef void (ResourceHandle:: *ResourceHandleEventHandler)(LPARAM);
+static const ResourceHandleEventHandler messageHandlers[] = {
+    &ResourceHandle::onHandleCreated,
+    &ResourceHandle::onRequestRedirected,
+    &ResourceHandle::onRequestComplete
 };
 
-static int addToOutstandingJobs(ResourceLoader* job)
+static int addToOutstandingJobs(ResourceHandle* job)
 {
     if (!jobIdMap)
-        jobIdMap = new HashMap<int, ResourceLoader*>;
+        jobIdMap = new HashMap<int, ResourceHandle*>;
     transferJobId++;
     jobIdMap->set(transferJobId, job);
     return transferJobId;
@@ -74,21 +74,21 @@ static void removeFromOutstandingJobs(int jobId)
     jobIdMap->remove(jobId);
 }
 
-static ResourceLoader* lookupResourceLoader(int jobId)
+static ResourceHandle* lookupResourceHandle(int jobId)
 {
     if (!jobIdMap)
         return 0;
     return jobIdMap->get(jobId);
 }
 
-static LRESULT CALLBACK ResourceLoaderWndProc(HWND hWnd, UINT message,
+static LRESULT CALLBACK ResourceHandleWndProc(HWND hWnd, UINT message,
                                               WPARAM wParam, LPARAM lParam)
 {
     if (message >= handleCreatedMessage) {
         UINT index = message - handleCreatedMessage;
         if (index < _countof(messageHandlers)) {
             unsigned jobId = (unsigned) wParam;
-            ResourceLoader* job = lookupResourceLoader(jobId);
+            ResourceHandle* job = lookupResourceHandle(jobId);
             if (job) {
                 ASSERT(job->d->m_jobId == jobId);
                 ASSERT(job->d->m_threadId == GetCurrentThreadId());
@@ -100,7 +100,7 @@ static LRESULT CALLBACK ResourceLoaderWndProc(HWND hWnd, UINT message,
     return DefWindowProc(hWnd, message, wParam, lParam);
 }
 
-static void initializeOffScreenResourceLoaderWindow()
+static void initializeOffScreenResourceHandleWindow()
 {
     if (transferJobWindowHandle)
         return;
@@ -108,28 +108,28 @@ static void initializeOffScreenResourceLoaderWindow()
     WNDCLASSEX wcex;
     memset(&wcex, 0, sizeof(WNDCLASSEX));
     wcex.cbSize = sizeof(WNDCLASSEX);
-    wcex.lpfnWndProc    = ResourceLoaderWndProc;
+    wcex.lpfnWndProc    = ResourceHandleWndProc;
     wcex.hInstance      = Page::instanceHandle();
-    wcex.lpszClassName  = kResourceLoaderWindowClassName;
+    wcex.lpszClassName  = kResourceHandleWindowClassName;
     RegisterClassEx(&wcex);
 
-    transferJobWindowHandle = CreateWindow(kResourceLoaderWindowClassName, 0, 0, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
+    transferJobWindowHandle = CreateWindow(kResourceHandleWindowClassName, 0, 0, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
         HWND_MESSAGE, 0, Page::instanceHandle(), 0);
 }
 
-ResourceLoaderInternal::~ResourceLoaderInternal()
+ResourceHandleInternal::~ResourceHandleInternal()
 {
     if (m_fileHandle != INVALID_HANDLE_VALUE)
         CloseHandle(m_fileHandle);
 }
 
-ResourceLoader::~ResourceLoader()
+ResourceHandle::~ResourceHandle()
 {
     if (d->m_jobId)
         removeFromOutstandingJobs(d->m_jobId);
 }
 
-void ResourceLoader::onHandleCreated(LPARAM lParam)
+void ResourceHandle::onHandleCreated(LPARAM lParam)
 {
     if (!d->m_resourceHandle) {
         d->m_resourceHandle = HINTERNET(lParam);
@@ -186,7 +186,7 @@ void ResourceLoader::onHandleCreated(LPARAM lParam)
     }
 }
 
-void ResourceLoader::onRequestRedirected(LPARAM lParam)
+void ResourceHandle::onRequestRedirected(LPARAM lParam)
 {
     // If already canceled, then ignore this event.
     if (d->status != 0)
@@ -196,7 +196,7 @@ void ResourceLoader::onRequestRedirected(LPARAM lParam)
     client()->receivedRedirect(this, url);
 }
 
-void ResourceLoader::onRequestComplete(LPARAM lParam)
+void ResourceHandle::onRequestComplete(LPARAM lParam)
 {
     if (d->m_writing) {
         DWORD bytesWritten;
@@ -303,7 +303,7 @@ static void __stdcall transferJobStatusCallback(HINTERNET internetHandle,
     PostMessage(transferJobWindowHandle, msg, (WPARAM) jobId, lParam);
 }
 
-bool ResourceLoader::start(DocLoader* docLoader)
+bool ResourceHandle::start(DocLoader* docLoader)
 {
     ref();
     if (d->URL.isLocalFile()) {
@@ -336,7 +336,7 @@ bool ResourceLoader::start(DocLoader* docLoader)
         }
         static INTERNET_STATUS_CALLBACK callbackHandle = InternetSetStatusCallback(internetHandle, transferJobStatusCallback);
 
-        initializeOffScreenResourceLoaderWindow();
+        initializeOffScreenResourceHandleWindow();
         d->m_jobId = addToOutstandingJobs(this);
 
         // For form posting, we can't use InternetOpenURL.  We have to use InternetConnect followed by
@@ -372,7 +372,7 @@ bool ResourceLoader::start(DocLoader* docLoader)
     }
 }
 
-void ResourceLoader::fileLoadTimer(Timer<ResourceLoader>* timer)
+void ResourceHandle::fileLoadTimer(Timer<ResourceHandle>* timer)
 {
     d->client->receivedResponse(this, 0);
 
@@ -402,7 +402,7 @@ void ResourceLoader::fileLoadTimer(Timer<ResourceLoader>* timer)
     d->client->didFinishLoading(this);
 }
 
-void ResourceLoader::cancel()
+void ResourceHandle::cancel()
 {
     if (d->m_resourceHandle)
         InternetCloseHandle(d->m_resourceHandle);
@@ -422,12 +422,12 @@ void ResourceLoader::cancel()
         setError(1);
 }
 
-void ResourceLoader::setHasReceivedResponse(bool b)
+void ResourceHandle::setHasReceivedResponse(bool b)
 {
     d->m_hasReceivedResponse = b;
 }
 
-bool ResourceLoader::hasReceivedResponse() const
+bool ResourceHandle::hasReceivedResponse() const
 {
     return d->m_hasReceivedResponse;
 }
similarity index 96%
rename from WebCore/platform/network/win/ResourceLoaderWin.h
rename to WebCore/platform/network/win/ResourceHandleWin.h
index 42a72952c748191dddde595e3da43da6c86e77ec..9aebb0ec8e4dc718778d8bd764b9e2be7bfbdf3f 100644 (file)
@@ -23,8 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef ResourceLoaderWin_H
-#define ResourceLoaderWin_H
+#ifndef ResourceHandleWin_H
+#define ResourceHandleWin_H
 
 #include <windows.h>
 
index 7ed8497a86bca86eb9f9101da791af0c8c0818e1..8af801c5f1be5dd05927a27fc41555dab856a7c0 100644 (file)
 #include "EditorClientQt.h"
 #include "FrameLoadRequest.h"
 #include "DOMImplementation.h"
-#include "ResourceLoaderInternal.h"
+#include "ResourceHandleInternal.h"
 #include "Document.h"
 #include "Settings.h"
 #include "Plugin.h"
 #include "FramePrivate.h"
 #include "GraphicsContext.h"
 #include "HTMLDocument.h"
-#include "ResourceLoader.h"
+#include "ResourceHandle.h"
 #include "PlatformMouseEvent.h"
 #include "PlatformKeyboardEvent.h"
 #include "PlatformWheelEvent.h"
index 9aabdd6332a3d927cd933b862abae5c06a89225f..9b3c0de9f638ae12991df31b13d82835a837373f 100644 (file)
@@ -32,9 +32,9 @@
 #include "FrameQt.h"
 #include "Document.h"
 #include "FrameTree.h"
-#include "ResourceLoader.h"
+#include "ResourceHandle.h"
 #include "LoaderFunctions.h"
-#include "ResourceLoaderInternal.h"
+#include "ResourceHandleInternal.h"
 
 #include <kstdguiitem.h>
 #include <kmessagebox.h>
@@ -68,7 +68,7 @@ void FrameQtClientDefault::openURL(const KURL& url)
     m_assignedMimetype = false;
 
     ResourceRequest request(url);
-    RefPtr<ResourceLoader> loader = ResourceLoader::create(request, this, m_frame->document() ? m_frame->document()->docLoader() : 0);
+    RefPtr<ResourceHandle> loader = ResourceHandle::create(request, this, m_frame->document() ? m_frame->document()->docLoader() : 0);
 }
 
 void FrameQtClientDefault::submitForm(const String& method, const KURL& url, const FormData* postData)
@@ -81,7 +81,7 @@ void FrameQtClientDefault::submitForm(const String& method, const KURL& url, con
     request.setHTTPMethod(method);
     request.setHTTPBody(*postData);
 
-    RefPtr<ResourceLoader> loader = ResourceLoader::create(request, this, m_frame->document() ? m_frame->document()->docLoader() : 0);
+    RefPtr<ResourceHandle> loader = ResourceHandle::create(request, this, m_frame->document() ? m_frame->document()->docLoader() : 0);
 }
 
 void FrameQtClientDefault::checkLoaded()
@@ -144,14 +144,14 @@ void FrameQtClientDefault::loadFinished() const
     // no-op
 }
 
-void FrameQtClientDefault::receivedResponse(ResourceLoader*, PlatformResponse)
+void FrameQtClientDefault::receivedResponse(ResourceHandle*, PlatformResponse)
 {
     // no-op
 }
 
-void FrameQtClientDefault::didReceiveData(ResourceLoader* job, const char* data, int length)
+void FrameQtClientDefault::didReceiveData(ResourceHandle* job, const char* data, int length)
 {
-    ResourceLoaderInternal* d = job->getInternal();
+    ResourceHandleInternal* d = job->getInternal();
     ASSERT(d);
 
     if (!m_assignedMimetype) {
@@ -194,7 +194,7 @@ int FrameQtClientDefault::numPendingOrLoadingRequests(bool recurse) const
     return num;
 }
 
-void FrameQtClientDefault::receivedAllData(ResourceLoader* job, PlatformData data)
+void FrameQtClientDefault::receivedAllData(ResourceHandle* job, PlatformData data)
 {
     ASSERT(m_frame);
   
index 1c845d0234fffadf25016d9cca075f9fb8991ab1..9e390d712af6900116c1bc106ecd20c388945156 100644 (file)
@@ -28,7 +28,7 @@
 #ifndef FrameQtClient_H
 #define FrameQtClient_H
 
-#include "ResourceLoaderClient.h"
+#include "ResourceHandleClient.h"
 
 namespace WebCore {
 
@@ -45,7 +45,7 @@ public:
     virtual void openURL(const KURL&) = 0;
     virtual void submitForm(const String& method, const KURL&, const FormData*) = 0;
 
-    // This is invoked after any ResourceLoader is done,
+    // This is invoked after any ResourceHandle is done,
     // to check wheter all items to be loaded are finished.
     virtual void checkLoaded() = 0;
 
@@ -64,7 +64,7 @@ public:
 };
 
 class FrameQtClientDefault : public FrameQtClient,
-                             public ResourceLoaderClient
+                             public ResourceHandleClient
 {
 public:
     FrameQtClientDefault();
@@ -90,10 +90,10 @@ public:
 
     virtual void loadFinished() const;
 
-    // ResourceLoaderClient
-    virtual void receivedResponse(ResourceLoader*, PlatformResponse);
-    virtual void didReceiveData(ResourceLoader*, const char*, int);
-    virtual void receivedAllData(ResourceLoader*, PlatformData);
+    // ResourceHandleClient
+    virtual void receivedResponse(ResourceHandle*, PlatformResponse);
+    virtual void didReceiveData(ResourceHandle*, const char*, int);
+    virtual void receivedAllData(ResourceHandle*, PlatformData);
 
 private:
     // Internal helpers
index 110352a3e28eef55731baddf5827593d6d44ac3c..3ec7d25725f630341301a8a3e1f6aa454a368975 100644 (file)
@@ -59,8 +59,8 @@
 #include "PlugInInfoStore.h"
 #include "RenderTheme.h"
 #include "FrameWin.h"
-#include "ResourceLoader.h"
-#include "ResourceLoaderClient.h"
+#include "ResourceHandle.h"
+#include "ResourceHandleClient.h"
 #include "RenderThemeWin.h"
 #include "TextBoundaries.h"
 #include "AXObjectCache.h"
@@ -240,11 +240,11 @@ unsigned PlugInInfoStore::pluginCount() const { return 0; }
 bool PlugInInfoStore::supportsMIMEType(const String&) { return false; }
 void refreshPlugins(bool) { }
 
-void ResourceLoader::assembleResponseHeaders() const { }
-void ResourceLoader::retrieveResponseEncoding() const {}
+void ResourceHandle::assembleResponseHeaders() const { }
+void ResourceHandle::retrieveResponseEncoding() const {}
 
 
-Vector<char> ServeSynchronousRequest(Loader*, DocLoader*, ResourceLoader*, KURL&, DeprecatedString&) { notImplemented(); return Vector<char>(); }
+Vector<char> ServeSynchronousRequest(Loader*, DocLoader*, ResourceHandle*, KURL&, DeprecatedString&) { notImplemented(); return Vector<char>(); }
 
 void CheckCacheObjectStatus(DocLoader*, CachedResource*) { }
 bool CheckIfReloading(DocLoader*) { return false; }
index 68577eba9a6c1da979d2cb15ad7256a5314812ae..b2f62fe526d6fa7d363ddd32efff5cbb298666e4 100644 (file)
@@ -35,7 +35,7 @@
 #include "HTMLDocument.h"
 #include "HTMLTokenizer.h"
 #include "LoaderFunctions.h"
-#include "ResourceLoader.h"
+#include "ResourceHandle.h"
 #include "Text.h"
 #include "loader.h"
 #include "markup.h"
index b7f92a2a082f9af450a956d21e1c2a7a6fe1df7f..b6560b3f2bcd0a0069e2d39aba3db13686dba25c 100644 (file)
@@ -34,7 +34,7 @@
 #include "LoaderFunctions.h"
 #include "PlatformString.h"
 #include "RegularExpression.h"
-#include "ResourceLoader.h"
+#include "ResourceHandle.h"
 #include "TextEncoding.h"
 #include "kjs_binding.h"
 #include <kjs/protect.h>
@@ -352,7 +352,7 @@ void XMLHttpRequest::send(const String& body, ExceptionCode& ec)
     // create can return null here, for example if we're no longer attached to a page.
     // this is true while running onunload handlers
     // FIXME: Maybe create can return false for other reasons too?
-    m_loader = ResourceLoader::create(request, this, m_doc->docLoader());
+    m_loader = ResourceHandle::create(request, this, m_doc->docLoader());
 }
 
 void XMLHttpRequest::abort()
@@ -519,7 +519,7 @@ void XMLHttpRequest::processSyncLoadResults(const Vector<char>& data, const KURL
     didFinishLoading(0);
 }
 
-void XMLHttpRequest::didFinishLoading(ResourceLoader* loader)
+void XMLHttpRequest::didFinishLoading(ResourceHandle* loader)
 {
     ASSERT(loader == m_loader);
 
@@ -547,13 +547,13 @@ void XMLHttpRequest::didFinishLoading(ResourceLoader* loader)
     }
 }
 
-void XMLHttpRequest::receivedRedirect(ResourceLoader*, const KURL& m_url)
+void XMLHttpRequest::receivedRedirect(ResourceHandle*, const KURL& m_url)
 {
     if (!urlMatchesDocumentDomain(m_url))
         abort();
 }
 
-void XMLHttpRequest::didReceiveData(ResourceLoader*, const char* data, int len)
+void XMLHttpRequest::didReceiveData(ResourceHandle*, const char* data, int len)
 {
     if (m_responseHeaders.isEmpty() && m_loader)
         m_responseHeaders = m_loader->responseHTTPHeadersAsString();
index 77a852c11ea00faacabfe93db8e9cd8938dfbb2e..7afd20bfce94874370ea7b42b611dfa60dc8f0cc 100644 (file)
@@ -25,7 +25,7 @@
 #include <wtf/HashMap.h>
 #include <wtf/Vector.h>
 #include "KURL.h"
-#include "ResourceLoaderClient.h"
+#include "ResourceHandleClient.h"
 #include "PlatformString.h"
 #include "HTTPHeaderMap.h"
 #include "StringHash.h"
@@ -52,7 +52,7 @@ enum XMLHttpRequestState {
     Loaded = 4          // The data transfer has been completed.
 };
 
-class XMLHttpRequest : public Shared<XMLHttpRequest>, ResourceLoaderClient {
+class XMLHttpRequest : public Shared<XMLHttpRequest>, ResourceHandleClient {
 public:
     XMLHttpRequest(Document*);
     ~XMLHttpRequest();
@@ -81,9 +81,9 @@ public:
 private:
     bool urlMatchesDocumentDomain(const KURL&) const;
 
-    virtual void receivedRedirect(ResourceLoader*, const KURL&);
-    virtual void didReceiveData(ResourceLoader*, const char* data, int size);
-    virtual void didFinishLoading(ResourceLoader*);
+    virtual void receivedRedirect(ResourceHandle*, const KURL&);
+    virtual void didReceiveData(ResourceHandle*, const char* data, int size);
+    virtual void didFinishLoading(ResourceHandle*);
 
     void processSyncLoadResults(const Vector<char>& data, const KURL& finalURL, const DeprecatedString& headers);
 
@@ -104,7 +104,7 @@ private:
     bool m_async;
     HTTPHeaderMap m_requestHeaders;
 
-    RefPtr<ResourceLoader> m_loader;
+    RefPtr<ResourceHandle> m_loader;
 
     XMLHttpRequestState m_state;