⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 180708 in webkit


Ignore:
Timestamp:
Feb 26, 2015, 4:09:03 PM (12 years ago)
Author:
aestes@apple.com
Message:

[Content Filtering] Move WebFilterEvaluator and NEFilterSource declarations to SPI headers
https://bugs.webkit.org/show_bug.cgi?id=142062

Reviewed by Daniel Bates.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/mac/ContentFilterMac.mm:
  • platform/spi/cocoa/NEFilterSourceSPI.h: Added.
  • platform/spi/cocoa/WebFilterEvaluatorSPI.h: Added.
Location:
trunk/Source/WebCore
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r180706 r180708  
     12015-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
    1132015-02-26  Anders Carlsson  <andersca@apple.com>
    214
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r180609 r180708  
    37903790                A17C81220F2A5CF7005DAAEB /* HTMLElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */; };
    37913791                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 */; };
    37923794                A1C797181883DD82000F5E1F /* DOMGestureEvent.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 0F54DCDD1880F901003EEDBB /* DOMGestureEvent.h */; };
    37933795                A1C797191883DDED000F5E1F /* DOMTouch.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 0F54DCCD1880F867003EEDBB /* DOMTouch.h */; };
     
    96889690                7C74D43A1882400400E5ED57 /* UTextProviderUTF16.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UTextProviderUTF16.h; sourceTree = "<group>"; };
    96899691                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>"; };
    96929694                7CC564B618BABEA6001B9652 /* TelephoneNumberDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TelephoneNumberDetector.h; sourceTree = "<group>"; };
    96939695                7CC564B918BAC720001B9652 /* TelephoneNumberDetectorCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TelephoneNumberDetectorCocoa.cpp; sourceTree = "<group>"; };
     
    1100011002                A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLElementFactory.cpp; sourceTree = "<group>"; };
    1100111003                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>"; };
    1100211006                A1C7971C1883E51F000F5E1F /* DOMHTMLTextAreaElementPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMHTMLTextAreaElementPrivate.h; sourceTree = "<group>"; };
    1100311007                A1C7FAA1133A5D3500D6732D /* JSXPathResultCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSXPathResultCustom.cpp; sourceTree = "<group>"; };
     
    1630916313                                44EFF6421A6FF92700D45EEC /* IOTypesSPI.h */,
    1631016314                                CE12524E1A1A78D200864480 /* MachVMSPI.h */,
     16315                                A19D93441A9FEC7200B46C24 /* NEFilterSourceSPI.h */,
    1631116316                                CE1252501A1BEBD800864480 /* NSCalendarDateSPI.h */,
    1631216317                                2DDB97F319F9AECA002025D8 /* NSExtensionSPI.h */,
     
    1631916324                                CE12523C1A1676CD00864480 /* QuartzCoreSPI.h */,
    1632016325                                CEC337AC1A46071F009B8523 /* ServersSPI.h */,
     16326                                A19D93451A9FEC7200B46C24 /* WebFilterEvaluatorSPI.h */,
    1632116327                        );
    1632216328                        path = cocoa;
     
    2425424260                                E145349916A9BB6A000F6FD2 /* DOMTransitionEventInternal.h in Headers */,
    2425524261                                BC1A37BE097C715F0019F3D8 /* DOMTraversal.h in Headers */,
     24262                                A19D93471A9FEC7200B46C24 /* WebFilterEvaluatorSPI.h in Headers */,
    2425624263                                85526CD20AB0B7D9000302EA /* DOMTreeWalker.h in Headers */,
    2425724264                                850B41C30AD9E7E700A6ED4F /* DOMTreeWalkerInternal.h in Headers */,
     
    2488324890                                BCA83E500D7CE1E9003421A8 /* JSDataTransfer.h in Headers */,
    2488424891                                4162A4581011464700DFF3ED /* JSDedicatedWorkerGlobalScope.h in Headers */,
     24892                                A19D93461A9FEC7200B46C24 /* NEFilterSourceSPI.h in Headers */,
    2488524893                                FDA15ED212B03F94003A583A /* JSDelayNode.h in Headers */,
    2488624894                                31FB1A66120A5D3F00DC02A0 /* JSDeviceMotionEvent.h in Headers */,
  • trunk/Source/WebCore/platform/mac/ContentFilterMac.mm

    r176924 r180708  
    3131#import "ResourceResponse.h"
    3232#import "SoftLinking.h"
     33#import "WebFilterEvaluatorSPI.h"
    3334#import <objc/runtime.h>
    3435
    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"
     38SOFT_LINK_FRAMEWORK(NetworkExtension);
     39SOFT_LINK_CLASS(NetworkExtension, NEFilterSource);
    4740#endif
    4841
    4942SOFT_LINK_PRIVATE_FRAMEWORK(WebContentAnalysis);
    5043SOFT_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 #else
    57 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 : NSObject
    70 + (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 @end
    79 #endif
    80 
    81 SOFT_LINK_FRAMEWORK(NetworkExtension);
    82 SOFT_LINK_CLASS(NetworkExtension, NEFilterSource);
    83 
    84 #endif // HAVE(NE_FILTER_SOURCE)
    8544
    8645namespace WebCore {
Note: See TracChangeset for help on using the changeset viewer.