Add URLRequest API for WebKit2
[WebKit-https.git] / WebKit2 / UIProcess / WebPageProxy.cpp
index 0517a69..6d41c09 100644 (file)
@@ -43,6 +43,7 @@
 #include "WebProcessManager.h"
 #include "WebProcessMessageKinds.h"
 #include "WebProcessProxy.h"
+#include "WebURLRequest.h"
 
 #include "WKContextPrivate.h"
 #include <stdio.h>
@@ -212,9 +213,20 @@ void WebPageProxy::loadURL(const String& url)
         puts("loadURL called with a dead WebProcess");
         revive();
     }
+
     process()->send(WebPageMessage::LoadURL, m_pageID, CoreIPC::In(url));
 }
 
+void WebPageProxy::loadURLRequest(WebURLRequest* urlRequest)
+{
+    if (!isValid()) {
+        puts("loadURLRequest called with a dead WebProcess");
+        revive();
+    }
+
+    process()->send(WebPageMessage::LoadURLRequest, m_pageID, CoreIPC::In(urlRequest->resourceRequest()));
+}
+
 void WebPageProxy::stopLoading()
 {
     if (!isValid())