WebCore:
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Aug 2006 05:15:40 +0000 (05:15 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Aug 2006 05:15:40 +0000 (05:15 +0000)
        Rubber-stamped by Tim Hatcher.

        - renamed TransferJob to ResourceLoader

        * Projects/gdk/webcore-gdk.bkl:
        * WebCore.vcproj/WebCore/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        * bridge/mac/FrameMac.mm:
        * bridge/mac/WebCoreResourceLoaderImp.h:
        * bridge/mac/WebCoreResourceLoaderImp.mm:
        (-[WebCoreResourceLoaderImp redirectedToURL:]):
        (-[WebCoreResourceLoaderImp addData:]):
        (-[WebCoreResourceLoaderImp finishJobAndHandle:]):
        * bridge/win/FrameWin.cpp:
        * dom/XMLTokenizer.cpp:
        (WebCore::openFunc):
        * loader/Cache.cpp:
        * loader/LoaderFunctions.h:
        * loader/loader.cpp:
        (WebCore::Loader::servePendingRequests):
        (WebCore::Loader::receivedAllData):
        (WebCore::Loader::receivedResponse):
        (WebCore::Loader::receivedData):
        (WebCore::Loader::cancelRequests):
        (WebCore::Loader::jobForRequest):
        * loader/loader.h:
        * loader/mac/LoaderFunctionsMac.mm:
        (WebCore::ServeSynchronousRequest):
        * platform/ResourceLoader.cpp: Added.
        (WebCore::ResourceLoader::ResourceLoader):
        (WebCore::ResourceLoader::isErrorPage):
        (WebCore::ResourceLoader::error):
        (WebCore::ResourceLoader::setError):
        (WebCore::ResourceLoader::queryMetaData):
        (WebCore::ResourceLoader::addMetaData):
        (WebCore::ResourceLoader::kill):
        (WebCore::ResourceLoader::url):
        (WebCore::ResourceLoader::postData):
        (WebCore::ResourceLoader::method):
        (WebCore::ResourceLoader::client):
        * platform/ResourceLoader.h: Added.
        (WebCore::ResourceLoader::getInternal):
        * platform/ResourceLoaderClient.h: Added.
        (WebCore::ResourceLoaderClient::~ResourceLoaderClient):
        (WebCore::ResourceLoaderClient::receivedRedirect):
        (WebCore::ResourceLoaderClient::receivedResponse):
        (WebCore::ResourceLoaderClient::receivedData):
        (WebCore::ResourceLoaderClient::receivedAllData):
        * platform/ResourceLoaderInternal.h: Added.
        (WebCore::ResourceLoaderInternal::ResourceLoaderInternal):
        * platform/TransferJob.cpp: Removed.
        * platform/TransferJob.h: Removed.
        * platform/TransferJobClient.h: Removed.
        * platform/TransferJobInternal.h: Removed.
        * platform/gdk/FrameGdk.cpp:
        (WebCore::FrameGdk::openURL):
        (WebCore::FrameGdk::urlSelected):
        (WebCore::FrameGdk::receivedData):
        (WebCore::FrameGdk::receivedAllData):
        * platform/gdk/FrameGdk.h:
        * platform/gdk/ResourceLoaderCurl.cpp: Added.
        (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
        (WebCore::ResourceLoader::~ResourceLoader):
        (WebCore::ResourceLoader::start):
        (WebCore::ResourceLoader::cancel):
        * platform/gdk/ResourceLoaderManager.cpp: Added.
        (WebCore::ResourceLoaderManager::ResourceLoaderManager):
        (WebCore::ResourceLoaderManager::get):
        (WebCore::ResourceLoaderManager::useSimpleTransfer):
        (WebCore::writeCallback):
        (WebCore::ResourceLoaderManager::downloadTimerCallback):
        (WebCore::ResourceLoaderManager::remove):
        (WebCore::ResourceLoaderManager::add):
        (WebCore::ResourceLoaderManager::cancel):
        * platform/gdk/ResourceLoaderManager.h: Added.
        * platform/gdk/TemporaryLinkStubs.cpp:
        (WebCore::ServeSynchronousRequest):
        (WebCore::ResourceLoader::assembleResponseHeaders):
        (WebCore::ResourceLoader::retrieveCharset):
        * platform/gdk/TransferJobCurl.cpp: Removed.
        * platform/gdk/TransferJobManager.cpp: Removed.
        * platform/gdk/TransferJobManager.h: Removed.
        * platform/mac/ResourceLoaderMac.mm: Added.
        (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
        (WebCore::ResourceLoader::~ResourceLoader):
        (WebCore::ResourceLoader::start):
        (WebCore::ResourceLoader::assembleResponseHeaders):
        (WebCore::ResourceLoader::retrieveCharset):
        (WebCore::ResourceLoader::setLoader):
        (WebCore::ResourceLoader::receivedResponse):
        (WebCore::ResourceLoader::cancel):
        * platform/mac/TransferJobMac.mm: Removed.
        * platform/win/ResourceLoaderWin.cpp: Added.
        (WebCore::addToOutstandingJobs):
        (WebCore::lookupResourceLoader):
        (WebCore::ResourceLoaderWndProc):
        (WebCore::initializeOffScreenResourceLoaderWindow):
        (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
        (WebCore::ResourceLoader::~ResourceLoader):
        (WebCore::ResourceLoader::start):
        (WebCore::ResourceLoader::fileLoadTimer):
        (WebCore::ResourceLoader::cancel):
        * platform/win/ResourceLoaderWin.h: Added.
        * platform/win/TemporaryLinkStubs.cpp:
        (WebCore::ServeSynchronousRequest):
        (WebCore::ResourceLoader::assembleResponseHeaders):
        (WebCore::ResourceLoader::retrieveCharset):
        * platform/win/TransferJobWin.cpp: Removed.
        * platform/win/TransferJobWin.h: Removed.
        * xml/XSLTProcessor.cpp:
        (WebCore::docLoaderFunc):
        * xml/xmlhttprequest.cpp:
        (WebCore::XMLHttpRequest::send):
        (WebCore::XMLHttpRequest::receivedAllData):
        (WebCore::XMLHttpRequest::receivedRedirect):
        (WebCore::XMLHttpRequest::receivedData):
        * xml/xmlhttprequest.h:

WebKit:

        Reviewed by Tim Hatcher.

        - renamed TransferJob to ResourceLoader in WebCore

        * COM/WebFrame.cpp:
        (WebFrame::loadDataSource):
        (WebFrame::receivedRedirect):
        (WebFrame::receivedResponse):
        (WebFrame::receivedData):
        (WebFrame::receivedAllData):
        (WebFrame::setStatusText):
        * COM/WebFrame.h:

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

35 files changed:
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/mac/WebCoreResourceLoaderImp.h
WebCore/bridge/mac/WebCoreResourceLoaderImp.mm
WebCore/bridge/win/FrameWin.cpp
WebCore/dom/XMLTokenizer.cpp
WebCore/loader/Cache.cpp
WebCore/loader/LoaderFunctions.h
WebCore/loader/loader.cpp
WebCore/loader/loader.h
WebCore/loader/mac/LoaderFunctionsMac.mm
WebCore/platform/ResourceLoader.cpp [moved from WebCore/platform/TransferJob.cpp with 70% similarity]
WebCore/platform/ResourceLoader.h [moved from WebCore/platform/TransferJob.h with 79% similarity]
WebCore/platform/ResourceLoaderClient.h [moved from WebCore/platform/TransferJobClient.h with 78% similarity]
WebCore/platform/ResourceLoaderInternal.h [moved from WebCore/platform/TransferJobInternal.h with 84% similarity]
WebCore/platform/gdk/FrameGdk.cpp
WebCore/platform/gdk/FrameGdk.h
WebCore/platform/gdk/ResourceLoaderCurl.cpp [moved from WebCore/platform/gdk/TransferJobCurl.cpp with 81% similarity]
WebCore/platform/gdk/ResourceLoaderManager.cpp [moved from WebCore/platform/gdk/TransferJobManager.cpp with 84% similarity]
WebCore/platform/gdk/ResourceLoaderManager.h [moved from WebCore/platform/gdk/TransferJobManager.h with 81% similarity]
WebCore/platform/gdk/TemporaryLinkStubs.cpp
WebCore/platform/mac/ResourceLoaderMac.mm [moved from WebCore/platform/mac/TransferJobMac.mm with 89% similarity]
WebCore/platform/win/ResourceLoaderWin.cpp [moved from WebCore/platform/win/TransferJobWin.cpp with 92% similarity]
WebCore/platform/win/ResourceLoaderWin.h [moved from WebCore/platform/win/TransferJobWin.h with 96% similarity]
WebCore/platform/win/TemporaryLinkStubs.cpp
WebCore/xml/XSLTProcessor.cpp
WebCore/xml/xmlhttprequest.cpp
WebCore/xml/xmlhttprequest.h
WebKit/COM/WebFrame.cpp
WebKit/COM/WebFrame.h
WebKit/ChangeLog

index beb9e9e950436e91cf3ba4a2137e0cd236368bf3..f447b137c09115cfc94b764f9cb770cd5c6d7544 100644 (file)
@@ -1,3 +1,124 @@
+2006-07-31  Maciej Stachowiak  <mjs@apple.com>
+
+        Rubber-stamped by Tim Hatcher.
+
+        - renamed TransferJob to ResourceLoader
+
+        * Projects/gdk/webcore-gdk.bkl:
+        * WebCore.vcproj/WebCore/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * WebCoreSources.bkl:
+        * bridge/mac/FrameMac.mm:
+        * bridge/mac/WebCoreResourceLoaderImp.h:
+        * bridge/mac/WebCoreResourceLoaderImp.mm:
+        (-[WebCoreResourceLoaderImp redirectedToURL:]):
+        (-[WebCoreResourceLoaderImp addData:]):
+        (-[WebCoreResourceLoaderImp finishJobAndHandle:]):
+        * bridge/win/FrameWin.cpp:
+        * dom/XMLTokenizer.cpp:
+        (WebCore::openFunc):
+        * loader/Cache.cpp:
+        * loader/LoaderFunctions.h:
+        * loader/loader.cpp:
+        (WebCore::Loader::servePendingRequests):
+        (WebCore::Loader::receivedAllData):
+        (WebCore::Loader::receivedResponse):
+        (WebCore::Loader::receivedData):
+        (WebCore::Loader::cancelRequests):
+        (WebCore::Loader::jobForRequest):
+        * loader/loader.h:
+        * loader/mac/LoaderFunctionsMac.mm:
+        (WebCore::ServeSynchronousRequest):
+        * platform/ResourceLoader.cpp: Added.
+        (WebCore::ResourceLoader::ResourceLoader):
+        (WebCore::ResourceLoader::isErrorPage):
+        (WebCore::ResourceLoader::error):
+        (WebCore::ResourceLoader::setError):
+        (WebCore::ResourceLoader::queryMetaData):
+        (WebCore::ResourceLoader::addMetaData):
+        (WebCore::ResourceLoader::kill):
+        (WebCore::ResourceLoader::url):
+        (WebCore::ResourceLoader::postData):
+        (WebCore::ResourceLoader::method):
+        (WebCore::ResourceLoader::client):
+        * platform/ResourceLoader.h: Added.
+        (WebCore::ResourceLoader::getInternal):
+        * platform/ResourceLoaderClient.h: Added.
+        (WebCore::ResourceLoaderClient::~ResourceLoaderClient):
+        (WebCore::ResourceLoaderClient::receivedRedirect):
+        (WebCore::ResourceLoaderClient::receivedResponse):
+        (WebCore::ResourceLoaderClient::receivedData):
+        (WebCore::ResourceLoaderClient::receivedAllData):
+        * platform/ResourceLoaderInternal.h: Added.
+        (WebCore::ResourceLoaderInternal::ResourceLoaderInternal):
+        * platform/TransferJob.cpp: Removed.
+        * platform/TransferJob.h: Removed.
+        * platform/TransferJobClient.h: Removed.
+        * platform/TransferJobInternal.h: Removed.
+        * platform/gdk/FrameGdk.cpp:
+        (WebCore::FrameGdk::openURL):
+        (WebCore::FrameGdk::urlSelected):
+        (WebCore::FrameGdk::receivedData):
+        (WebCore::FrameGdk::receivedAllData):
+        * platform/gdk/FrameGdk.h:
+        * platform/gdk/ResourceLoaderCurl.cpp: Added.
+        (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
+        (WebCore::ResourceLoader::~ResourceLoader):
+        (WebCore::ResourceLoader::start):
+        (WebCore::ResourceLoader::cancel):
+        * platform/gdk/ResourceLoaderManager.cpp: Added.
+        (WebCore::ResourceLoaderManager::ResourceLoaderManager):
+        (WebCore::ResourceLoaderManager::get):
+        (WebCore::ResourceLoaderManager::useSimpleTransfer):
+        (WebCore::writeCallback):
+        (WebCore::ResourceLoaderManager::downloadTimerCallback):
+        (WebCore::ResourceLoaderManager::remove):
+        (WebCore::ResourceLoaderManager::add):
+        (WebCore::ResourceLoaderManager::cancel):
+        * platform/gdk/ResourceLoaderManager.h: Added.
+        * platform/gdk/TemporaryLinkStubs.cpp:
+        (WebCore::ServeSynchronousRequest):
+        (WebCore::ResourceLoader::assembleResponseHeaders):
+        (WebCore::ResourceLoader::retrieveCharset):
+        * platform/gdk/TransferJobCurl.cpp: Removed.
+        * platform/gdk/TransferJobManager.cpp: Removed.
+        * platform/gdk/TransferJobManager.h: Removed.
+        * platform/mac/ResourceLoaderMac.mm: Added.
+        (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
+        (WebCore::ResourceLoader::~ResourceLoader):
+        (WebCore::ResourceLoader::start):
+        (WebCore::ResourceLoader::assembleResponseHeaders):
+        (WebCore::ResourceLoader::retrieveCharset):
+        (WebCore::ResourceLoader::setLoader):
+        (WebCore::ResourceLoader::receivedResponse):
+        (WebCore::ResourceLoader::cancel):
+        * platform/mac/TransferJobMac.mm: Removed.
+        * platform/win/ResourceLoaderWin.cpp: Added.
+        (WebCore::addToOutstandingJobs):
+        (WebCore::lookupResourceLoader):
+        (WebCore::ResourceLoaderWndProc):
+        (WebCore::initializeOffScreenResourceLoaderWindow):
+        (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
+        (WebCore::ResourceLoader::~ResourceLoader):
+        (WebCore::ResourceLoader::start):
+        (WebCore::ResourceLoader::fileLoadTimer):
+        (WebCore::ResourceLoader::cancel):
+        * platform/win/ResourceLoaderWin.h: Added.
+        * platform/win/TemporaryLinkStubs.cpp:
+        (WebCore::ServeSynchronousRequest):
+        (WebCore::ResourceLoader::assembleResponseHeaders):
+        (WebCore::ResourceLoader::retrieveCharset):
+        * platform/win/TransferJobWin.cpp: Removed.
+        * platform/win/TransferJobWin.h: Removed.
+        * xml/XSLTProcessor.cpp:
+        (WebCore::docLoaderFunc):
+        * xml/xmlhttprequest.cpp:
+        (WebCore::XMLHttpRequest::send):
+        (WebCore::XMLHttpRequest::receivedAllData):
+        (WebCore::XMLHttpRequest::receivedRedirect):
+        (WebCore::XMLHttpRequest::receivedData):
+        * xml/xmlhttprequest.h:
+
 2006-07-31  Darin Adler  <darin@apple.com>
 
         Reviewed by Hyatt.
index a794333341fe7d7feda53796eadb1d9664a30a10..9b56a44d8c7306f3b0c4191192bcffdbd684bc71 100644 (file)
@@ -75,7 +75,7 @@
           platform/gdk/KeyEventGdk.cpp
           platform/gdk/MouseEventGdk.cpp
           platform/gdk/PageGdk.cpp
-          platform/gdk/TransferJobManager.cpp
+          platform/gdk/ResourceLoaderManager.cpp
           platform/gdk/RenderThemeGdk.cpp
           platform/gdk/RenderPopupMenuGdk.cpp
           platform/gdk/ScreenGdk.cpp
@@ -83,7 +83,7 @@
           platform/gdk/SharedTimerLinux.cpp
           platform/gdk/SystemTimeLinux.cpp
           platform/gdk/TemporaryLinkStubs.cpp
-          platform/gdk/TransferJobCurl.cpp
+          platform/gdk/ResourceLoaderCurl.cpp
           platform/gdk/WheelEventGdk.cpp
           platform/gdk/WidgetGdk.cpp
                </sources>
index 5daaaec80c1f7baeceae7a3e95672eeb5c0f7d6b..cdfa951399076a1249ee96fe9342a0cceeb922e4 100644 (file)
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\platform\TransferJob.cpp"\r
+                               RelativePath="..\..\platform\ResourceLoader.cpp"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\platform\TransferJob.h"\r
+                               RelativePath="..\..\platform\ResourceLoader.h"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\platform\TransferJobClient.h"\r
+                               RelativePath="..\..\platform\ResourceLoaderClient.h"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\platform\TransferJobInternal.h"\r
+                               RelativePath="..\..\platform\ResourceLoaderInternal.h"\r
                                >\r
                        </File>\r
                        <File\r
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\..\platform\win\TransferJobWin.cpp"\r
+                                       RelativePath="..\..\platform\win\ResourceLoaderWin.cpp"\r
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\..\platform\win\TransferJobWin.h"\r
+                                       RelativePath="..\..\platform\win\ResourceLoaderWin.h"\r
                                        >\r
                                </File>\r
                                <File\r
index 54c2fb8c536f8ec1f67e1aeb297c8ad28952ee7f..0cc67dbce99f1fd8e107e10b9747eeebbaf8f3a4 100644 (file)
                651B4D8609AC83370029F1EF /* DeprecatedStringList.h in Headers */ = {isa = PBXBuildFile; fileRef = 651B4D8409AC83370029F1EF /* DeprecatedStringList.h */; };
                651B4D8F09AC859F0029F1EF /* DeprecatedStringListMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 651B4D8E09AC859F0029F1EF /* DeprecatedStringListMac.mm */; };
                6522BCDF09C9DAA800C9BA7A /* ResourceRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 6522BCDE09C9DAA800C9BA7A /* ResourceRequest.h */; };
-               6545F67009B82FED0013006F /* TransferJob.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6545F66C09B82FED0013006F /* TransferJob.cpp */; };
-               6545F67109B82FED0013006F /* TransferJob.h in Headers */ = {isa = PBXBuildFile; fileRef = 6545F66D09B82FED0013006F /* TransferJob.h */; };
-               6545F67209B82FED0013006F /* TransferJobClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 6545F66E09B82FED0013006F /* TransferJobClient.h */; };
-               6545F67309B82FED0013006F /* TransferJobInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 6545F66F09B82FED0013006F /* TransferJobInternal.h */; };
-               6545F67609B830180013006F /* TransferJobMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6545F67509B830180013006F /* TransferJobMac.mm */; };
+               6545F67009B82FED0013006F /* ResourceLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6545F66C09B82FED0013006F /* ResourceLoader.cpp */; };
+               6545F67109B82FED0013006F /* ResourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 6545F66D09B82FED0013006F /* ResourceLoader.h */; };
+               6545F67209B82FED0013006F /* ResourceLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 6545F66E09B82FED0013006F /* ResourceLoaderClient.h */; };
+               6545F67309B82FED0013006F /* ResourceLoaderInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 6545F66F09B82FED0013006F /* ResourceLoaderInternal.h */; };
+               6545F67609B830180013006F /* ResourceLoaderMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6545F67509B830180013006F /* ResourceLoaderMac.mm */; };
                654EC611097778F500DAB52C /* WebCoreFrameBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 654EC60F097778F500DAB52C /* WebCoreFrameBridge.h */; settings = {ATTRIBUTES = (Private, ); }; };
                654EC612097778F500DAB52C /* WebCoreFrameBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 654EC610097778F500DAB52C /* WebCoreFrameBridge.mm */; };
                6550B69D099DF0270090D781 /* CDATASection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6550B693099DF0270090D781 /* CDATASection.cpp */; };
                FAE04190097596C9000540BE /* SVGImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = FAE0418E097596C9000540BE /* SVGImageLoader.h */; };
 /* End PBXBuildFile section */
 
