[WK2] Rename WebURL to API::URL
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 22 Dec 2013 00:57:06 +0000 (00:57 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 22 Dec 2013 00:57:06 +0000 (00:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=126100

Reviewed by Anders Carlsson.

* Shared/API/c/WKSharedAPICast.h:
(WebKit::toURLRef):
(WebKit::toCopiedURLAPI):
* Shared/API/c/WKURL.cpp:
(WKURLGetTypeID):
(WKURLCreateWithUTF8CString):
(WKURLCreateWithBaseURL):
* Shared/API/c/cf/WKURLCF.mm:
(WKURLCreateWithCFURL):
* Shared/APIURL.h: Copied from Source/WebKit2/Shared/WebURL.h.
(API::URL::create):
(API::URL::string):
(API::URL::host):
(API::URL::protocol):
(API::URL::path):
(API::URL::lastPathComponent):
(API::URL::encode):
(API::URL::decode):
(API::URL::URL):
* Shared/Cocoa/WKNSURL.h:
(WebKit::wrapper):
* Shared/Cocoa/WKNSURL.mm:
(-[WKNSURL _web_createTarget]):
* Shared/Plugins/Netscape/PluginInformation.cpp:
(WebKit::createPluginInformationDictionary):
* Shared/UserData.cpp:
(WebKit::UserData::encode):
(WebKit::UserData::decode):
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode):
(WebKit::UserMessageDecoder::baseDecode):
* Shared/WebArchiveResource.h:
* Shared/WebURL.h: Removed.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::getResourceData):
* UIProcess/WebFrameProxy.h:
* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::didChangeIconForPageURL):
(WebKit::WebIconDatabase::notifyIconDataReadyForPageURL):
* UIProcess/WebIconDatabaseClient.cpp:
(WebKit::WebIconDatabaseClient::didChangeIconForPageURL):
(WebKit::WebIconDatabaseClient::iconDataReadyForPageURL):
* UIProcess/WebIconDatabaseClient.h:
* UIProcess/WebOpenPanelResultListenerProxy.cpp:
(WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getResourceDataFromFrame):
* UIProcess/WebPageProxy.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

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

21 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/c/WKSharedAPICast.h
Source/WebKit2/Shared/API/c/WKURL.cpp
Source/WebKit2/Shared/API/c/cf/WKURLCF.mm
Source/WebKit2/Shared/APIURL.h [moved from Source/WebKit2/Shared/WebURL.h with 63% similarity]
Source/WebKit2/Shared/Cocoa/WKNSURL.h
Source/WebKit2/Shared/Cocoa/WKNSURL.mm
Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp
Source/WebKit2/Shared/UserData.cpp
Source/WebKit2/Shared/UserMessageCoders.h
Source/WebKit2/Shared/WebArchiveResource.h
Source/WebKit2/UIProcess/WebFrameProxy.cpp
Source/WebKit2/UIProcess/WebFrameProxy.h
Source/WebKit2/UIProcess/WebIconDatabase.cpp
Source/WebKit2/UIProcess/WebIconDatabaseClient.cpp
Source/WebKit2/UIProcess/WebIconDatabaseClient.h
Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp

