Changeset 180708 in webkit
- Timestamp:
- Feb 26, 2015, 4:09:03 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 added
- 3 edited
-
ChangeLog (modified) (1 diff)
-
WebCore.xcodeproj/project.pbxproj (modified) (7 diffs)
-
platform/mac/ContentFilterMac.mm (modified) (1 diff)
-
platform/spi/cocoa/NEFilterSourceSPI.h (added)
-
platform/spi/cocoa/WebFilterEvaluatorSPI.h (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r180706 r180708 1 2015-02-26 Andy Estes <aestes@apple.com> 2 3 [Content Filtering] Move WebFilterEvaluator and NEFilterSource declarations to SPI headers 4 https://bugs.webkit.org/show_bug.cgi?id=142062 5 6 Reviewed by Daniel Bates. 7 8 * WebCore.xcodeproj/project.pbxproj: 9 * platform/mac/ContentFilterMac.mm: 10 * platform/spi/cocoa/NEFilterSourceSPI.h: Added. 11 * platform/spi/cocoa/WebFilterEvaluatorSPI.h: Added. 12 1 13 2015-02-26 Anders Carlsson <andersca@apple.com> 2 14 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r180609 r180708 3790 3790 A17C81220F2A5CF7005DAAEB /* HTMLElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */; }; 3791 3791 A17C81230F2A5CF7005DAAEB /* HTMLElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */; }; 3792 A19D93461A9FEC7200B46C24 /* NEFilterSourceSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A19D93441A9FEC7200B46C24 /* NEFilterSourceSPI.h */; }; 3793 A19D93471A9FEC7200B46C24 /* WebFilterEvaluatorSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A19D93451A9FEC7200B46C24 /* WebFilterEvaluatorSPI.h */; }; 3792 3794 A1C797181883DD82000F5E1F /* DOMGestureEvent.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 0F54DCDD1880F901003EEDBB /* DOMGestureEvent.h */; }; 3793 3795 A1C797191883DDED000F5E1F /* DOMTouch.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 0F54DCCD1880F867003EEDBB /* DOMTouch.h */; }; … … 9688 9690 7C74D43A1882400400E5ED57 /* UTextProviderUTF16.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UTextProviderUTF16.h; sourceTree = "<group>"; }; 9689 9691 7C9DBFEA1A9C489F000D6B25 /* HTMLAttachmentElement.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = HTMLAttachmentElement.idl; sourceTree = "<group>"; }; 9690 7C9DBFEB1A9C49B1000D6B25 /* JSHTMLAttachmentElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSHTMLAttachmentElement.cpp;path = JSHTMLAttachmentElement.cpp; sourceTree = "<group>"; };9691 7C9DBFEC1A9C49B1000D6B25 /* JSHTMLAttachmentElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSHTMLAttachmentElement.h;path = JSHTMLAttachmentElement.h; sourceTree = "<group>"; };9692 7C9DBFEB1A9C49B1000D6B25 /* JSHTMLAttachmentElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLAttachmentElement.cpp; sourceTree = "<group>"; }; 9693 7C9DBFEC1A9C49B1000D6B25 /* JSHTMLAttachmentElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLAttachmentElement.h; sourceTree = "<group>"; }; 9692 9694 7CC564B618BABEA6001B9652 /* TelephoneNumberDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TelephoneNumberDetector.h; sourceTree = "<group>"; }; 9693 9695 7CC564B918BAC720001B9652 /* TelephoneNumberDetectorCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TelephoneNumberDetectorCocoa.cpp; sourceTree = "<group>"; }; … … 11000 11002 A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLElementFactory.cpp; sourceTree = "<group>"; }; 11001 11003 A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLElementFactory.h; sourceTree = "<group>"; }; 11004 A19D93441A9FEC7200B46C24 /* NEFilterSourceSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NEFilterSourceSPI.h; sourceTree = "<group>"; }; 11005 A19D93451A9FEC7200B46C24 /* WebFilterEvaluatorSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebFilterEvaluatorSPI.h; sourceTree = "<group>"; }; 11002 11006 A1C7971C1883E51F000F5E1F /* DOMHTMLTextAreaElementPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMHTMLTextAreaElementPrivate.h; sourceTree = "<group>"; }; 11003 11007 A1C7FAA1133A5D3500D6732D /* JSXPathResultCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSXPathResultCustom.cpp; sourceTree = "<group>"; }; … … 16309 16313 44EFF6421A6FF92700D45EEC /* IOTypesSPI.h */, 16310 16314 CE12524E1A1A78D200864480 /* MachVMSPI.h */, 16315 A19D93441A9FEC7200B46C24 /* NEFilterSourceSPI.h */, 16311 16316 CE1252501A1BEBD800864480 /* NSCalendarDateSPI.h */, 16312 16317 2DDB97F319F9AECA002025D8 /* NSExtensionSPI.h */, … … 16319 16324 CE12523C1A1676CD00864480 /* QuartzCoreSPI.h */, 16320 16325 CEC337AC1A46071F009B8523 /* ServersSPI.h */, 16326 A19D93451A9FEC7200B46C24 /* WebFilterEvaluatorSPI.h */, 16321 16327 ); 16322 16328 path = cocoa; … … 24254 24260 E145349916A9BB6A000F6FD2 /* DOMTransitionEventInternal.h in Headers */, 24255 24261 BC1A37BE097C715F0019F3D8 /* DOMTraversal.h in Headers */, 24262 A19D93471A9FEC7200B46C24 /* WebFilterEvaluatorSPI.h in Headers */, 24256 24263 85526CD20AB0B7D9000302EA /* DOMTreeWalker.h in Headers */, 24257 24264 850B41C30AD9E7E700A6ED4F /* DOMTreeWalkerInternal.h in Headers */, … … 24883 24890 BCA83E500D7CE1E9003421A8 /* JSDataTransfer.h in Headers */, 24884 24891 4162A4581011464700DFF3ED /* JSDedicatedWorkerGlobalScope.h in Headers */, 24892 A19D93461A9FEC7200B46C24 /* NEFilterSourceSPI.h in Headers */, 24885 24893 FDA15ED212B03F94003A583A /* JSDelayNode.h in Headers */, 24886 24894 31FB1A66120A5D3F00DC02A0 /* JSDeviceMotionEvent.h in Headers */, -
trunk/Source/WebCore/platform/mac/ContentFilterMac.mm
r176924 r180708 31 31 #import "ResourceResponse.h" 32 32 #import "SoftLinking.h" 33 #import "WebFilterEvaluatorSPI.h" 33 34 #import <objc/runtime.h> 34 35 35 #if defined(__has_include) && __has_include(<WebContentAnalysis/WebFilterEvaluator.h>) 36 #import <WebContentAnalysis/WebFilterEvaluator.h> 37 #else 38 static const OSStatus kWFEStateBuffering = 2; 39 @interface WebFilterEvaluator : NSObject 40 + (BOOL)isManagedSession; 41 - (BOOL)wasBlocked; 42 - (NSData *)addData:(NSData *)receivedData; 43 - (NSData *)dataComplete; 44 - (OSStatus)filterState; 45 - (id)initWithResponse:(NSURLResponse *)response; 46 @end 36 #if HAVE(NE_FILTER_SOURCE) 37 #import "NEFilterSourceSPI.h" 38 SOFT_LINK_FRAMEWORK(NetworkExtension); 39 SOFT_LINK_CLASS(NetworkExtension, NEFilterSource); 47 40 #endif 48 41 49 42 SOFT_LINK_PRIVATE_FRAMEWORK(WebContentAnalysis); 50 43 SOFT_LINK_CLASS(WebContentAnalysis, WebFilterEvaluator); 51 52 #if HAVE(NE_FILTER_SOURCE)53 54 #if defined(__has_include) && __has_include(<NetworkExtension/NEFilterSource.h>)55 #import <NetworkExtension/NEFilterSource.h>56 #else57 typedef NS_ENUM(NSInteger, NEFilterSourceStatus) {58 NEFilterSourceStatusPass = 1,59 NEFilterSourceStatusBlock = 2,60 NEFilterSourceStatusNeedsMoreData = 3,61 NEFilterSourceStatusError = 4,62 };63 64 typedef NS_ENUM(NSInteger, NEFilterSourceDirection) {65 NEFilterSourceDirectionOutbound = 1,66 NEFilterSourceDirectionInbound = 2,67 };68 69 @interface NEFilterSource : NSObject70 + (BOOL)filterRequired;71 - (id)initWithURL:(NSURL *)url direction:(NEFilterSourceDirection)direction socketIdentifier:(uint64_t)socketIdentifier;72 - (void)addData:(NSData *)data withCompletionQueue:(dispatch_queue_t)queue completionHandler:(void (^)(NEFilterSourceStatus, NSData *))completionHandler;73 - (void)dataCompleteWithCompletionQueue:(dispatch_queue_t)queue completionHandler:(void (^)(NEFilterSourceStatus, NSData *))completionHandler;74 @property (readonly) NEFilterSourceStatus status;75 @property (readonly) NSURL *url;76 @property (readonly) NEFilterSourceDirection direction;77 @property (readonly) uint64_t socketIdentifier;78 @end79 #endif80 81 SOFT_LINK_FRAMEWORK(NetworkExtension);82 SOFT_LINK_CLASS(NetworkExtension, NEFilterSource);83 84 #endif // HAVE(NE_FILTER_SOURCE)85 44 86 45 namespace WebCore {
Note:
See TracChangeset
for help on using the changeset viewer.