[Content Filtering] Add a HAVE(PARENTAL_CONTROLS) and use it
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Apr 2015 08:54:41 +0000 (08:54 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Apr 2015 08:54:41 +0000 (08:54 +0000)
commitb88ff1b7fc07bf6a458379c48b6f2d72710fa118
tree18e842dcdff44d88fd2e8474ab4f068d6a41c5e7
parent816307ed22ac36e78260db22e85488188ccfedeb
[Content Filtering] Add a HAVE(PARENTAL_CONTROLS) and use it
https://bugs.webkit.org/show_bug.cgi?id=143559

Reviewed by David Kilzer.

Source/WebCore:

* loader/ContentFilter.cpp:
(WebCore::ContentFilter::types): Only registered ParentalControlsContentFilter if HAVE(PARENTAL_CONTROLS).
* platform/ContentFilterUnblockHandler.h: Changed PLATFORM(IOS) to HAVE(PARENTAL_CONTROLS).
* platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
(WebCore::ContentFilterUnblockHandler::wrapWithDecisionHandler): Ditto.
(WebCore::ContentFilterUnblockHandler::needsUIProcess): Ditto.
(WebCore::ContentFilterUnblockHandler::encode): Ditto.
(WebCore::ContentFilterUnblockHandler::decode): Ditto.
(WebCore::ContentFilterUnblockHandler::canHandleRequest): Ditto.
(WebCore::ContentFilterUnblockHandler::requestUnblockAsync): Ditto.
* platform/cocoa/ParentalControlsContentFilter.mm: Wrapped the file with HAVE(PARENTAL_CONTROLS)

Source/WTF:

Added PLATFORM(WATCHOS). Used PLATFORM() since Watch OS is just a variant of OS(IOS).
Defined HAVE(PARENTAL_CONTROLS) to be true on all Cocoa platforms except Watch OS.

* wtf/Platform.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/loader/ContentFilter.cpp
Source/WebCore/platform/ContentFilterUnblockHandler.h
Source/WebCore/platform/cocoa/ContentFilterUnblockHandlerCocoa.mm
Source/WebCore/platform/cocoa/ParentalControlsContentFilter.mm