index c30b04d..7137052 100644 (file)
@@ -1,3 +1,61 @@
+2013-12-20  Sam Weinig  <sam@webkit.org>
+
+        [WK2] Rename WebURL to API::URL
+        https://bugs.webkit.org/show_bug.cgi?id=126100
+
+        Reviewed by Anders Carlsson.
+
+        * Shared/API/c/WKSharedAPICast.h:
+        (WebKit::toURLRef):
+        (WebKit::toCopiedURLAPI):
+        * Shared/API/c/WKURL.cpp:
+        (WKURLGetTypeID):
+        (WKURLCreateWithUTF8CString):
+        (WKURLCreateWithBaseURL):
+        * Shared/API/c/cf/WKURLCF.mm:
+        (WKURLCreateWithCFURL):
+        * Shared/APIURL.h: Copied from Source/WebKit2/Shared/WebURL.h.
+        (API::URL::create):
+        (API::URL::string):
+        (API::URL::host):
+        (API::URL::protocol):
+        (API::URL::path):
+        (API::URL::lastPathComponent):
+        (API::URL::encode):
+        (API::URL::decode):
+        (API::URL::URL):
+        * Shared/Cocoa/WKNSURL.h:
+        (WebKit::wrapper):
+        * Shared/Cocoa/WKNSURL.mm:
+        (-[WKNSURL _web_createTarget]):
+        * Shared/Plugins/Netscape/PluginInformation.cpp:
+        (WebKit::createPluginInformationDictionary):
+        * Shared/UserData.cpp:
+        (WebKit::UserData::encode):
+        (WebKit::UserData::decode):
+        * Shared/UserMessageCoders.h:
+        (WebKit::UserMessageEncoder::baseEncode):
+        (WebKit::UserMessageDecoder::baseDecode):
+        * Shared/WebArchiveResource.h:
+        * Shared/WebURL.h: Removed.
+        * UIProcess/WebFrameProxy.cpp:
+        (WebKit::WebFrameProxy::getResourceData):
+        * UIProcess/WebFrameProxy.h:
+        * UIProcess/WebIconDatabase.cpp:
+        (WebKit::WebIconDatabase::didChangeIconForPageURL):
+        (WebKit::WebIconDatabase::notifyIconDataReadyForPageURL):
+        * UIProcess/WebIconDatabaseClient.cpp:
+        (WebKit::WebIconDatabaseClient::didChangeIconForPageURL):
+        (WebKit::WebIconDatabaseClient::iconDataReadyForPageURL):
+        * UIProcess/WebIconDatabaseClient.h:
+        * UIProcess/WebOpenPanelResultListenerProxy.cpp:
+        (WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::getResourceDataFromFrame):
+        * UIProcess/WebPageProxy.h:
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
+
 2013-12-21  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Test /webkit2/WebKitWebResource/mime-type fails when run after /webkit2/WebKitWebView/resources
index e0d202e..2923e64 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "APINumber.h"
 #include "APIString.h"
+#include "APIURL.h"
 #include "APIURLRequest.h"
 #include "APIURLResponse.h"
 #include "ImageOptions.h"
@@ -47,7 +48,6 @@
 #include "WebEvent.h"
 #include "WebFindOptions.h"
 #include "WebSecurityOrigin.h"
-#include "WebURL.h"
 #include <WebCore/ContextMenuItem.h>
 #include <WebCore/FloatRect.h>
 #include <WebCore/FrameLoaderTypes.h>
@@ -109,7 +109,7 @@ WK_ADD_API_MAPPING(WKSizeRef, API::Size)
 WK_ADD_API_MAPPING(WKStringRef, API::String)
 WK_ADD_API_MAPPING(WKTypeRef, API::Object)
 WK_ADD_API_MAPPING(WKUInt64Ref, API::UInt64)
-WK_ADD_API_MAPPING(WKURLRef, WebURL)
+WK_ADD_API_MAPPING(WKURLRef, API::URL)
 WK_ADD_API_MAPPING(WKURLRequestRef, API::URLRequest)
 WK_ADD_API_MAPPING(WKURLResponseRef, API::URLResponse)
 WK_ADD_API_MAPPING(WKUserContentURLPatternRef, WebUserContentURLPattern)
@@ -169,19 +169,19 @@ inline WKStringRef toCopiedAPI(const String& string)
     return toAPI(apiString.release().leakRef());
 }
 
-inline ProxyingRefPtr<WebURL> toURLRef(StringImpl* string)
+inline ProxyingRefPtr<API::URL> toURLRef(StringImpl* string)
 {
     if (!string)
-        return ProxyingRefPtr<WebURL>(0);
-    return ProxyingRefPtr<WebURL>(WebURL::create(String(string)));
+        return ProxyingRefPtr<API::URL>(0);
+    return ProxyingRefPtr<API::URL>(API::URL::create(String(string)));
 }
 
 inline WKURLRef toCopiedURLAPI(const String& string)
 {
     if (!string)
         return 0;
-    RefPtr<WebURL> webURL = WebURL::create(string);
-    return toAPI(webURL.release().leakRef());
+    RefPtr<API::URL> url = API::URL::create(string);
+    return toAPI(url.release().leakRef());
 }
 
 inline String toWTFString(WKStringRef stringRef)
index 24c555d..80bbb10 100644 (file)
@@ -32,17 +32,17 @@ using namespace WebKit;
 
 WKTypeID WKURLGetTypeID()
 {
-    return toAPI(WebURL::APIType);
+    return toAPI(API::URL::APIType);
 }
 
 WKURLRef WKURLCreateWithUTF8CString(const char* string)
 {
-    return toAPI(WebURL::create(String::fromUTF8(string)).leakRef());
+    return toAPI(API::URL::create(String::fromUTF8(string)).leakRef());
 }
 
 WKURLRef WKURLCreateWithBaseURL(WKURLRef baseURL, const char* relative)
 {
-    return toAPI(WebURL::create(toImpl(baseURL), String::fromUTF8(relative)).leakRef());
+    return toAPI(API::URL::create(toImpl(baseURL), String::fromUTF8(relative)).leakRef());
 }
 
 WKStringRef WKURLCopyString(WKURLRef url)