-/* Begin PBXBuildStyle section */
-               14DFB2000A7DF2550018F769 /* Development */ = {
-                       isa = PBXBuildStyle;
-                       buildSettings = {
-                               COPY_PHASE_STRIP = NO;
-                       };
-                       name = Development;
-               };
-               14DFB2010A7DF2550018F769 /* Deployment */ = {
-                       isa = PBXBuildStyle;
-                       buildSettings = {
-                               COPY_PHASE_STRIP = YES;
-                       };
-                       name = Deployment;
-               };
-/* End PBXBuildStyle section */
-
 /* Begin PBXContainerItemProxy section */
                DD041FF009D9E3250010AF2A /* PBXContainerItemProxy */ = {
                        isa = PBXContainerItemProxy;
                651B4D8409AC83370029F1EF /* DeprecatedStringList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DeprecatedStringList.h; sourceTree = "<group>"; };
                651B4D8E09AC859F0029F1EF /* DeprecatedStringListMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DeprecatedStringListMac.mm; sourceTree = "<group>"; };
                6522BCDE09C9DAA800C9BA7A /* ResourceRequest.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ResourceRequest.h; sourceTree = "<group>"; };
-               6545F66C09B82FED0013006F /* TransferJob.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TransferJob.cpp; sourceTree = "<group>"; };
-               6545F66D09B82FED0013006F /* TransferJob.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TransferJob.h; sourceTree = "<group>"; };
-               6545F66E09B82FED0013006F /* TransferJobClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TransferJobClient.h; sourceTree = "<group>"; };
-               6545F66F09B82FED0013006F /* TransferJobInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TransferJobInternal.h; sourceTree = "<group>"; };
-               6545F67509B830180013006F /* TransferJobMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = TransferJobMac.mm; sourceTree = "<group>"; };
+               6545F66C09B82FED0013006F /* ResourceLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLoader.cpp; sourceTree = "<group>"; };
+               6545F66D09B82FED0013006F /* ResourceLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ResourceLoader.h; sourceTree = "<group>"; };
+               6545F66E09B82FED0013006F /* ResourceLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ResourceLoaderClient.h; sourceTree = "<group>"; };
+               6545F66F09B82FED0013006F /* ResourceLoaderInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ResourceLoaderInternal.h; sourceTree = "<group>"; };
+               6545F67509B830180013006F /* ResourceLoaderMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceLoaderMac.mm; sourceTree = "<group>"; };
                6548E24809E1E04D00AF8020 /* Document.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Document.idl; sourceTree = "<group>"; };
                654EC60F097778F500DAB52C /* WebCoreFrameBridge.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebCoreFrameBridge.h; sourceTree = "<group>"; };
                654EC610097778F500DAB52C /* WebCoreFrameBridge.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreFrameBridge.mm; sourceTree = "<group>"; };
                                9352071B09BD3BBB00F2038D /* TextBoundaries.mm */,
                                F587853802DE375901EA4122 /* TextBoxMac.mm */,
                                F587851202DE375901EA4122 /* TextFieldMac.mm */,
-                               6545F67509B830180013006F /* TransferJobMac.mm */,
+                               6545F67509B830180013006F /* ResourceLoaderMac.mm */,
                                F5517DC2031AB56301A80180 /* WebCoreHistory.h */,
                                F5517DC3031AB56301A80180 /* WebCoreHistory.m */,
                                84B2B1F7056BEF3A00D2B771 /* WebCoreKeyGenerator.h */,
                                F58786BF02DE3B8601EA4122 /* TextStream.h */,
                                93309EA1099EB78C0056E581 /* Timer.cpp */,
                                9305B24C098F1B6B00C28855 /* Timer.h */,
-                               6545F66C09B82FED0013006F /* TransferJob.cpp */,
-                               6545F66D09B82FED0013006F /* TransferJob.h */,
-                               6545F66E09B82FED0013006F /* TransferJobClient.h */,
-                               6545F66F09B82FED0013006F /* TransferJobInternal.h */,
+                               6545F66C09B82FED0013006F /* ResourceLoader.cpp */,
+                               6545F66D09B82FED0013006F /* ResourceLoader.h */,
+                               6545F66E09B82FED0013006F /* ResourceLoaderClient.h */,
+                               6545F66F09B82FED0013006F /* ResourceLoaderInternal.h */,
                                9380F47109A11AB4001FDB34 /* Widget.cpp */,
                                9380F47209A11AB4001FDB34 /* Widget.h */,
                                93B780C909B3B7FE00690162 /* WidgetClient.h */,
                                A8239E0109B3CF8A00B60641 /* Logging.h in Headers */,
                                BCEB377609B7BB0D00CB38B1 /* FontFallbackList.h in Headers */,
                                C6D74AD509AA282E000B0A52 /* ModifySelectionListLevel.h in Headers */,
-                               6545F67109B82FED0013006F /* TransferJob.h in Headers */,
-                               6545F67209B82FED0013006F /* TransferJobClient.h in Headers */,
-                               6545F67309B82FED0013006F /* TransferJobInternal.h in Headers */,
+                               6545F67109B82FED0013006F /* ResourceLoader.h in Headers */,
+                               6545F67209B82FED0013006F /* ResourceLoaderClient.h in Headers */,
+                               6545F67309B82FED0013006F /* ResourceLoaderInternal.h in Headers */,
                                935FBC4509BA00B900E230B1 /* EventListener.h in Headers */,
                                935FBCF209BA143B00E230B1 /* ExceptionCode.h in Headers */,
                                AB23A31309BBA7760067CC53 /* HTMLTextFieldInnerElement.h in Headers */,
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
-                       buildSettings = {
-                       };
-                       buildStyles = (
-                               14DFB2000A7DF2550018F769 /* Development */,
-                               14DFB2010A7DF2550018F769 /* Deployment */,
-                       );
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                                BCEB377309B7BA3900CB38B1 /* FontMac.mm in Sources */,
                                C6D74AE409AA290A000B0A52 /* ModifySelectionListLevel.cpp in Sources */,
                                A823A75C09B6E53900B60641 /* GraphicsContext.cpp in Sources */,
-                               6545F67009B82FED0013006F /* TransferJob.cpp in Sources */,
-                               6545F67609B830180013006F /* TransferJobMac.mm in Sources */,
+                               6545F67009B82FED0013006F /* ResourceLoader.cpp in Sources */,
+                               6545F67609B830180013006F /* ResourceLoaderMac.mm in Sources */,
                                AB23A31209BBA7760067CC53 /* HTMLTextFieldInnerElement.cpp in Sources */,
                                AB23A32709BBA7D00067CC53 /* BeforeTextInsertedEvent.cpp in Sources */,
                                9352071D09BD3BBB00F2038D /* TextBoundaries.mm in Sources */,
index 6eef678730edd6fbcee87b71d8c82bee700cdb6e..797ca6665f3f5e91331a7288caac9f72ad840b6a 100644 (file)
                platform/TextEncoding.cpp
                platform/TextStream.cpp
                platform/Timer.cpp
-               platform/TransferJob.cpp
+               platform/ResourceLoader.cpp
                platform/Widget.cpp
 
        </set>
                platform/win/SharedTimerWin.cpp
                platform/win/SystemTimeWin.cpp
                platform/win/TemporaryLinkStubs.cpp
-               platform/win/TransferJobWin.cpp
+               platform/win/ResourceLoaderWin.cpp
                platform/win/WidgetWin.cpp
 
        </set>
index e1276a89ab1234fe280904e7b627f8171d90e820..b95b1b6eab4d5f4949bfb41b1776507978973f43 100644 (file)
@@ -65,7 +65,7 @@
 #import "RenderTheme.h"
 #import "RenderView.h"
 #import "TextIterator.h"
-#import "TransferJob.h"
+#import "ResourceLoader.h"
 #import "WebCoreFrameBridge.h"
 #import "WebCoreViewFactory.h"
 #import "WebDashboardRegion.h"
index fb09c586abc957c2b6cb8048f73ed4d8d74b9328..41c815051d0267d2df0934ef1e230f54b82b1a1e 100644 (file)
 #import "WebCoreResourceLoader.h"
 
 namespace WebCore {
-    class TransferJob;
+    class ResourceLoader;
 }
 
 @interface WebCoreResourceLoaderImp : NSObject <WebCoreResourceLoader>
 {
-    WebCore::TransferJob* _job;
+    WebCore::ResourceLoader* _job;
     id <WebCoreResourceHandle> _handle;
 }
 
-- (id)initWithJob:(WebCore::TransferJob*)job;
+- (id)initWithJob:(WebCore::ResourceLoader*)job;
 - (void)setHandle:(id <WebCoreResourceHandle>)handle;
 - (void)jobWillBeDeallocated;
 - (void)jobCanceledLoad;
index 27d7fd6d5fb58432ce2c85053b44b7e1b1ff3783..a6905119415d27b9658199326309e063016a5b14 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #import "WebCoreResourceLoaderImp.h"
 
-#import "TransferJob.h"
+#import "ResourceLoader.h"
 #import "KURL.h"
 #import "loader.h"
 #import <wtf/Assertions.h>
@@ -35,7 +35,7 @@ using namespace WebCore;
 
 @implementation WebCoreResourceLoaderImp
 
-- (id)initWithJob:(TransferJob *)job;
+- (id)initWithJob:(ResourceLoader *)job;
 {
     [super init];
 
@@ -63,7 +63,7 @@ using namespace WebCore;
 {
     ASSERT(url);
     ASSERT(_job);
-    if (TransferJobClient* client = _job->client())
+    if (ResourceLoaderClient* client = _job->client())
         client->receivedRedirect(_job, KURL(url));
 }
 
@@ -71,7 +71,7 @@ using namespace WebCore;
 {
     ASSERT(data);
     ASSERT(_job);
-    if (TransferJobClient* client = _job->client())
+    if (ResourceLoaderClient* client = _job->client())
         client->receivedData(_job, (const char *)[data bytes], [data length]);
 }
 
@@ -87,13 +87,13 @@ using namespace WebCore;
 
 - (void)finishJobAndHandle:(NSData *)data
 {
-    TransferJob* job = _job;
+    ResourceLoader* job = _job;
     id <WebCoreResourceHandle> handle = _handle;
     _job = 0;
     _handle = nil;
 
     if (job) {
-        if (TransferJobClient* client = job->client()) {
+        if (ResourceLoaderClient* client = job->client()) {
             client->receivedAllData(job, data);
             client->receivedAllData(job);
         }
index cebd2029f0314d28c88e9699aba740300791d509..ec5bea4a29bd8b5b49b7fc22570fe1b037bcc733 100644 (file)
@@ -34,7 +34,7 @@
 #include "PlatformKeyboardEvent.h"
 #include "Plugin.h"
 #include "RenderFrame.h"
-#include "TransferJob.h"
+#include "ResourceLoader.h"
 #include <windows.h>
 
 namespace WebCore {
index 429829eec44d8cb28317aecf765695f42149f55f..45767805da4379253c6e34749d979eaeb0da4677 100644 (file)
@@ -40,7 +40,7 @@
 #include "HTMLTokenizer.h"
 #include "LoaderFunctions.h"
 #include "ProcessingInstruction.h"
-#include "TransferJob.h"
+#include "ResourceLoader.h"
 #include <libxml/parser.h>
 #include <libxml/parserInternals.h>
 #include <wtf/Vector.h>
@@ -458,7 +458,7 @@ static void* openFunc(const char* uri)
         return &globalDescriptor;
 
     KURL finalURL;
-    TransferJob* job = new TransferJob(0, "GET", uri);
+    ResourceLoader* job = new ResourceLoader(0, "GET", uri);
     DeprecatedString headers;
     Vector<char> data = ServeSynchronousRequest(Cache::loader(), globalDocLoader, job, finalURL, headers);
     
index 79f110a817a0331276df5b1fa7951df60e91a94a..3f84388a75dc85912812849604b28dab35695a23 100644 (file)
@@ -35,7 +35,7 @@
 #include "DocLoader.h"
 #include "Document.h"
 #include "Image.h"
-#include "TransferJob.h"
+#include "ResourceLoader.h"
 #include "loader.h"
 
 using namespace std;
index 1693189f92fcb4875ab4d7b0fa514560d34b48d4..b102f878a41f631d3b5a0d2d5f26db347c4d351a 100644 (file)
@@ -49,9 +49,9 @@ class KURL;
 class Loader;
 class Request;
 class String;
-class TransferJob;
+class ResourceLoader;
 
-Vector<char> ServeSynchronousRequest(Loader*, DocLoader*, TransferJob*, KURL& finalURL, DeprecatedString& headers);
+Vector<char> ServeSynchronousRequest(Loader*, DocLoader*, ResourceLoader*, KURL& finalURL, DeprecatedString& headers);
 
 void CheckCacheObjectStatus(DocLoader*, CachedResource*);
 bool CheckIfReloading(DocLoader*);
index 9edcb39fa2054da649ef361a34b8043a40306fb7..20335c57c97575875868bb6a4ae5206be0de55e9 100644 (file)
@@ -37,8 +37,8 @@
 #include "HTMLDocument.h"
 #include "LoaderFunctions.h"
 #include "Request.h"
-#include "TransferJob.h"
-#include "TransferJob.h"
+#include "ResourceLoader.h"
+#include "ResourceLoader.h"
 #include <wtf/Assertions.h>
 #include <wtf/Vector.h>
 
@@ -95,7 +95,7 @@ void Loader::servePendingRequests()
     Request* req = m_requestsPending.take(0);
 
     KURL u(req->cachedObject()->url().deprecatedString());
-    TransferJob* job = new TransferJob(this, "GET", u);
+    ResourceLoader* job = new ResourceLoader(this, "GET", u);
 
     if (!req->cachedObject()->accept().isEmpty())
         job->addMetaData("accept", req->cachedObject()->accept());
@@ -115,7 +115,7 @@ void Loader::servePendingRequests()
         m_requestsLoading.add(job, req);
 }
 
-void Loader::receivedAllData(TransferJob* job, PlatformData allData)
+void Loader::receivedAllData(ResourceLoader* job, PlatformData allData)
 {
     RequestMap::iterator i = m_requestsLoading.find(job);
     if (i == m_requestsLoading.end())
@@ -147,7 +147,7 @@ void Loader::receivedAllData(TransferJob* job, PlatformData allData)
     servePendingRequests();
 }
 
-void Loader::receivedResponse(TransferJob* job, PlatformResponse response)
+void Loader::receivedResponse(ResourceLoader* job, PlatformResponse response)
 {
 #ifdef __APPLE__
     Request* req = m_requestsLoading.get(job);
@@ -173,7 +173,7 @@ void Loader::receivedResponse(TransferJob* job, PlatformResponse response)
 #endif
 }
 
-void Loader::receivedData(TransferJob* job, const char* data, int size)
+void Loader::receivedData(ResourceLoader* job, const char* data, int size)
 {
     Request* request = m_requestsLoading.get(job);
     if (!request)
@@ -230,7 +230,7 @@ void Loader::cancelRequests(DocLoader* dl)
             ++pIt;
     }
 
-    Vector<TransferJob*, 256> jobsToCancel;
+    Vector<ResourceLoader*, 256> jobsToCancel;
 
     RequestMap::iterator end = m_requestsLoading.end();
     for (RequestMap::iterator i = m_requestsLoading.begin(); i != end; ++i) {
@@ -240,7 +240,7 @@ void Loader::cancelRequests(DocLoader* dl)
     }
 
     for (unsigned i = 0; i < jobsToCancel.size(); ++i) {
-        TransferJob* job = jobsToCancel[i];
+        ResourceLoader* job = jobsToCancel[i];
         Request* r = m_requestsLoading.get(job);
         m_requestsLoading.remove(job);
         Cache::remove(r->cachedObject());
@@ -263,7 +263,7 @@ void Loader::removeBackgroundDecodingRequest(Request* r)
         m_requestsBackgroundDecoding.remove(r);
 }
 
-TransferJob* Loader::jobForRequest(const String& URL) const
+ResourceLoader* 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 e63c318f4c3113f887a0d6b651111fa4daf01e21..5d29c21519474b7f5027fb4fd1747776c5e38dd7 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef loader_h
 #define loader_h
 
-#include "TransferJobClient.h"
+#include "ResourceLoaderClient.h"
 #include <wtf/HashMap.h>
 #include "DeprecatedPtrList.h"
 
@@ -46,7 +46,7 @@ namespace WebCore {
     class Request;
     class String;
 
-    class Loader : TransferJobClient
+    class Loader : ResourceLoaderClient
     {
     public:
         Loader();
@@ -60,17 +60,17 @@ namespace WebCore {
         void removeBackgroundDecodingRequest(Request*);
         
         // may return 0
-        TransferJob* jobForRequest(const String& URL) const;
+        ResourceLoader* jobForRequest(const String& URL) const;
 
     private:
-        virtual void receivedResponse(TransferJob*, PlatformResponse);
-        virtual void receivedData(TransferJob*, const char*, int);
-        virtual void receivedAllData(TransferJob*, PlatformData);
+        virtual void receivedResponse(ResourceLoader*, PlatformResponse);
+        virtual void receivedData(ResourceLoader*, const char*, int);
+        virtual void receivedAllData(ResourceLoader*, PlatformData);
 
         void servePendingRequests();
 
         DeprecatedPtrList<Request> m_requestsPending;
-        typedef HashMap<TransferJob*, Request*> RequestMap;
+        typedef HashMap<ResourceLoader*, Request*> RequestMap;
         RequestMap m_requestsLoading;
 
         DeprecatedPtrList<Request> m_requestsBackgroundDecoding;
index b02e3f0fc1cf965d73e9aaca42fc0be76a1e4358..3bdc7b7952c5eb001d2a44a5ebca5dc144f98f1f 100644 (file)
@@ -36,7 +36,7 @@
 #import "WebCoreResourceLoaderImp.h"
 #import "Logging.h"
 #import "Request.h"
-#import "TransferJob.h"
+#import "ResourceLoader.h"
 #import "WebCoreFrameBridge.h"
 #import "loader.h"
 #import <wtf/Vector.h>
@@ -121,7 +121,7 @@ NSString *HeaderStringFromDictionary(NSDictionary *headers, int statusCode)
     return headerString;
 }
 
-Vector<char> ServeSynchronousRequest(Loader *loader, DocLoader *docLoader, TransferJob *job, KURL &finalURL, DeprecatedString &responseHeaders)
+Vector<char> ServeSynchronousRequest(Loader *loader, DocLoader *docLoader, ResourceLoader *job, KURL &finalURL, DeprecatedString &responseHeaders)
 {
     FrameMac *frame = static_cast<FrameMac *>(docLoader->frame());
     
similarity index 70%
rename from WebCore/platform/TransferJob.cpp
rename to WebCore/platform/ResourceLoader.cpp
index 1d2ce6a1a3b34b5a6f8cdcb2cbbc1b62f8bf4fa4..c11ffa6cc6276c45f6f99bcf0dfeb515f1a69917 100644 (file)
  */
 
 #include "config.h"
-#include "TransferJob.h"
-#include "TransferJobInternal.h"
+#include "ResourceLoader.h"
+#include "ResourceLoaderInternal.h"
 
 #include "LoaderFunctions.h"
 #include "Logging.h"
 
 namespace WebCore {
 
-TransferJob::TransferJob(TransferJobClient* client, const String& method, const KURL& url)
-    : d(new TransferJobInternal(this, client, method, url))
+ResourceLoader::ResourceLoader(ResourceLoaderClient* client, const String& method, const KURL& url)
+    : d(new ResourceLoaderInternal(this, client, method, url))
 {
 }
 
-TransferJob::TransferJob(TransferJobClient* client, const String& method, const KURL& url, const FormData& postData)
-    : d(new TransferJobInternal(this, client, method, url, postData))
+ResourceLoader::ResourceLoader(ResourceLoaderClient* client, const String& method, const KURL& url, const FormData& postData)
+    : d(new ResourceLoaderInternal(this, client, method, url, postData))
 {
 }
 
-bool TransferJob::isErrorPage() const
+bool ResourceLoader::isErrorPage() const
 {
     return d->status != 0;
 }
 
-int TransferJob::error() const
+int ResourceLoader::error() const
 {
     return d->status;
 }
 
-void TransferJob::setError(int e)
+void ResourceLoader::setError(int e)
 {
     d->status = e;
 }
 
-String TransferJob::queryMetaData(const String& key) const
+String ResourceLoader::queryMetaData(const String& key) const
 {
     if (key == "HTTP-Headers") {
         assembleResponseHeaders();
@@ -71,39 +71,39 @@ String TransferJob::queryMetaData(const String& key) const
     return d->metaData.get(key); 
 }
 
-void TransferJob::addMetaData(const String& key, const String& value)
+void ResourceLoader::addMetaData(const String& key, const String& value)
 {
     d->metaData.set(key, value);
 }
 
-void TransferJob::addMetaData(const HashMap<String, String>& keysAndValues)
+void ResourceLoader::addMetaData(const HashMap<String, String>& keysAndValues)
 {
     HashMap<String, String>::const_iterator end = keysAndValues.end();
     for (HashMap<String, String>::const_iterator it = keysAndValues.begin(); it != end; ++it)
         d->metaData.set(it->first, it->second);
 }
 
-void TransferJob::kill()
+void ResourceLoader::kill()
 {
     delete this;
 }
 
-KURL TransferJob::url() const
+KURL ResourceLoader::url() const
 {
     return d->URL;
 }
 
-FormData TransferJob::postData() const
+FormData ResourceLoader::postData() const
 {
     return d->postData;
 }
 
-String TransferJob::method() const
+String ResourceLoader::method() const
 {
     return d->method;
 }
 
-TransferJobClient* TransferJob::client() const
+ResourceLoaderClient* ResourceLoader::client() const
 {
     return d->client;
 }
similarity index 79%
rename from WebCore/platform/TransferJob.h
rename to WebCore/platform/ResourceLoader.h
index 28e7bfb69b784ded3eef0d15fbb880e489e2bff4..faa84a589ddb34d4d4e753942df762a370c9ea92 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef TransferJob_H_
-#define TransferJob_H_
+#ifndef ResourceLoader_H_
+#define ResourceLoader_H_
 
 #include "StringHash.h"
 #include "Timer.h"
-#include "TransferJobClient.h" // for PlatformResponse
+#include "ResourceLoaderClient.h" // for PlatformResponse
 #include <wtf/HashMap.h>
 
 #ifdef WIN32
@@ -56,13 +56,13 @@ namespace WebCore {
 class DocLoader;
 class FormData;
 class KURL;
-class TransferJobInternal;
+class ResourceLoaderInternal;
 
-class TransferJob {
+class ResourceLoader {
 public:
-    TransferJob(TransferJobClient*, const String& method, const KURL&);
-    TransferJob(TransferJobClient*, const String& method, const KURL&, const FormData& postData);
-    ~TransferJob();
+    ResourceLoader(ResourceLoaderClient*, const String& method, const KURL&);
+    ResourceLoader(ResourceLoaderClient*, const String& method, const KURL&, const FormData& postData);
+    ~ResourceLoader();
 
     bool start(DocLoader*);
 
@@ -83,18 +83,18 @@ public:
     void setLoader(WebCoreResourceLoaderImp*);
 #endif
 #if WIN32
-    void fileLoadTimer(Timer<TransferJob>* timer);
+    void fileLoadTimer(Timer<ResourceLoader>* timer);
     friend void __stdcall transferJobStatusCallback(HINTERNET, DWORD_PTR, DWORD, LPVOID, DWORD);
-    friend LRESULT __stdcall TransferJobWndProc(HWND, unsigned message, WPARAM, LPARAM);
+    friend LRESULT __stdcall ResourceLoaderWndProc(HWND, unsigned message, WPARAM, LPARAM);
 #endif
 
 #if PLATFORM(GDK)
-    TransferJobInternal * getInternal() { return d;}
+    ResourceLoaderInternal * getInternal() { return d;}
 #endif
 
     void cancel();
     
-    TransferJobClient* client() const;
+    ResourceLoaderClient* client() const;
 
     void receivedResponse(PlatformResponse);
 
@@ -102,9 +102,9 @@ private:
     void assembleResponseHeaders() const;
     void retrieveCharset() const;
 
-    TransferJobInternal* d;
+    ResourceLoaderInternal* d;
 };
 
 }
 
-#endif // TransferJob_H_
+#endif // ResourceLoader_H_
similarity index 78%
rename from WebCore/platform/TransferJobClient.h
rename to WebCore/platform/ResourceLoaderClient.h
index 73020ee58c1821c22e1b5aa26b195dac8f45b1b2..b98b8e5359dc8253d7d3f167d6debe0b0e7f543f 100644 (file)
@@ -23,8 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef TransferJobClient_h
-#define TransferJobClient_h
+#ifndef ResourceLoaderClient_h
+#define ResourceLoaderClient_h
 
 #ifdef __APPLE__
 #ifdef __OBJC__
@@ -48,16 +48,16 @@ namespace WebCore {
 #endif
 
     class KURL;
-    class TransferJob;
+    class ResourceLoader;
 
-    class TransferJobClient {
+    class ResourceLoaderClient {
     public:
-        virtual ~TransferJobClient() { }
-        virtual void receivedRedirect(TransferJob*, const KURL&) { }
-        virtual void receivedResponse(TransferJob*, PlatformResponse) { }
-        virtual void receivedData(TransferJob*, const char*, int) { }
-        virtual void receivedAllData(TransferJob*) { }
-        virtual void receivedAllData(TransferJob*, PlatformData) { }
+        virtual ~ResourceLoaderClient() { }
+        virtual void receivedRedirect(ResourceLoader*, const KURL&) { }
+        virtual void receivedResponse(ResourceLoader*, PlatformResponse) { }
+        virtual void receivedData(ResourceLoader*, const char*, int) { }
+        virtual void receivedAllData(ResourceLoader*) { }
+        virtual void receivedAllData(ResourceLoader*, PlatformData) { }
     };
 
 }
similarity index 84%
rename from WebCore/platform/TransferJobInternal.h
rename to WebCore/platform/ResourceLoaderInternal.h
index 2bd1b2f59e7bf11cdf072a62a12ddaaa2b19d673..3e375083e0abd6f22530bf7776f040f31c521f8e 100644 (file)
@@ -24,8 +24,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef TransferJobInternal_H_
-#define TransferJobInternal_H_
+#ifndef ResourceLoaderInternal_H_
+#define ResourceLoaderInternal_H_
 
 #include "KURL.h"
 #include "FormData.h"
@@ -39,16 +39,16 @@ typedef void* HANDLE;
 typedef void CURL;
 #endif
 
-// The allocations and releases in TransferJobInternal are
+// The allocations and releases in ResourceLoaderInternal are
 // Cocoa-exception-free (either simple Foundation classes or
 // WebCoreResourceLoaderImp which avoids doing work in dealloc).
 
 namespace WebCore {
 
-    class TransferJobInternal
+    class ResourceLoaderInternal
     {
     public:
-        TransferJobInternal(TransferJob* job, TransferJobClient* c, const String& method, const KURL& u)
+        ResourceLoaderInternal(ResourceLoader* job, ResourceLoaderClient* c, const String& method, const KURL& u)
             : client(c)
             , status(0)
             , URL(u)
@@ -61,7 +61,7 @@ namespace WebCore {
 #endif
 #if WIN32
             , m_fileHandle(0)
-            , m_fileLoadTimer(job, &TransferJob::fileLoadTimer)
+            , m_fileLoadTimer(job, &ResourceLoader::fileLoadTimer)
             , m_resourceHandle(0)
             , m_secondaryHandle(0)
             , m_jobId(0)
@@ -77,7 +77,7 @@ namespace WebCore {
         {
         }
         
-        TransferJobInternal(TransferJob* job, TransferJobClient* c, const String& method, const KURL& u, const FormData& p)
+        ResourceLoaderInternal(ResourceLoader* job, ResourceLoaderClient* c, const String& method, const KURL& u, const FormData& p)
             : client(c)
             , status(0)
             , URL(u)
@@ -91,7 +91,7 @@ namespace WebCore {
 #endif
 #if WIN32
             , m_fileHandle(0)
-            , m_fileLoadTimer(job, &TransferJob::fileLoadTimer)
+            , m_fileLoadTimer(job, &ResourceLoader::fileLoadTimer)
             , m_resourceHandle(0)
             , m_secondaryHandle(0)
             , m_jobId(0)
@@ -107,9 +107,9 @@ namespace WebCore {
         {
         }
 
-        ~TransferJobInternal();
+        ~ResourceLoaderInternal();
         
-        TransferJobClient* client;
+        ResourceLoaderClient* client;
         
         int status;
         HashMap<String, String> metaData;
@@ -127,7 +127,7 @@ namespace WebCore {
 #endif
 #if WIN32
         HANDLE m_fileHandle;
-        Timer<TransferJob> m_fileLoadTimer;
+        Timer<ResourceLoader> m_fileLoadTimer;
         HINTERNET m_resourceHandle;
         HINTERNET m_secondaryHandle;
         unsigned m_jobId;
@@ -145,4 +145,4 @@ namespace WebCore {
 
 } // namespace WebCore
 
-#endif // TransferJobInternal_H_
+#endif // ResourceLoaderInternal_H_
index 5879cfdea95967e68fbc7821f824a23075f07585..7323a1b64734005dfea602aa27ce6c88d1677f83 100644 (file)
@@ -42,7 +42,7 @@
 #include "FramePrivate.h"
 #include "GraphicsContext.h"
 #include "HTMLDocument.h"
-#include "TransferJob.h"
+#include "ResourceLoader.h"
 #include "PlatformMouseEvent.h"
 #include "PlatformKeyboardEvent.h"
 #include "PlatformWheelEvent.h"
@@ -137,7 +137,7 @@ bool FrameGdk::openURL(const KURL& url)
 {
     didOpenURL(url);
     begin(url);
-    TransferJob* job = new TransferJob(this, "GET", url);
+    ResourceLoader* job = new ResourceLoader(this, "GET", url);
     job->start(document()->docLoader());
     return true;
 }
@@ -153,7 +153,7 @@ void FrameGdk::urlSelected(const ResourceRequest& request)
     printf("------------------> LOADING NEW URL %s \n", url.url().ascii());
     didOpenURL(url);
     begin(url);
-    TransferJob* job = new TransferJob(this, "GET", url);
+    ResourceLoader* job = new ResourceLoader(this, "GET", url);
     job->start(document()->docLoader());
 }
 
@@ -304,12 +304,12 @@ void FrameGdk::handleGdkEvent(GdkEvent* event)
     }
 }
 
-void FrameGdk::receivedData(TransferJob* job, const char* data, int length)
+void FrameGdk::receivedData(ResourceLoader* job, const char* data, int length)
 {
     write(data, length);
 }
 
-void FrameGdk::receivedAllData(TransferJob* job, PlatformData data)
+void FrameGdk::receivedAllData(ResourceLoader* job, PlatformData data)
 {
     end();
 }
index ef435a22aa869695b3b1cfc68afe49dc5beab149..7d2226fbdec0dfca60a5643e78b77ba6b3b9697a 100644 (file)
@@ -29,7 +29,7 @@
 #define FrameGdk_H_
 
 #include "Frame.h"
-#include "TransferJobClient.h"
+#include "ResourceLoaderClient.h"
 #include <gdk/gdk.h>
 
 namespace WebCore {
@@ -41,7 +41,7 @@ public:
     virtual void openURL(const DeprecatedString&) = 0;
 };
 
-class FrameGdk : public Frame, TransferJobClient {
+class FrameGdk : public Frame, ResourceLoaderClient {
 public:
     FrameGdk(Page*, Element*);
     FrameGdk(GdkDrawable*);
@@ -126,8 +126,8 @@ public:
 
     bool keyPress(const PlatformKeyboardEvent&);
 
-    virtual void receivedData(TransferJob*, const char*, int);
-    virtual void receivedAllData(TransferJob*,PlatformData);
+    virtual void receivedData(ResourceLoader*, const char*, int);
+    virtual void receivedAllData(ResourceLoader*,PlatformData);
 
     IntRect frameGeometry() const;
     void setFrameGeometry(const IntRect&);
similarity index 81%
rename from WebCore/platform/gdk/TransferJobCurl.cpp
rename to WebCore/platform/gdk/ResourceLoaderCurl.cpp
index c8271a9cb5912187645a7e67718fc6b8df4b9b41..bf8504925e622b19fee87f3de333360ecbd33ab9 100644 (file)
  */
 
 #include "config.h"
-#include "TransferJob.h"
+#include "ResourceLoader.h"
 
 #include "DocLoader.h"
-#include "TransferJobInternal.h"
-#include "TransferJobManager.h"
+#include "ResourceLoaderInternal.h"
+#include "ResourceLoaderManager.h"
 
 namespace WebCore {
 
-TransferJobInternal::~TransferJobInternal()
+ResourceLoaderInternal::~ResourceLoaderInternal()
 {
 }
 
-TransferJob::~TransferJob()
+ResourceLoader::~ResourceLoader()
 {
     cancel();
 }
 
-bool TransferJob::start(DocLoader* docLoader)
+bool ResourceLoader::start(DocLoader* docLoader)
 {
-    TransferJobManager::get()->add(this);
+    ResourceLoaderManager::get()->add(this);
     return true;
 }
 
-void TransferJob::cancel()
+void ResourceLoader::cancel()
 {
-    TransferJobManager::get()->cancel(this);
+    ResourceLoaderManager::get()->cancel(this);
 }
 
 } // namespace WebCore
similarity index 84%
rename from WebCore/platform/gdk/TransferJobManager.cpp
rename to WebCore/platform/gdk/ResourceLoaderManager.cpp
index bf6ee6c01212ff52917dc1f9b895b51e6e672c61..ec1aa6e8d62bf6bfe00e956d91449594f6b80df1 100644 (file)
  */
 
 #include "config.h"
-#include "TransferJobManager.h"
+#include "ResourceLoaderManager.h"
 
-#include "TransferJob.h"
-#include "TransferJobInternal.h"
+#include "ResourceLoader.h"
+#include "ResourceLoaderInternal.h"
 
 namespace WebCore {
 
 const int selectTimeoutMS = 5;
 const double pollTimeSeconds = 0.05;
 
-TransferJobManager::TransferJobManager()
+ResourceLoaderManager::ResourceLoaderManager()
     : m_useSimple(false)
-    , jobs(new HashSet<TransferJob*>)
-    , m_downloadTimer(this, &TransferJobManager::downloadTimerCallback)
+    , jobs(new HashSet<ResourceLoader*>)
+    , m_downloadTimer(this, &ResourceLoaderManager::downloadTimerCallback)
 {
     curl_global_init(CURL_GLOBAL_ALL);
     curlMultiHandle = curl_multi_init();
 }
 
-TransferJobManager* TransferJobManager::get()
+ResourceLoaderManager* ResourceLoaderManager::get()
 {
-    static TransferJobManager* singleton;
+    static ResourceLoaderManager* singleton;
     if (!singleton)
-        singleton = new TransferJobManager;
+        singleton = new ResourceLoaderManager;
     return singleton;
 }
 
-void TransferJobManager::useSimpleTransfer(bool useSimple)
+void ResourceLoaderManager::useSimpleTransfer(bool useSimple)
 {
     m_useSimple = useSimple;
 }
 
 static size_t writeCallback(void* ptr, size_t size, size_t nmemb, void* obj)
 {
-    TransferJob* job = static_cast<TransferJob*>(obj);
-    TransferJobInternal* d = job->getInternal();
+    ResourceLoader* job = static_cast<ResourceLoader*>(obj);
+    ResourceLoaderInternal* d = job->getInternal();
     int totalSize = size * nmemb;
     d->client->receivedData(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 TransferJobManager::downloadTimerCallback(Timer<TransferJobManager>* timer)
+void ResourceLoaderManager::downloadTimerCallback(Timer<ResourceLoaderManager>* timer)
 {
     if (jobs->isEmpty()) {
         m_downloadTimer.stop();
         return;
     }
     if (m_useSimple) {
-        for (HashSet<TransferJob*>::iterator it = jobs->begin(); it != jobs->end(); ++it) {
-            TransferJob* job = *it;
-            TransferJobInternal* d = job->getInternal();
+        for (HashSet<ResourceLoader*>::iterator it = jobs->begin(); it != jobs->end(); ++it) {
+            ResourceLoader* job = *it;
+            ResourceLoaderInternal* d = job->getInternal();
             CURLcode res = curl_easy_perform(d->m_handle);
             if (res != CURLE_OK)
                 printf("Error WITH JOB %d\n", res);
@@ -122,19 +122,19 @@ void TransferJobManager::downloadTimerCallback(Timer<TransferJobManager>* timer)
 
         // check the curl messages indicating completed transfers
         // and free their resources
-        TransferJob* job;
+        ResourceLoader* job;
         int nmsgs;
         while (CURLMsg* msg = curl_multi_info_read(curlMultiHandle, &nmsgs)) {
             if (msg->msg == CURLMSG_DONE) {
                 // find the node which has same d->m_handle as completed transfer
                 CURL* chandle = msg->easy_handle;
                 assert(chandle);
-                TransferJob *job;
+                ResourceLoader *job;
                 curl_easy_getinfo(chandle, CURLINFO_PRIVATE, &job);
                 assert(job); //fixme: assert->if ?
                 // if found, delete it
                 if (job) {
-                    TransferJobInternal *d = job->getInternal();
+                    ResourceLoaderInternal *d = job->getInternal();
                     switch (msg->data.result) {
                         case CURLE_OK: {
                             // use this to authenticate
@@ -161,9 +161,9 @@ void TransferJobManager::downloadTimerCallback(Timer<TransferJobManager>* timer)
         m_downloadTimer.startOneShot(pollTimeSeconds);
 }
 
-void TransferJobManager::remove(TransferJob* job)
+void ResourceLoaderManager::remove(ResourceLoader* job)
 {
-    TransferJobInternal* d = job->getInternal();
+    ResourceLoaderInternal* d = job->getInternal();
     if (!d->m_handle)
         return;
     if (jobs->contains(job))
@@ -179,10 +179,10 @@ void TransferJobManager::remove(TransferJob* job)
     }
 }
 
-void TransferJobManager::add(TransferJob* job)
+void ResourceLoaderManager::add(ResourceLoader* job)
 {
     bool startTimer = jobs->isEmpty();
-    TransferJobInternal* d = job->getInternal();
+    ResourceLoaderInternal* d = job->getInternal();
     DeprecatedString url = d->URL.url();
     d->m_handle = curl_easy_init();
     curl_easy_setopt(d->m_handle, CURLOPT_PRIVATE, job);
@@ -214,7 +214,7 @@ void TransferJobManager::add(TransferJob* job)
         m_downloadTimer.startOneShot(pollTimeSeconds);
 }
 
-void TransferJobManager::cancel(TransferJob* job)
+void ResourceLoaderManager::cancel(ResourceLoader* job)
 {
     remove(job);
     job->setError(1);
similarity index 81%
rename from WebCore/platform/gdk/TransferJobManager.h
rename to WebCore/platform/gdk/ResourceLoaderManager.h
index e607a2e09c056b9074f29f7e05c2a0b67e6c8f1e..de3d9bc616c0acf2f75c14696d03371a64c38fe5 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef TransferJobManager_H_
-#define TransferJobManager_H_
+#ifndef ResourceLoaderManager_H_
+#define ResourceLoaderManager_H_
 
 #include "Frame.h"
 #include "Timer.h"
-#include "TransferJobClient.h"
+#include "ResourceLoaderClient.h"
 #include <curl/curl.h>
 
 namespace WebCore {
 
-class TransferJobManager {
+class ResourceLoaderManager {
 public:
-    static TransferJobManager* get();
-    void add(TransferJob*);
-    void cancel(TransferJob*);
+    static ResourceLoaderManager* get();
+    void add(ResourceLoader*);
+    void cancel(ResourceLoader*);
 
     // If true, don't multiplex downloads: download completely one at a time.
     void useSimpleTransfer(bool useSimple);
 
 private:
-    TransferJobManager();
-    void downloadTimerCallback(Timer<TransferJobManager>*);
-    void remove(TransferJob*);
+    ResourceLoaderManager();
+    void downloadTimerCallback(Timer<ResourceLoaderManager>*);
+    void remove(ResourceLoader*);
 
     bool m_useSimple;
-    HashSet<TransferJob*>* jobs;
-    Timer<TransferJobManager> m_downloadTimer;
+    HashSet<ResourceLoader*>* jobs;
+    Timer<ResourceLoaderManager> m_downloadTimer;
     CURLM* curlMultiHandle; // not freed
 
     // curl filehandles to poll with select
index 697af45ed5e615dc39e10855a5f2e4cac4b9dc25..5da72f8b98c665b88926d90afc5ba007717f619c 100644 (file)
@@ -58,7 +58,7 @@
 #include "RenderTheme.h"
 #include "FrameGdk.h"
 #include "BrowserExtensionGdk.h"
-#include "TransferJob.h"
+#include "ResourceLoader.h"
 #include "RenderThemeGdk.h"
 #include "TextBoundaries.h"
 #include "AXObjectCache.h"
@@ -166,7 +166,7 @@ int WebCore::findNextWordFromIndex(UChar const*, int, int, bool) { notImplemente
 
 namespace WebCore {
 
-Vector<char> ServeSynchronousRequest(Loader*,DocLoader*,TransferJob*,KURL&,DeprecatedString&) { notImplemented(); return Vector<char>(); }
+Vector<char> ServeSynchronousRequest(Loader*,DocLoader*,ResourceLoader*,KURL&,DeprecatedString&) { notImplemented(); return Vector<char>(); }
 
 }
 
@@ -235,8 +235,8 @@ unsigned PlugInInfoStore::pluginCount() const { return 0; }
 bool WebCore::PlugInInfoStore::supportsMIMEType(const WebCore::String&) { return false; }
 void WebCore::refreshPlugins(bool) { }
 
-void WebCore::TransferJob::assembleResponseHeaders() const { }
-void WebCore::TransferJob::retrieveCharset() const { }
+void WebCore::ResourceLoader::assembleResponseHeaders() const { }
+void WebCore::ResourceLoader::retrieveCharset() const { }
 
 void FrameGdk::restoreDocumentState() { }
 void FrameGdk::partClearedInBegin() { }
similarity index 89%
rename from WebCore/platform/mac/TransferJobMac.mm
rename to WebCore/platform/mac/ResourceLoaderMac.mm
index ee314f0e95ea918bb73066ce14ac0032fdcace6c..d1bd3bfe52f9ac31c95b84602f2848dccb375d3d 100644 (file)
@@ -24,8 +24,8 @@
  */
 
 #import "config.h"
-#import "TransferJob.h"
-#import "TransferJobInternal.h"
+#import "ResourceLoader.h"
+#import "ResourceLoaderInternal.h"
 
 #import "BlockExceptions.h"
 #import "DocLoader.h"
 
 namespace WebCore {
     
-TransferJobInternal::~TransferJobInternal()
+ResourceLoaderInternal::~ResourceLoaderInternal()
 {
     HardRelease(response);
     HardRelease(loader);
 }
 
-TransferJob::~TransferJob()
+ResourceLoader::~ResourceLoader()
 {
     // This will cancel the handle, and who knows what that could do
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -56,7 +56,7 @@ TransferJob::~TransferJob()
     delete d;
 }
 
-bool TransferJob::start(DocLoader* docLoader)
+bool ResourceLoader::start(DocLoader* docLoader)
 {
     FrameMac *frame = Mac(docLoader->frame());
     
@@ -92,7 +92,7 @@ bool TransferJob::start(DocLoader* docLoader)
     return true;
 }
 
-void TransferJob::assembleResponseHeaders() const
+void ResourceLoader::assembleResponseHeaders() const
 {
     if (!d->assembledResponseHeaders) {
         if ([d->response isKindOfClass:[NSHTTPURLResponse class]]) {
@@ -104,7 +104,7 @@ void TransferJob::assembleResponseHeaders() const
     }
 }
 
-void TransferJob::retrieveCharset() const
+void ResourceLoader::retrieveCharset() const
 {
     if (!d->retrievedCharset) {
         NSString *charset = [d->response textEncodingName];
@@ -114,14 +114,14 @@ void TransferJob::retrieveCharset() const
     }
 }
 
-void TransferJob::setLoader(WebCoreResourceLoaderImp *loader)
+void ResourceLoader::setLoader(WebCoreResourceLoaderImp *loader)
 {
     HardRetain(loader);
     HardRelease(d->loader);
     d->loader = loader;
 }
 
-void TransferJob::receivedResponse(NSURLResponse* response)
+void ResourceLoader::receivedResponse(NSURLResponse* response)
 {
     d->assembledResponseHeaders = false;
     d->retrievedCharset = false;
@@ -131,7 +131,7 @@ void TransferJob::receivedResponse(NSURLResponse* response)
         d->client->receivedResponse(this, response);
 }
 
-void TransferJob::cancel()
+void ResourceLoader::cancel()
 {
     [d->loader jobCanceledLoad];
 }
similarity index 92%
rename from WebCore/platform/win/TransferJobWin.cpp
rename to WebCore/platform/win/ResourceLoaderWin.cpp
index 45155b92ac61bb0a81d1d8fb88cf71d83d87603a..6771f7ce26c82d37be25ff9f89123e334b48ee5b 100644 (file)
@@ -24,9 +24,9 @@
  */
 
 #include "config.h"
-#include "TransferJob.h"
-#include "TransferJobInternal.h"
-#include "TransferJobWin.h"
+#include "ResourceLoader.h"
+#include "ResourceLoaderInternal.h"
+#include "ResourceLoaderWin.h"
 
 #include "DocLoader.h"
 #include "Frame.h"
 namespace WebCore {
 
 static unsigned transferJobId = 0;
-static HashMap<int, TransferJob*>* jobIdMap = 0;
+static HashMap<int, ResourceLoader*>* jobIdMap = 0;
 
 static HWND transferJobWindowHandle = 0;
 static UINT loadStatusMessage = 0;
-const LPCWSTR kTransferJobWindowClassName = L"TransferJobWindowClass";
+const LPCWSTR kResourceLoaderWindowClassName = L"ResourceLoaderWindowClass";
 
-static int addToOutstandingJobs(TransferJob* job)
+static int addToOutstandingJobs(ResourceLoader* job)
 {
     if (!jobIdMap)
-        jobIdMap = new HashMap<int, TransferJob*>;
+        jobIdMap = new HashMap<int, ResourceLoader*>;
     transferJobId++;
     jobIdMap->set(transferJobId, job);
     return transferJobId;
@@ -59,7 +59,7 @@ static void removeFromOutstandingJobs(int jobId)
     jobIdMap->remove(jobId);
 }
 
-static TransferJob* lookupTransferJob(int jobId)
+static ResourceLoader* lookupResourceLoader(int jobId)
 {
     if (!jobIdMap)
         return 0;
@@ -71,7 +71,7 @@ struct JobLoadStatus {
     DWORD_PTR dwResult;
 };
 
-LRESULT CALLBACK TransferJobWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+LRESULT CALLBACK ResourceLoaderWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 {
     if (message == loadStatusMessage) {
         JobLoadStatus* jobLoadStatus = (JobLoadStatus*)lParam;
@@ -82,7 +82,7 @@ LRESULT CALLBACK TransferJobWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR
 
         // If we get a message about a job we no longer know about (already deleted), ignore it.
         unsigned jobId = (unsigned)wParam;
-        TransferJob* job = lookupTransferJob(jobId);
+        ResourceLoader* job = lookupResourceLoader(jobId);
         if (!job)
             return 0;
 
@@ -212,7 +212,7 @@ LRESULT CALLBACK TransferJobWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR
     return 0;
 }
 
-static void initializeOffScreenTransferJobWindow()
+static void initializeOffScreenResourceLoaderWindow()
 {
     if (transferJobWindowHandle)
         return;
@@ -220,23 +220,23 @@ static void initializeOffScreenTransferJobWindow()
     WNDCLASSEX wcex;
     memset(&wcex, 0, sizeof(WNDCLASSEX));
     wcex.cbSize = sizeof(WNDCLASSEX);
-    wcex.lpfnWndProc    = TransferJobWndProc;
+    wcex.lpfnWndProc    = ResourceLoaderWndProc;
     wcex.hInstance      = Widget::instanceHandle;
-    wcex.lpszClassName  = kTransferJobWindowClassName;
+    wcex.lpszClassName  = kResourceLoaderWindowClassName;
     RegisterClassEx(&wcex);
 
-    transferJobWindowHandle = CreateWindow(kTransferJobWindowClassName, 0, 0, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
+    transferJobWindowHandle = CreateWindow(kResourceLoaderWindowClassName, 0, 0, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
         HWND_MESSAGE, 0, Widget::instanceHandle, 0);
-    loadStatusMessage = RegisterWindowMessage(L"com.apple.WebKit.TransferJobLoadStatus");
+    loadStatusMessage = RegisterWindowMessage(L"com.apple.WebKit.ResourceLoaderLoadStatus");
 }
 
-TransferJobInternal::~TransferJobInternal()
+ResourceLoaderInternal::~ResourceLoaderInternal()
 {
     if (m_fileHandle)
         CloseHandle(m_fileHandle);
 }
 
-TransferJob::~TransferJob()
+ResourceLoader::~ResourceLoader()
 {
     if (d->m_jobId)
         removeFromOutstandingJobs(d->m_jobId);
@@ -254,7 +254,7 @@ static void __stdcall transferJobStatusCallback(HINTERNET internetHandle, DWORD_
     }
 }
 
-bool TransferJob::start(DocLoader* docLoader)
+bool ResourceLoader::start(DocLoader* docLoader)
 {
     if (d->URL.isLocalFile()) {
         DeprecatedString path = d->URL.path();
@@ -284,7 +284,7 @@ bool TransferJob::start(DocLoader* docLoader)
         }
         static INTERNET_STATUS_CALLBACK callbackHandle = InternetSetStatusCallback(internetHandle, transferJobStatusCallback);
 
-        initializeOffScreenTransferJobWindow();
+        initializeOffScreenResourceLoaderWindow();
         d->m_jobId = addToOutstandingJobs(this);
 
         // For form posting, we can't use InternetOpenURL.  We have to use InternetConnect followed by
@@ -320,7 +320,7 @@ bool TransferJob::start(DocLoader* docLoader)
     }
 }
 
-void TransferJob::fileLoadTimer(Timer<TransferJob>* timer)
+void ResourceLoader::fileLoadTimer(Timer<ResourceLoader>* timer)
 {
     bool result = false;
     DWORD bytesRead = 0;
@@ -345,7 +345,7 @@ void TransferJob::fileLoadTimer(Timer<TransferJob>* timer)
     d->client->receivedAllData(this);
 }
 
-void TransferJob::cancel()
+void ResourceLoader::cancel()
 {
     if (d->m_resourceHandle)
         InternetCloseHandle(d->m_resourceHandle);
similarity index 96%
rename from WebCore/platform/win/TransferJobWin.h
rename to WebCore/platform/win/ResourceLoaderWin.h
index 62a87701c8c029d4b553fd2f3fb71667d511ab86..42a72952c748191dddde595e3da43da6c86e77ec 100644 (file)
@@ -23,8 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef TransferJobWin_H
-#define TransferJobWin_H
+#ifndef ResourceLoaderWin_H
+#define ResourceLoaderWin_H
 
 #include <windows.h>
 
index 8f2910147cfb41ebe6e1097173df946c852f04eb..878710a16781060f74ac2e112ec2cb9a087ab2c0 100644 (file)
@@ -57,7 +57,7 @@
 #include "RenderTheme.h"
 #include "FrameWin.h"
 #include "BrowserExtensionWin.h"
-#include "TransferJob.h"
+#include "ResourceLoader.h"
 #include "RenderThemeWin.h"
 #include "TextBoundaries.h"
 #include "AXObjectCache.h"
@@ -164,7 +164,7 @@ int WebCore::findNextWordFromIndex(UChar const*,int,int,bool) { notImplemented()
 
 namespace WebCore {
 
-Vector<char> ServeSynchronousRequest(Loader*,DocLoader*,TransferJob*,KURL&,DeprecatedString&) { notImplemented(); return Vector<char>(); }
+Vector<char> ServeSynchronousRequest(Loader*,DocLoader*,ResourceLoader*,KURL&,DeprecatedString&) { notImplemented(); return Vector<char>(); }
 
 }
 
@@ -239,8 +239,8 @@ unsigned PlugInInfoStore::pluginCount() const { return 0; }
 bool WebCore::PlugInInfoStore::supportsMIMEType(const WebCore::String&) { return false; }
 void WebCore::refreshPlugins(bool) { }
 
-void WebCore::TransferJob::assembleResponseHeaders() const { }
-void WebCore::TransferJob::retrieveCharset() const { }
+void WebCore::ResourceLoader::assembleResponseHeaders() const { }
+void WebCore::ResourceLoader::retrieveCharset() const { }
 
 void FrameWin::restoreDocumentState() { }
 void FrameWin::partClearedInBegin() { }
index b00f7e5eecdd543c14bd647106f5b76369dce148..236b0551e386722dd1b90fe7ecac5dc7d4d5e8ca 100644 (file)
@@ -35,7 +35,7 @@
 #include "HTMLTokenizer.h"
 #include "LoaderFunctions.h"
 #include "Text.h"
-#include "TransferJob.h"
+#include "ResourceLoader.h"
 #include "loader.h"
 #include "markup.h"
 #include <wtf/Vector.h>
@@ -82,7 +82,7 @@ static xmlDocPtr docLoaderFunc(const xmlChar *uri,
             KURL url((const char*)base, (const char*)uri);
             xmlFree(base);
             KURL finalURL;
-            TransferJob* job = new TransferJob(0, "GET", url);
+            ResourceLoader* job = new ResourceLoader(0, "GET", url);
             DeprecatedString headers;
             xmlGenericErrorFunc oldErrorFunc = xmlGenericError;
             void *oldErrorContext = xmlGenericErrorContext;
index b848bfaee25a79101c1a544be12219ba459d06f2..a061d99b89458fad682d4cd8a384b4b8b94e6273 100644 (file)
@@ -33,7 +33,7 @@
 #include "PlatformString.h"
 #include "RegularExpression.h"
 #include "TextEncoding.h"
-#include "TransferJob.h"
+#include "ResourceLoader.h"
 #include "kjs_binding.h"
 #include <kjs/protect.h>
 #include <wtf/Vector.h>
@@ -316,12 +316,12 @@ void XMLHttpRequest::send(const String& body)
         if (!m_encoding.isValid())   // FIXME: report an error?
             m_encoding = TextEncoding(UTF8Encoding);
 
-        m_job = new TransferJob(m_async ? this : 0, m_method, m_url, m_encoding.fromUnicode(body.deprecatedString()));
+        m_job = new ResourceLoader(m_async ? this : 0, m_method, m_url, m_encoding.fromUnicode(body.deprecatedString()));
     } else {
         // FIXME: HEAD requests just crash; see <rdar://4460899> and the commented out tests in http/tests/xmlhttprequest/methods.html.
         if (m_method == "HEAD")
             m_method = "GET";
-        m_job = new TransferJob(m_async ? this : 0, m_method, m_url);
+        m_job = new ResourceLoader(m_async ? this : 0, m_method, m_url);
     }
 
     if (m_requestHeaders.length())
@@ -500,7 +500,7 @@ void XMLHttpRequest::processSyncLoadResults(const Vector<char>& data, const KURL
     receivedAllData(0);
 }
 
-void XMLHttpRequest::receivedAllData(TransferJob*)
+void XMLHttpRequest::receivedAllData(ResourceLoader*)
 {
     if (m_responseHeaders.isEmpty() && m_job)
         m_responseHeaders = m_job->queryMetaData("HTTP-Headers");
@@ -526,13 +526,13 @@ void XMLHttpRequest::receivedAllData(TransferJob*)
     }
 }
 
-void XMLHttpRequest::receivedRedirect(TransferJob*, const KURL& m_url)
+void XMLHttpRequest::receivedRedirect(ResourceLoader*, const KURL& m_url)
 {
     if (!urlMatchesDocumentDomain(m_url))
         abort();
 }
 
-void XMLHttpRequest::receivedData(TransferJob*, const char *data, int len)
+void XMLHttpRequest::receivedData(ResourceLoader*, const char *data, int len)
 {
     if (m_responseHeaders.isEmpty() && m_job)
         m_responseHeaders = m_job->queryMetaData("HTTP-Headers");
index cbadb0a61b93e75d31fd67e0d5f29e1632d147d5..d631585917307179a3de302d0b0e9f6d105ebf16 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "KURL.h"
 #include "PlatformString.h"
-#include "TransferJobClient.h"
+#include "ResourceLoaderClient.h"
 #include <wtf/Vector.h>
 
 namespace WebCore {
@@ -43,7 +43,7 @@ namespace WebCore {
     Completed = 4       // Finished with all operations
   };
 
-  class XMLHttpRequest : public Shared<XMLHttpRequest>, TransferJobClient {
+  class XMLHttpRequest : public Shared<XMLHttpRequest>, ResourceLoaderClient {
   public:
     XMLHttpRequest(Document*);
     ~XMLHttpRequest();
@@ -72,9 +72,9 @@ namespace WebCore {
   private:
     bool urlMatchesDocumentDomain(const KURL&) const;
 
-    virtual void receivedRedirect(TransferJob*, const KURL&);
-    virtual void receivedData(TransferJob*, const char *data, int size);
-    virtual void receivedAllData(TransferJob*);
+    virtual void receivedRedirect(ResourceLoader*, const KURL&);
+    virtual void receivedData(ResourceLoader*, const char *data, int size);
+    virtual void receivedAllData(ResourceLoader*);
 
     void processSyncLoadResults(const Vector<char>& data, const KURL& finalURL, const DeprecatedString& headers);
 
@@ -95,7 +95,7 @@ namespace WebCore {
     bool m_async;
     DeprecatedString m_requestHeaders;
 
-    TransferJob* m_job;
+    ResourceLoader* m_job;
 
     XMLHttpRequestState m_state;
 
index 7957e44acfe056a8febabd00039bd9f1885d8d11..583292ec1a08d13f452880900fe343e1ad3128a0 100644 (file)
@@ -43,8 +43,8 @@
 #include "RenderFrame.h"
 #include "cairo.h"
 #include "cairo-win32.h"
-#include "TransferJob.h"
-#include "TransferJobWin.h"
+#include "ResourceLoader.h"
+#include "ResourceLoaderWin.h"
 #pragma warning(pop)
 
 using namespace WebCore;
@@ -374,16 +374,16 @@ HRESULT WebFrame::loadDataSource(WebDataSource* dataSource)
                 d->frame->didOpenURL(kurl);
                 d->frame->begin(kurl);
                 String methodString(method, SysStringLen(method));
-                TransferJob* job;
+                ResourceLoader* job;
                 const FormData* formData = 0;
                 if (wcscmp(method, TEXT("GET"))) {
                     WebMutableURLRequest* requestImpl = static_cast<WebMutableURLRequest*>(request);
                     formData = requestImpl->formData();
                 }
                 if (formData)
-                    job = new TransferJob(this, methodString, kurl, *formData);
+                    job = new ResourceLoader(this, methodString, kurl, *formData);
                 else
-                    job = new TransferJob(this, methodString, kurl);
+                    job = new ResourceLoader(this, methodString, kurl);
                 job->start(d->frame->document()->docLoader());
                 IWebFrameLoadDelegate* frameLoadDelegate;
                 if (SUCCEEDED(d->webView->frameLoadDelegate(&frameLoadDelegate))) {
@@ -462,14 +462,14 @@ int WebFrame::getObjectCacheSize()
     return cacheSize * multiplier;
 }
 
-// TransferJobClient
+// ResourceLoaderClient
 
-void WebFrame::receivedRedirect(TransferJob*, const KURL&)
+void WebFrame::receivedRedirect(ResourceLoader*, const KURL&)
 {
     //FIXME
 }
 
-void WebFrame::receivedResponse(TransferJob*, PlatformResponse)
+void WebFrame::receivedResponse(ResourceLoader*, PlatformResponse)
 {
     if (m_provisionalDataSource) {
         m_dataSource = m_provisionalDataSource;
@@ -477,18 +477,18 @@ void WebFrame::receivedResponse(TransferJob*, PlatformResponse)
     }
 }
 
-void WebFrame::receivedData(TransferJob*, const char* data, int length)
+void WebFrame::receivedData(ResourceLoader*, const char* data, int length)
 {
     d->frame->write(data, length);
 }
 
-void WebFrame::receivedAllData(TransferJob* /*job*/)
+void WebFrame::receivedAllData(ResourceLoader* /*job*/)
 {
     m_quickRedirectComing = false;
     m_loadType = WebFrameLoadTypeStandard;
 }
 
-void WebFrame::receivedAllData(TransferJob* job, PlatformData data)
+void WebFrame::receivedAllData(ResourceLoader* job, PlatformData data)
 {
     IWebFrameLoadDelegate* frameLoadDelegate;
     if (SUCCEEDED(d->webView->frameLoadDelegate(&frameLoadDelegate))) {
@@ -582,4 +582,4 @@ void WebFrame::setStatusText(const String& statusText)
         SysFreeString(statusBStr);
         uiDelegate->Release();
     }
-}
\ No newline at end of file
+}
index 98a991cfc138749fa2651ead5fc54f8997e7d1c2..c9acb34047ea746e68af42c11de1a4b62bef9f1b 100644 (file)
@@ -31,7 +31,7 @@
 #include "WebDataSource.h"
 
 #pragma warning(push, 0)
-#include "TransferJobClient.h"
+#include "ResourceLoaderClient.h"
 #include "FrameWin.h"
 #include "PlatformString.h"
 #pragma warning(pop)
@@ -52,7 +52,7 @@ typedef enum {
     WebFrameLoadTypeReplace
 } WebFrameLoadType;
 
-class WebFrame : public IWebFrame, public WebCore::TransferJobClient, public WebCore::FrameWinClient
+class WebFrame : public IWebFrame, public WebCore::ResourceLoaderClient, public WebCore::FrameWinClient
 {
 public:
     static WebFrame* createInstance();
@@ -129,12 +129,12 @@ public:
         /* [out] */ int *frameCount,
         /* [retval][out] */ IWebFrame ***frames);
 
-    // TransferJobClient
-    virtual void receivedRedirect(WebCore::TransferJob*, const WebCore::KURL&);
-    virtual void receivedResponse(WebCore::TransferJob*, WebCore::PlatformResponse);
-    virtual void receivedData(WebCore::TransferJob*, const char*, int);
-    virtual void receivedAllData(WebCore::TransferJob*);
-    virtual void receivedAllData(WebCore::TransferJob*, WebCore::PlatformData);
+    // ResourceLoaderClient
+    virtual void receivedRedirect(WebCore::ResourceLoader*, const WebCore::KURL&);
+    virtual void receivedResponse(WebCore::ResourceLoader*, WebCore::PlatformResponse);
+    virtual void receivedData(WebCore::ResourceLoader*, const char*, int);
+    virtual void receivedAllData(WebCore::ResourceLoader*);
+    virtual void receivedAllData(WebCore::ResourceLoader*, WebCore::PlatformData);
 
     // FrameWinClient
     virtual void openURL(const WebCore::DeprecatedString&, bool lockHistory);
index 844ac0a982360375992a299c59158f04f380801a..48b2d1c229409c1b3194d8a0312cd13d77de26d7 100644 (file)
@@ -1,3 +1,18 @@
+2006-07-31  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Tim Hatcher.
+        
+        - renamed TransferJob to ResourceLoader in WebCore
+
+        * COM/WebFrame.cpp:
+        (WebFrame::loadDataSource):
+        (WebFrame::receivedRedirect):
+        (WebFrame::receivedResponse):
+        (WebFrame::receivedData):
+        (WebFrame::receivedAllData):
+        (WebFrame::setStatusText):
+        * COM/WebFrame.h:
+
 2006-07-31  Darin Adler  <darin@apple.com>
 
         Reviewed by Maciej.