[Curl][WebKit] Implement Proxy configuration API.
authorbasuke.suzuki@sony.com <basuke.suzuki@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Nov 2018 20:43:23 +0000 (20:43 +0000)
committerbasuke.suzuki@sony.com <basuke.suzuki@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Nov 2018 20:43:23 +0000 (20:43 +0000)
commit9fa31beab77aafb375dae49486e0e9f768ee27b0
tree24f253ca28af66697959b729127483d17e1ec481
parent588725a9f439f416b2d0abd994b572c98f90371c
[Curl][WebKit] Implement Proxy configuration API.
https://bugs.webkit.org/show_bug.cgi?id=189053

Reviewed by Youenn Fablet.

Source/WebCore:

Added API to set proxy from the app.

No new tests because there's no behaviour change in WebCore.

* platform/network/NetworkStorageSession.h:
* platform/network/curl/CurlContext.h:
(WebCore::CurlContext::setProxySettings):
* platform/network/curl/CurlProxySettings.h:
* platform/network/curl/NetworkStorageSessionCurl.cpp:
(WebCore::NetworkStorageSession::setProxySettings const):

Source/WebKit:

Added proxy configuration API to WebsiteDataStore. Three API were added in WKWebsiteDataStoreRefCurl.h:
- WKWebsiteDataStoreEnableDefaultNetworkProxySettings(WKWebsiteDataStoreRef)
- WKWebsiteDataStoreEnableCustomNetworkProxySettings(WKWebsiteDataStoreRef, WKURLRef, WKStringRef ignoreHosts)
- WKWebsiteDataStoreDisableNetworkProxySettings(WKWebsiteDataStoreRef)

* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkSessionCreationParameters.h:
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):
* NetworkProcess/curl/NetworkProcessCurl.cpp:
(WebKit::NetworkProcess::setNetworkProxySettings):
* NetworkProcess/curl/NetworkSessionCurl.cpp:
(WebKit::NetworkSessionCurl::NetworkSessionCurl):
* NetworkProcess/curl/RemoteNetworkingContextCurl.cpp:
(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
* PlatformWin.cmake:
* Shared/WebCoreArgumentCoders.h:
* Shared/curl/WebCoreArgumentCodersCurl.cpp:
(IPC::ArgumentCoder<CurlProxySettings>::encode):
(IPC::ArgumentCoder<CurlProxySettings>::decode):
* UIProcess/API/C/curl/WKWebsiteDataStoreRefCurl.cpp:
  Copied from Source/WebKit/NetworkProcess/curl/NetworkSessionCurl.cpp.
(WKWebsiteDataStoreEnableDefaultNetworkProxySettings):
(WKWebsiteDataStoreEnableCustomNetworkProxySettings):
(WKWebsiteDataStoreDisableNetworkProxySettings):
* UIProcess/API/C/curl/WKWebsiteDataStoreRefCurl.h:
  Copied from Source/WebKit/NetworkProcess/curl/NetworkSessionCurl.cpp.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::parameters):
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::networkProxySettings const):
* UIProcess/WebsiteData/curl/WebsiteDataStoreCurl.cpp:
  Copied from Source/WebKit/NetworkProcess/curl/NetworkSessionCurl.cpp.
(WebKit::WebsiteDataStore::platformSetParameters):
(WebKit::WebsiteDataStore::setNetworkProxySettings):

Tools:

Added Proxy Settings dialog to call newly added API.

* MiniBrowser/win/BrowserWindow.h:
* MiniBrowser/win/Common.cpp:
(askProxySettings):
(askCredential):
(authDialogProc): Deleted.
* MiniBrowser/win/Common.h:
* MiniBrowser/win/DialogHelper.h: Added.
(Dialog::run):
(Dialog::doalogProc):
(Dialog::handle):
(Dialog::setup):
(Dialog::update):
(Dialog::validate):
(Dialog::updateOkButton):
(Dialog::command):
(Dialog::ok):
(Dialog::cancel):
(Dialog::close):
(Dialog::hDlg):
(Dialog::item):
(Dialog::setEnabled):
(Dialog::setText):
(Dialog::getText):
(Dialog::getTextLength):
(Dialog::RadioGroup::RadioGroup):
(Dialog::RadioGroup::set):
(Dialog::RadioGroup::get):
(Dialog::radioGroup):
* MiniBrowser/win/MainWindow.cpp:
(MainWindow::WndProc):
* MiniBrowser/win/MiniBrowserLib.rc:
* MiniBrowser/win/MiniBrowserLibResource.h:
* MiniBrowser/win/WebKitBrowserWindow.cpp:
(createWKURL):
(WebKitBrowserWindow::WebKitBrowserWindow):
(WebKitBrowserWindow::updateProxySettings):
(WebKitBrowserWindow::loadURL):
(WebKitBrowserWindow::loadHTMLString):
(WebKitBrowserWindow::openProxySettings):
* MiniBrowser/win/WebKitBrowserWindow.h:
* MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:
(WebKitLegacyBrowserWindow::openProxySettings):
* MiniBrowser/win/WebKitLegacyBrowserWindow.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/network/NetworkStorageSession.h
Source/WebCore/platform/network/curl/CurlContext.h
Source/WebCore/platform/network/curl/CurlProxySettings.h
Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/NetworkProcess.h
Source/WebKit/NetworkProcess/NetworkProcess.messages.in
Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h
Source/WebKit/NetworkProcess/curl/NetworkProcessCurl.cpp
Source/WebKit/NetworkProcess/curl/NetworkSessionCurl.cpp
Source/WebKit/NetworkProcess/curl/RemoteNetworkingContextCurl.cpp
Source/WebKit/PlatformWin.cmake
Source/WebKit/Shared/WebCoreArgumentCoders.h
Source/WebKit/Shared/curl/WebCoreArgumentCodersCurl.cpp
Source/WebKit/UIProcess/API/C/curl/WKWebsiteDataStoreRefCurl.cpp [new file with mode: 0644]
Source/WebKit/UIProcess/API/C/curl/WKWebsiteDataStoreRefCurl.h [new file with mode: 0644]
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
Source/WebKit/UIProcess/WebsiteData/curl/WebsiteDataStoreCurl.cpp [new file with mode: 0644]
Tools/ChangeLog
Tools/MiniBrowser/win/BrowserWindow.h
Tools/MiniBrowser/win/Common.cpp
Tools/MiniBrowser/win/Common.h
Tools/MiniBrowser/win/DialogHelper.h [new file with mode: 0644]
Tools/MiniBrowser/win/MainWindow.cpp
Tools/MiniBrowser/win/MiniBrowserLib.rc
Tools/MiniBrowser/win/MiniBrowserLibResource.h
Tools/MiniBrowser/win/WebKitBrowserWindow.cpp
Tools/MiniBrowser/win/WebKitBrowserWindow.h
Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.cpp
Tools/MiniBrowser/win/WebKitLegacyBrowserWindow.h