[WK2] Rename WebURLResponse to API::URLResponse
https://bugs.webkit.org/show_bug.cgi?id=125910

Reviewed by Andreas Kling.

* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
* Shared/API/c/WKURLResponse.cpp:
(WKURLResponseGetTypeID):
* Shared/API/c/mac/WKURLResponseNS.mm:
(WKURLResponseCreateWithNSURLResponse):
* Shared/APIURLRequest.cpp:
* Shared/APIURLResponse.cpp: Copied from Source/WebKit2/Shared/WebURLResponse.cpp.
(API::URLResponse::URLResponse):
(API::URLResponse::encode):
(API::URLResponse::decode):
* Shared/APIURLResponse.h: Copied from Source/WebKit2/Shared/WebURLResponse.h.
(API::URLResponse::create):
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode):
(WebKit::UserMessageDecoder::baseDecode):
* Shared/WebURLResponse.cpp: Removed.
* Shared/WebURLResponse.h: Removed.
* UIProcess/WebDownloadClient.cpp:
(WebKit::WebDownloadClient::didReceiveResponse):
* UIProcess/WebPolicyClient.cpp:
(WebKit::WebPolicyClient::decidePolicyForResponse):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
(WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKit2/Shared/API/c/WKSharedAPICast.h b/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
index 13b459a..e0d202e 100644
--- a/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
+++ b/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
@@ -29,6 +29,7 @@
 #include "APINumber.h"
 #include "APIString.h"
 #include "APIURLRequest.h"
+#include "APIURLResponse.h"
 #include "ImageOptions.h"
 #include "SameDocumentNavigationType.h"
 #include "WKBase.h"
@@ -47,7 +48,6 @@
 #include "WebFindOptions.h"
 #include "WebSecurityOrigin.h"
 #include "WebURL.h"
-#include "WebURLResponse.h"
 #include <WebCore/ContextMenuItem.h>
 #include <WebCore/FloatRect.h>
 #include <WebCore/FrameLoaderTypes.h>
@@ -80,7 +80,6 @@
 class WebImage;
 class WebSecurityOrigin;
 class WebSerializedScriptValue;
-class WebURLResponse;
 class WebUserContentURLPattern;
 
 template<typename APIType> struct APITypeInfo { };
@@ -112,7 +111,7 @@
 WK_ADD_API_MAPPING(WKUInt64Ref, API::UInt64)
 WK_ADD_API_MAPPING(WKURLRef, WebURL)
 WK_ADD_API_MAPPING(WKURLRequestRef, API::URLRequest)
-WK_ADD_API_MAPPING(WKURLResponseRef, WebURLResponse)
+WK_ADD_API_MAPPING(WKURLResponseRef, API::URLResponse)
 WK_ADD_API_MAPPING(WKUserContentURLPatternRef, WebUserContentURLPattern)
 
 template<> struct APITypeInfo<WKMutableArrayRef> { typedef API::Array* ImplType; };
@@ -209,9 +208,9 @@
     return ProxyingRefPtr<API::URLRequest>(API::URLRequest::create(request));
 }
 
-inline ProxyingRefPtr<WebURLResponse> toAPI(const WebCore::ResourceResponse& response)
+inline ProxyingRefPtr<API::URLResponse> toAPI(const WebCore::ResourceResponse& response)
 {
-    return ProxyingRefPtr<WebURLResponse>(WebURLResponse::create(response));
+    return ProxyingRefPtr<API::URLResponse>(API::URLResponse::create(response));
 }
 
 inline WKSecurityOriginRef toCopiedAPI(WebCore::SecurityOrigin* origin)
diff --git a/Source/WebKit2/Shared/API/c/WKURLResponse.cpp b/Source/WebKit2/Shared/API/c/WKURLResponse.cpp
index 47afca4..b8a8a90 100644
--- a/Source/WebKit2/Shared/API/c/WKURLResponse.cpp
+++ b/Source/WebKit2/Shared/API/c/WKURLResponse.cpp
@@ -26,15 +26,15 @@
 #include "config.h"
 #include "WKURLResponse.h"
 
+#include "APIURLResponse.h"
 #include "WKAPICast.h"
-#include "WebURLResponse.h"
 #include <WebCore/URL.h>
 
 using namespace WebKit;
 
 WKTypeID WKURLResponseGetTypeID()
 {
-    return toAPI(WebURLResponse::APIType);
+    return toAPI(API::URLResponse::APIType);
 }
 
 WKURLRef WKURLResponseCopyURL(WKURLResponseRef responseRef)
diff --git a/Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.mm b/Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.mm
index eb72c88..87211e6 100644
--- a/Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.mm
+++ b/Source/WebKit2/Shared/API/c/mac/WKURLResponseNS.mm
@@ -26,15 +26,15 @@
 #import "config.h"
 #import "WKURLResponseNS.h"
 
+#import "APIURLResponse.h"
 #import "WKAPICast.h"
-#import "WebURLResponse.h"
 
 using namespace WebKit;
 
 WKURLResponseRef WKURLResponseCreateWithNSURLResponse(NSURLResponse* urlResponse)
 {
     RetainPtr<NSURLResponse> copiedURLResponse = adoptNS([urlResponse copy]);
-    RefPtr<WebURLResponse> response = WebURLResponse::create(copiedURLResponse.get());
+    RefPtr<API::URLResponse> response = API::URLResponse::create(copiedURLResponse.get());
     return toAPI(response.release().leakRef());
 }