index 122dd89..f4e6b1b 100644 (file)
@@ -55,7 +55,7 @@ WKURLRef WKURLCreateWithCFURL(CFURLRef cfURL)
 #if WK_API_ENABLED
     // Since WKNSURL is an internal class with no subclasses, we can do a simple equality check.
     if (object_getClass((NSURL *)cfURL) == wkNSURLClass()) {
-        return toAPI(static_cast<WebURL*>(&[(WKNSURL *)cfURL retain]._apiObject));
+        return toAPI(static_cast<API::URL*>(&[(WKNSURL *)cfURL retain]._apiObject));
     }
 #endif
 
similarity index 63%
rename from Source/WebKit2/Shared/WebURL.h
rename to Source/WebKit2/Shared/APIURL.h
index bfec273..0e1e03c 100644 (file)
 #define WebURL_h
 
 #include "APIObject.h"
+#include "WebCoreArgumentCoders.h"
 #include <WebCore/URL.h>
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/text/WTFString.h>
 
-namespace WebKit {
+namespace API {
 
-// WebURL - A URL type suitable for vending to an API.
-
-class WebURL : public API::ObjectImpl<API::Object::Type::URL> {
+class URL : public ObjectImpl<Object::Type::URL> {
 public:
-    static PassRefPtr<WebURL> create(const String& string)
+    static PassRefPtr<URL> create(const WTF::String& string)
     {
-        return adoptRef(new WebURL(string));
+        return adoptRef(new URL(string));
     }
 
-    static PassRefPtr<WebURL> create(const WebURL* baseURL, const String& relativeURL)
+    static PassRefPtr<URL> create(const URL* baseURL, const WTF::String& relativeURL)
     {
-        using WebCore::URL;
-
         ASSERT(baseURL);
         baseURL->parseURLIfNecessary();
-        auto absoluteURL = std::make_unique<URL>(*baseURL->m_parsedURL.get(), relativeURL);
-        const String& absoluteURLString = absoluteURL->string();
+        auto absoluteURL = std::make_unique<WebCore::URL>(*baseURL->m_parsedURL.get(), relativeURL);
+        const WTF::String& absoluteURLString = absoluteURL->string();
 
-        return adoptRef(new WebURL(std::move(absoluteURL), absoluteURLString));
+        return adoptRef(new URL(std::move(absoluteURL), absoluteURLString));
     }
 
     bool isNull() const { return m_string.isNull(); }
     bool isEmpty() const { return m_string.isEmpty(); }
 
-    const String& string() const { return m_string; }
+    const WTF::String& string() const { return m_string; }
 
-    String host() const
+    WTF::String host() const
     {
         parseURLIfNecessary();
-        return m_parsedURL->isValid() ? m_parsedURL->host() : String();
+        return m_parsedURL->isValid() ? m_parsedURL->host() : WTF::String();
     }
 
-    String protocol() const
+    WTF::String protocol() const
     {
         parseURLIfNecessary();
-        return m_parsedURL->isValid() ? m_parsedURL->protocol() : String();
+        return m_parsedURL->isValid() ? m_parsedURL->protocol() : WTF::String();
     }
 
-    String path() const
+    WTF::String path() const
     {
         parseURLIfNecessary();
-        return m_parsedURL->isValid() ? m_parsedURL->path() : String();
+        return m_parsedURL->isValid() ? m_parsedURL->path() : WTF::String();
     }
 
-    String lastPathComponent() const
+    WTF::String lastPathComponent() const
     {
         parseURLIfNecessary();
-        return m_parsedURL->isValid() ? m_parsedURL->lastPathComponent() : String();
+        return m_parsedURL->isValid() ? m_parsedURL->lastPathComponent() : WTF::String();
+    }
+
+    void encode(IPC::ArgumentEncoder& encoder) const
+    {
+        encoder << m_string;
+    }
+
+    static bool decode(IPC::ArgumentDecoder& decoder, RefPtr<Object>& result)
+    {
+        WTF::String string;
+        if (!decoder.decode(string))
+            return false;
+        
+        result = create(string);
+        return true;
     }
 
 private:
-    WebURL(const String& string)
+    URL(const WTF::String& string)
         : m_string(string)
     {
     }
 
-    WebURL(std::unique_ptr<WebCore::URL> parsedURL, const String& string)
+    URL(std::unique_ptr<WebCore::URL> parsedURL, const WTF::String& string)
         : m_string(string)
         , m_parsedURL(std::move(parsedURL))
     {
@@ -104,10 +116,10 @@ private:
         m_parsedURL = std::make_unique<WebCore::URL>(WebCore::URL(), m_string);
     }
 
-    String m_string;
+    WTF::String m_string;
     mutable std::unique_ptr<WebCore::URL> m_parsedURL;
 };
 
 } // namespace WebKit
 
-#endif // WebURL_h
+#endif // URL_h
index 35b0d03..d1069f8 100644 (file)
 
 #if WK_API_ENABLED
 
+#import "APIURL.h"
 #import "WKObject.h"
-#import "WebURL.h"
 
 namespace WebKit {
-inline NSURL *wrapper(WebURL& url) { ASSERT([url.wrapper() isKindOfClass:[NSURL class]]); return (NSURL *)url.wrapper(); }
+
+inline NSURL *wrapper(API::URL& url)
+{
+    ASSERT([url.wrapper() isKindOfClass:[NSURL class]]);
+    return (NSURL *)url.wrapper();
+}
+
 }
 
 @interface WKNSURL : WKObject <NSCopying>
index 0e88e97..056a2d9 100644 (file)
 
 #if WK_API_ENABLED
 
+#import "APIURL.h"
 #import "WKAPICast.h"
 #import "WKURLCF.h"
-#import "WebURL.h"
-
-using namespace WebKit;
 
 @implementation WKNSURL
 
 - (NSObject *)_web_createTarget
 {
-    return (NSURL *)CFMakeCollectable(WKURLCopyCFURL(kCFAllocatorDefault, toAPI(reinterpret_cast<WebURL*>(&self._apiObject))));
+    return (NSURL *)CFMakeCollectable(WKURLCopyCFURL(kCFAllocatorDefault, WebKit::toAPI(reinterpret_cast<API::URL*>(&self._apiObject))));
 }
 
 #pragma mark NSCopying protocol implementation
index 9b39075..ec15420 100644 (file)
 
 #include "APINumber.h"
 #include "APIString.h"
+#include "APIURL.h"
 #include "PluginInfoStore.h"
 #include "PluginModuleInfo.h"
 #include "WKAPICast.h"
-#include "WebURL.h"
 #include <wtf/text/WTFString.h>
 
 namespace WebKit {
@@ -136,15 +136,15 @@ PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const PluginMo
     getPluginModuleInformation(plugin, map);
 
     if (!frameURLString.isEmpty())
-        map.set(pluginInformationFrameURLKey(), WebURL::create(frameURLString));
+        map.set(pluginInformationFrameURLKey(), API::URL::create(frameURLString));
     if (!mimeType.isEmpty())
         map.set(pluginInformationMIMETypeKey(), API::String::create(mimeType));
     if (!pageURLString.isEmpty())
-        map.set(pluginInformationPageURLKey(), WebURL::create(pageURLString));
+        map.set(pluginInformationPageURLKey(), API::URL::create(pageURLString));
     if (!pluginspageAttributeURLString.isEmpty())
-        map.set(pluginInformationPluginspageAttributeURLKey(), WebURL::create(pluginspageAttributeURLString));
+        map.set(pluginInformationPluginspageAttributeURLKey(), API::URL::create(pluginspageAttributeURLString));
     if (!pluginURLString.isEmpty())
-        map.set(pluginInformationPluginURLKey(), WebURL::create(pluginURLString));
+        map.set(pluginInformationPluginURLKey(), API::URL::create(pluginURLString));
     map.set(plugInInformationReplacementObscuredKey(), API::Boolean::create(replacementObscured));
 
     return ImmutableDictionary::create(std::move(map));
@@ -155,11 +155,11 @@ PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const String&
     ImmutableDictionary::MapType map;
 
     if (!frameURLString.isEmpty())
-        map.set(pluginInformationFrameURLKey(), WebURL::create(frameURLString));
+        map.set(pluginInformationFrameURLKey(), API::URL::create(frameURLString));
     if (!mimeType.isEmpty())
         map.set(pluginInformationMIMETypeKey(), API::String::create(mimeType));
     if (!pageURLString.isEmpty())
-        map.set(pluginInformationPageURLKey(), WebURL::create(pageURLString));
+        map.set(pluginInformationPageURLKey(), API::URL::create(pageURLString));
 
     return ImmutableDictionary::create(std::move(map));
 }
index c358b64..cd37a73 100644 (file)
 #include "APIGeometry.h"
 #include "APINumber.h"
 #include "APIString.h"
+#include "APIURL.h"
 #include "APIURLRequest.h"
+#include "APIURLResponse.h"
 #include "ArgumentCoders.h"
 #include "ArgumentEncoder.h"
 #include "MutableDictionary.h"
 #include "WebSerializedScriptValue.h"
-#include "WebURL.h"
 
 namespace WebKit {
 
@@ -165,8 +166,7 @@ void UserData::encode(CoreIPC::ArgumentEncoder& encoder, const API::Object& obje
     }
 
     case API::Object::Type::URL: {
-        auto& url = static_cast<const WebURL&>(object);
-        encoder << url.string();
+        static_cast<const API::URL&>(object).encode(encoder);
         break;
     }
 
@@ -174,6 +174,10 @@ void UserData::encode(CoreIPC::ArgumentEncoder& encoder, const API::Object& obje
         static_cast<const API::URLRequest&>(object).encode(encoder);
         break;
 
+    case API::Object::Type::URLResponse:
+        static_cast<const API::URLResponse&>(object).encode(encoder);
+        break;
+
     case API::Object::Type::UInt64:
         static_cast<const API::UInt64&>(object).encode(encoder);
         break;
@@ -293,19 +297,21 @@ bool UserData::decode(CoreIPC::ArgumentDecoder& decoder, RefPtr<API::Object>& re
         break;
     }
 
-    case API::Object::Type::URL: {
-        String string;
-        if (!decoder.decode(string))
+    case API::Object::Type::URL:
+        if (!API::URL::decode(decoder, result))
             return false;
-        result = WebURL::create(string);
         break;
-    }
 
     case API::Object::Type::URLRequest:
         if (!API::URLRequest::decode(decoder, result))
             return false;
         break;
 
+    case API::Object::Type::URLResponse:
+        if (!API::URLResponse::decode(decoder, result))
+            return false;
+        break;
+
     case API::Object::Type::UInt64:
         if (!API::UInt64::decode(decoder, result))
             return false;
index 0090abf..9aad3fd 100644 (file)
@@ -31,6 +31,7 @@
 #include "APIGeometry.h"
 #include "APINumber.h"
 #include "APIString.h"
+#include "APIURL.h"
 #include "APIURLRequest.h"
 #include "APIURLResponse.h"
 #include "ArgumentDecoder.h"
@@ -45,7 +46,6 @@
 #include "WebRenderLayer.h"
 #include "WebRenderObject.h"
 #include "WebSerializedScriptValue.h"
-#include "WebURL.h"
 #include "WebUserContentURLPattern.h"
 
 namespace WebKit {
@@ -63,7 +63,7 @@ namespace WebKit {
 //   - WebRenderLayer -> WebRenderLayer
 //   - WebRenderObject -> WebRenderObject
 //   - API::UInt64 -> API::UInt64
-//   - WebURL -> WebURL
+//   - API::URL -> API::URL
 //   - API::URLRequest -> API::URLRequest
 //   - API::URLResponse -> API::URLResponse
 //   - WebError -> WebError
@@ -172,7 +172,7 @@ public:
             return true;
         }
         case API::Object::Type::URL: {
-            WebURL* urlObject = static_cast<WebURL*>(m_root);
+            API::URL* urlObject = static_cast<API::URL*>(m_root);
             encoder << urlObject->string();
             return true;
         }
@@ -252,7 +252,7 @@ protected:
 //   - API::Double -> API::Double
 //   - WebImage -> WebImage
 //   - API::UInt64 -> API::UInt64
-//   - WebURL -> WebURL
+//   - API::URL -> API::URL
 //   - API::URLRequest -> API::URLRequest
 //   - API::URLResponse -> API::URLResponse
 //   - WebError -> WebError
@@ -457,7 +457,7 @@ public:
             String string;
             if (!decoder.decode(string))
                 return false;
-            coder.m_root = WebURL::create(string);
+            coder.m_root = API::URL::create(string);
             break;
         }
         case API::Object::Type::URLRequest: {
index 1a6ca2e..d8c7304 100644 (file)
@@ -35,6 +35,7 @@
 
 namespace API {
 class Data;
+class URL;
 }
 
 namespace WebCore {
@@ -43,8 +44,6 @@ class ArchiveResource;
 
 namespace WebKit {
 
-class WebURL;
-
 class WebArchiveResource : public API::ObjectImpl<API::Object::Type::WebArchiveResource> {
 public:
     virtual ~WebArchiveResource();
index 476ac41..ea26db2 100644 (file)
@@ -215,7 +215,7 @@ void WebFrameProxy::getMainResourceData(PassRefPtr<DataCallback> callback)
     m_page->getMainResourceDataOfFrame(this, callback);
 }
 
-void WebFrameProxy::getResourceData(WebURL* resourceURL, PassRefPtr<DataCallback> callback)
+void WebFrameProxy::getResourceData(API::URL* resourceURL, PassRefPtr<DataCallback> callback)
 {
     if (!m_page) {
         callback->invalidate();
index 34250b4..7c7a43d 100644 (file)
@@ -97,7 +97,7 @@ public:
 
     void getWebArchive(PassRefPtr<DataCallback>);
     void getMainResourceData(PassRefPtr<DataCallback>);
-    void getResourceData(WebURL*, PassRefPtr<DataCallback>);
+    void getResourceData(API::URL*, PassRefPtr<DataCallback>);
 
     void didStartProvisionalLoad(const String& url);
     void didReceiveServerRedirectForProvisionalLoad(const String& url);
index d3330d9..a9dc7a4 100644 (file)
@@ -257,7 +257,7 @@ void WebIconDatabase::didImportIconDataForPageURL(const String& pageURL)
 
 void WebIconDatabase::didChangeIconForPageURL(const String& pageURL)
 {
-    m_iconDatabaseClient.didChangeIconForPageURL(this, WebURL::create(pageURL).get());
+    m_iconDatabaseClient.didChangeIconForPageURL(this, API::URL::create(pageURL).get());
 }
 
 void WebIconDatabase::didRemoveAllIcons()
@@ -295,7 +295,7 @@ void WebIconDatabase::didFinishURLImport()
 
 void WebIconDatabase::notifyIconDataReadyForPageURL(const String& pageURL)
 {
-    m_iconDatabaseClient.iconDataReadyForPageURL(this, WebURL::create(pageURL).get());
+    m_iconDatabaseClient.iconDataReadyForPageURL(this, API::URL::create(pageURL).get());
     didChangeIconForPageURL(pageURL);
 }
 
index 59e2e4b..0cc148e 100644 (file)
@@ -31,7 +31,7 @@
 
 namespace WebKit {
 
-void WebIconDatabaseClient::didChangeIconForPageURL(WebIconDatabase* iconDatabase, WebURL* url)
+void WebIconDatabaseClient::didChangeIconForPageURL(WebIconDatabase* iconDatabase, API::URL* url)
 {
     if (!m_client.didChangeIconForPageURL)
         return;
@@ -47,7 +47,7 @@ void WebIconDatabaseClient::didRemoveAllIcons(WebIconDatabase* iconDatabase)
     m_client.didRemoveAllIcons(toAPI(iconDatabase),  m_client.base.clientInfo);
 }
 
-void WebIconDatabaseClient::iconDataReadyForPageURL(WebIconDatabase* iconDatabase, WebURL* url)
+void WebIconDatabaseClient::iconDataReadyForPageURL(WebIconDatabase* iconDatabase, API::URL* url)
 {
     if (!m_client.iconDataReadyForPageURL)
         return;
index 9c031f9..fc73dcb 100644 (file)
@@ -30,6 +30,7 @@
 #include "WKIconDatabase.h"
 
 namespace API {
+class URL;
 template<> struct ClientTraits<WKIconDatabaseClientBase> {
     typedef std::tuple<WKIconDatabaseClientV0, WKIconDatabaseClientV1> Versions;
 };
@@ -38,13 +39,12 @@ template<> struct ClientTraits<WKIconDatabaseClientBase> {
 namespace WebKit {
 
 class WebIconDatabase;
-class WebURL;
 
 class WebIconDatabaseClient : public API::Client<WKIconDatabaseClientBase> {
 public:
-    void didChangeIconForPageURL(WebIconDatabase*, WebURL*);
+    void didChangeIconForPageURL(WebIconDatabase*, API::URL*);
     void didRemoveAllIcons(WebIconDatabase*);
-    void iconDataReadyForPageURL(WebIconDatabase*, WebURL*);
+    void iconDataReadyForPageURL(WebIconDatabase*, API::URL*);
 };
 
 } // namespace WebKit
index 2acc9a3..f63f5f7 100644 (file)
@@ -55,9 +55,9 @@ void WebOpenPanelResultListenerProxy::chooseFiles(API::Array* fileURLsArray)
     filePaths.reserveInitialCapacity(size);
 
     for (size_t i = 0; i < size; ++i) {
-        WebURL* webURL = fileURLsArray->at<WebURL>(i);
-        if (webURL) {
-            URL url(URL(), webURL->string()); 
+        API::URL* apiURL = fileURLsArray->at<API::URL>(i);
+        if (apiURL) {
+            URL url(URL(), apiURL->string());
             filePaths.uncheckedAppend(url.fileSystemPath());
         }
     }
index e91334e..96221c3 100644 (file)
@@ -1983,7 +1983,7 @@ void WebPageProxy::getMainResourceDataOfFrame(WebFrameProxy* frame, PassRefPtr<D
     m_process->send(Messages::WebPage::GetMainResourceDataOfFrame(frame->frameID(), callbackID), m_pageID);
 }
 
-void WebPageProxy::getResourceDataFromFrame(WebFrameProxy* frame, WebURL* resourceURL, PassRefPtr<DataCallback> prpCallback)
+void WebPageProxy::getResourceDataFromFrame(WebFrameProxy* frame, API::URL* resourceURL, PassRefPtr<DataCallback> prpCallback)
 {
     RefPtr<DataCallback> callback = prpCallback;
     if (!isValid()) {
index 07dcffa..2c17e11 100644 (file)
@@ -637,7 +637,7 @@ public:
     void getContentsAsMHTMLData(PassRefPtr<DataCallback>, bool useBinaryEncoding);
 #endif
     void getMainResourceDataOfFrame(WebFrameProxy*, PassRefPtr<DataCallback>);
-    void getResourceDataFromFrame(WebFrameProxy*, WebURL*, PassRefPtr<DataCallback>);
+    void getResourceDataFromFrame(WebFrameProxy*, API::URL*, PassRefPtr<DataCallback>);
     void getRenderTreeExternalRepresentation(PassRefPtr<StringCallback>);
     void getSelectionOrContentsAsString(PassRefPtr<StringCallback>);
     void getSelectionAsWebArchiveData(PassRefPtr<DataCallback>);
index 3f5196b..95a118f 100644 (file)
                BCD59800112B57BE00EC8C23 /* WebPreferences.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD597FE112B57BE00EC8C23 /* WebPreferences.cpp */; };
                BCD598AC112B7FDF00EC8C23 /* WebPreferencesStore.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD598AA112B7FDF00EC8C23 /* WebPreferencesStore.h */; };
                BCD598AD112B7FDF00EC8C23 /* WebPreferencesStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD598AB112B7FDF00EC8C23 /* WebPreferencesStore.cpp */; };
-               BCDB86C11200FB97007254BE /* WebURL.h in Headers */ = {isa = PBXBuildFile; fileRef = BCDB86C01200FB97007254BE /* WebURL.h */; };
+               BCDB86C11200FB97007254BE /* APIURL.h in Headers */ = {isa = PBXBuildFile; fileRef = BCDB86C01200FB97007254BE /* APIURL.h */; };
                BCDDB317124EBD130048D13C /* WKBase.h in Headers */ = {isa = PBXBuildFile; fileRef = BCDDB316124EBD130048D13C /* WKBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BCDDB32B124EC2AB0048D13C /* WKSharedAPICast.h in Headers */ = {isa = PBXBuildFile; fileRef = BCDDB32A124EC2AB0048D13C /* WKSharedAPICast.h */; };
                BCDDB32D124EC2E10048D13C /* WKAPICast.h in Headers */ = {isa = PBXBuildFile; fileRef = BCDDB32C124EC2E10048D13C /* WKAPICast.h */; };
                2D819B99186275B3001F03D1 /* ViewGestureGeometryCollector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ViewGestureGeometryCollector.cpp; sourceTree = "<group>"; };
                2D819B9A186275B3001F03D1 /* ViewGestureGeometryCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewGestureGeometryCollector.h; sourceTree = "<group>"; };
                2D819B9B186275B3001F03D1 /* ViewGestureGeometryCollector.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ViewGestureGeometryCollector.messages.in; sourceTree = "<group>"; };
-               2D819B9F1862800E001F03D1 /* ViewGestureGeometryCollectorMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ViewGestureGeometryCollectorMessageReceiver.cpp; path = ViewGestureGeometryCollectorMessageReceiver.cpp; sourceTree = "<group>"; };
-               2D819BA01862800E001F03D1 /* ViewGestureGeometryCollectorMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewGestureGeometryCollectorMessages.h; path = ViewGestureGeometryCollectorMessages.h; sourceTree = "<group>"; };
+               2D819B9F1862800E001F03D1 /* ViewGestureGeometryCollectorMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ViewGestureGeometryCollectorMessageReceiver.cpp; sourceTree = "<group>"; };
+               2D819BA01862800E001F03D1 /* ViewGestureGeometryCollectorMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewGestureGeometryCollectorMessages.h; sourceTree = "<group>"; };
                2D870D0D1622B7F9000A3F20 /* PDFPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDFPlugin.h; path = PDF/PDFPlugin.h; sourceTree = "<group>"; };
                2D870D0E1622B7F9000A3F20 /* PDFPlugin.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PDFPlugin.mm; path = PDF/PDFPlugin.mm; sourceTree = "<group>"; };
                2D8710141828415D0018FA01 /* PlatformCALayerRemoteCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformCALayerRemoteCustom.cpp; sourceTree = "<group>"; };
                BCD597FE112B57BE00EC8C23 /* WebPreferences.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPreferences.cpp; sourceTree = "<group>"; };
                BCD598AA112B7FDF00EC8C23 /* WebPreferencesStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPreferencesStore.h; sourceTree = "<group>"; };
                BCD598AB112B7FDF00EC8C23 /* WebPreferencesStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPreferencesStore.cpp; sourceTree = "<group>"; };
-               BCDB86C01200FB97007254BE /* WebURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebURL.h; sourceTree = "<group>"; };
+               BCDB86C01200FB97007254BE /* APIURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIURL.h; sourceTree = "<group>"; };
                BCDDB316124EBD130048D13C /* WKBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBase.h; sourceTree = "<group>"; };
                BCDDB32A124EC2AB0048D13C /* WKSharedAPICast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKSharedAPICast.h; sourceTree = "<group>"; };
                BCDDB32C124EC2E10048D13C /* WKAPICast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKAPICast.h; sourceTree = "<group>"; };
                                1AC1336D18565D2B00F3EC05 /* APIPageHandle.cpp */,
                                1AC1336B18565C7A00F3EC05 /* APIPageHandle.h */,
                                BCF04C8E11FF9F6E00F86A58 /* APIString.h */,
+                               BCDB86C01200FB97007254BE /* APIURL.h */,
                                BCE2315C122C30CA00D5C35A /* APIURLRequest.cpp */,
                                BCE2315B122C30CA00D5C35A /* APIURLRequest.h */,
                                BC90A1D1122DD55E00CC8C50 /* APIURLResponse.cpp */,
                                F634445512A885C8000612D8 /* WebSecurityOrigin.h */,
                                A72D5D7F1236CBA800A88B15 /* WebSerializedScriptValue.h */,
                                C0337DD7127A51B6008FF4F4 /* WebTouchEvent.cpp */,
-                               BCDB86C01200FB97007254BE /* WebURL.h */,
                                F6113E24126CE1820057D0A7 /* WebUserContentURLPattern.h */,
                                C0337DD0127A2980008FF4F4 /* WebWheelEvent.cpp */,
                        );
                                1AC1336C18565C7A00F3EC05 /* APIPageHandle.h in Headers */,
                                1AB474E8184D44D00051B622 /* WKBundlePageDiagnosticLoggingClient.h in Headers */,
                                1AC7537C183A9FDB0072CB15 /* PageLoadState.h in Headers */,
-                               BCDB86C11200FB97007254BE /* WebURL.h in Headers */,
+                               BCDB86C11200FB97007254BE /* APIURL.h in Headers */,
                                51C96119183D294700D2002E /* WebIDBServerConnectionMessages.h in Headers */,
                                BCE2315D122C30CA00D5C35A /* APIURLRequest.h in Headers */,
                                BC90A1D2122DD55E00CC8C50 /* APIURLResponse.h in Headers */,
index 0d43f00..a7a4855 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "APIArray.h"
 #include "APIString.h"
+#include "APIURL.h"
 #include "APIURLRequest.h"
 #include "InjectedBundleBackForwardList.h"
 #include "InjectedBundleNodeHandle.h"
@@ -46,7 +47,6 @@
 #include "WebPage.h"
 #include "WebRenderLayer.h"
 #include "WebRenderObject.h"
-#include "WebURL.h"
 #include <WebCore/AXObjectCache.h>
 #include <WebCore/AccessibilityObject.h>
 #include <WebCore/MainFrame.h>