PDA

View Full Version : Does WebKit have http connecting module?



huyanke
10th May 2011, 18:52
hi,

I am a beginner of WebKit. It looks like WebKit doesn't have an API about setting proxy.

Previously when I was using Molliza sdk, I can set proxy by:

nsCOMPtr<nsIProtocolProxyService> proxyService =
do_GetService("@mozilla.org/network/protocol-proxy-service;1", &nrv);

I find an interesting thing: When you want to set proxy in Chrome or Safari, actually you are setting system level proxy. I guess the proxy module in Chrome and Safari is not related to WebKit module, but not sure.

I also find in QT, you can set proxy in application by :

#include <QNetworkProxy>
……
QNetworkProxy * proxy = new QNetworkProxy();
proxy->setHostName("localhost");
proxy->setPort(8888);
proxy->setType(QNetworkProxy::HttpProxy);
QNetworkProxy::setApplicationProxy(*proxy);

Many QtWebKit based open source browser implement the proxy in this way. This module looks not related to QtWebKit, but belongs to QtCore.

So does this mean WebKit is just for rendering, and it doesn't have module for http conecting? I previously thought WebKit should have every module like Molliza Gecko. Browsers based on WebKit will just need to implement UI. But the thing doesn't look like this..

Thanks for any help!!

Cheers,
Yanke

wysota
11th May 2011, 13:23
QtWebKit uses QNetworkAccessManager for HTTP which is implemented purely inside Qt framework. However QNAM is driven by QWebPage.

huyanke
13th May 2011, 02:02
Thanks so much for confirming !! wysota