WebKit2 SPI to disable remote inspection on a WKWebView / WKPage
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Mar 2014 21:46:21 +0000 (21:46 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Mar 2014 21:46:21 +0000 (21:46 +0000)
commitc69599a7bc0ef8fdafc617dce21b286018b01f71
tree8fdfea0888f30e5b981c7ffd6f2f27e184d24b84
parente3d5b69e33de8dcada1ca4e83dca32de736cec80
WebKit2 SPI to disable remote inspection on a WKWebView / WKPage
https://bugs.webkit.org/show_bug.cgi?id=130371

Reviewed by Dan Bernstein.

* Shared/WebPageCreationParameters.h:
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
Add allowsRemoteInspection bool.

* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageGetAllowsRemoteInspection):
(WKPageSetAllowsRemoteInspection):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _allowsRemoteInspection]):
(-[WKWebView _setAllowsRemoteInspection:]):
Getter and setter for allowing remote inspection state.

* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::allowsRemoteInspection):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setAllowsRemoteInspection):
(WebKit::WebPageProxy::creationParameters):
Cached allows remote inspection state, with getter and setter.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setAllowsRemoteInspection):
When setting, call into WebCore to adjust the Page's setting.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPageCreationParameters.cpp
Source/WebKit2/Shared/WebPageCreationParameters.h
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/C/WKPagePrivate.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in