root/trunk/WebKitLibraries/WebKitSystemInterface.h

Revision 116695, 20.0 KB (checked in by andersca@apple.com, 6 days ago)

WebKit1: Add a way to blacklist specific plug-ins/plug-in versions
 https://bugs.webkit.org/show_bug.cgi?id=86150
< rdar://problem/9551196>

Reviewed by Sam Weinig.

Source/WebCore:

* English.lproj/Localizable.strings:
Update.

* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadPlugin):
It is possible that the client has already set the unavailability reason so don't try to set it twice.

* platform/LocalizedStrings.cpp:
(WebCore::insecurePluginVersionText):
* platform/LocalizedStrings.h:
Add insecure plug-in version text.

* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::unavailablePluginReplacementText):
* rendering/RenderEmbeddedObject.h:
Add InsecurePluginVersion unavailability reason.

Source/WebKit/mac:

* Misc/WebKitErrors.h:
Add WebKitErrorInsecurePlugInVersion enum.

* Plugins/WebBasePluginPackage.h:
* Plugins/WebBasePluginPackage.mm:
(-[WebBasePluginPackage bundleIdentifier]):
(-[WebBasePluginPackage bundleVersion]):
Add bundleIdentifier and bundleVersion getters.

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::createPlugin):
Check if the plug-in is blocked. If it is, set the unavailability reason and the error code.

WebKitLibraries:

Add WKShouldBlockPlugin.

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceSnowLeopard.a:

  • Property svn:eol-style set to native
Line 
1/*     
2    WebKitSystemInterface.h
3    Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4
5    Public header file.
6*/
7
8#import <Cocoa/Cocoa.h>
9#import <Carbon/Carbon.h>
10
11@class AVAsset;
12@class QTMovie;
13@class QTMovieView;
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19typedef struct _CFURLResponse* CFURLResponseRef;
20typedef const struct _CFURLRequest* CFURLRequestRef;
21typedef struct _CFURLRequest* CFMutableURLRequestRef;
22
23typedef struct _CFURLCredential* WKCFURLCredentialRef;
24typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
25
26typedef enum {
27    WKCertificateParseResultSucceeded  = 0,
28    WKCertificateParseResultFailed     = 1,
29    WKCertificateParseResultPKCS7      = 2,
30} WKCertificateParseResult;
31
32CFStringRef WKCopyCFLocalizationPreferredName(CFStringRef localization);
33void WKSetDefaultLocalization(CFStringRef localization);
34
35CFStringRef WKSignedPublicKeyAndChallengeString(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
36WKCertificateParseResult WKAddCertificatesToKeychainFromData(const void *bytes, unsigned length);
37
38NSString *WKGetPreferredExtensionForMIMEType(NSString *type);
39NSArray *WKGetExtensionsForMIMEType(NSString *type);
40NSString *WKGetMIMETypeForExtension(NSString *extension);
41
42NSDate *WKGetNSURLResponseLastModifiedDate(NSURLResponse *response);
43NSTimeInterval WKGetNSURLResponseFreshnessLifetime(NSURLResponse *response);
44NSString *WKCopyNSURLResponseStatusLine(NSURLResponse *response);
45
46#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
47CFArrayRef WKCopyNSURLResponseCertificateChain(NSURLResponse *response);
48#endif
49
50CFStringEncoding WKGetWebDefaultCFStringEncoding(void);
51
52void WKSetMetadataURL(NSString *URLString, NSString *referrer, NSString *path);
53void WKSetNSURLConnectionDefersCallbacks(NSURLConnection *connection, BOOL defers);
54
55void WKShowKeyAndMain(void);
56#ifndef __LP64__
57OSStatus WKSyncWindowWithCGAfterMove(WindowRef);
58unsigned WKCarbonWindowMask(void);
59void *WKGetNativeWindowFromWindowRef(WindowRef);
60OSType WKCarbonWindowPropertyCreator(void);
61OSType WKCarbonWindowPropertyTag(void);
62#endif
63
64typedef id WKNSURLConnectionDelegateProxyPtr;
65
66WKNSURLConnectionDelegateProxyPtr WKCreateNSURLConnectionDelegateProxy(void);
67
68void WKDisableCGDeferredUpdates(void);
69
70Class WKNSURLProtocolClassForRequest(NSURLRequest *request);
71void WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
72
73void WKSetCookieStoragePrivateBrowsingEnabled(BOOL enabled);
74
75unsigned WKGetNSAutoreleasePoolCount(void);
76
77void WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);
78
79NSString *WKMouseMovedNotification(void);
80NSString *WKWindowWillOrderOnScreenNotification(void);
81NSString *WKWindowWillOrderOffScreenNotification(void);
82void WKSetNSWindowShouldPostEventNotifications(NSWindow *window, BOOL post);
83
84CFTypeID WKGetAXTextMarkerTypeID(void);
85CFTypeID WKGetAXTextMarkerRangeTypeID(void);
86CFTypeRef WKCreateAXTextMarker(const void *bytes, size_t len);
87BOOL WKGetBytesFromAXTextMarker(CFTypeRef textMarker, void *bytes, size_t length);
88CFTypeRef WKCreateAXTextMarkerRange(CFTypeRef start, CFTypeRef end);
89CFTypeRef WKCopyAXTextMarkerRangeStart(CFTypeRef range);
90CFTypeRef WKCopyAXTextMarkerRangeEnd(CFTypeRef range);
91void WKAccessibilityHandleFocusChanged(void);
92AXUIElementRef WKCreateAXUIElementRef(id element);
93void WKUnregisterUniqueIdForElement(id element);
94
95BOOL WKShouldBlockPlugin(NSString *bundleIdentifier, NSString *bundleVersionString);
96
97#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
98// Remote Accessibility API.
99void WKAXRegisterRemoteApp(void);
100void WKAXInitializeElementWithPresenterPid(id, pid_t);
101NSData *WKAXRemoteTokenForElement(id);
102id WKAXRemoteElementForToken(NSData *);
103void WKAXSetWindowForRemoteElement(id remoteWindow, id remoteElement);
104void WKAXRegisterRemoteProcess(bool registerProcess, pid_t);
105pid_t WKAXRemoteProcessIdentifier(id remoteElement);
106#endif
107
108void WKSetUpFontCache(void);
109
110void WKSignalCFReadStreamEnd(CFReadStreamRef stream);
111void WKSignalCFReadStreamHasBytes(CFReadStreamRef stream);
112void WKSignalCFReadStreamError(CFReadStreamRef stream, CFStreamError *error);
113
114CFReadStreamRef WKCreateCustomCFReadStream(void *(*formCreate)(CFReadStreamRef, void *), 
115    void (*formFinalize)(CFReadStreamRef, void *), 
116    Boolean (*formOpen)(CFReadStreamRef, CFStreamError *, Boolean *, void *), 
117    CFIndex (*formRead)(CFReadStreamRef, UInt8 *, CFIndex, CFStreamError *, Boolean *, void *), 
118    Boolean (*formCanRead)(CFReadStreamRef, void *), 
119    void (*formClose)(CFReadStreamRef, void *), 
120    void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *), 
121    void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
122    void *context);
123
124void WKDrawCapsLockIndicator(CGContextRef, CGRect);
125
126void WKDrawFocusRing(CGContextRef context, CGColorRef color, int radius);
127    // The CG context's current path is the focus ring's path.
128    // A color of 0 means "use system focus ring color".
129    // A radius of 0 means "use default focus ring radius".
130
131void WKSetDragImage(NSImage *image, NSPoint offset);
132
133void WKDrawBezeledTextFieldCell(NSRect, BOOL enabled);
134void WKDrawTextFieldCellFocusRing(NSTextFieldCell*, NSRect);
135void WKDrawBezeledTextArea(NSRect, BOOL enabled);
136void WKPopupMenu(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
137void WKPopupContextMenu(NSMenu *menu, NSPoint screenLocation);
138void WKSendUserChangeNotifications(void);
139#ifndef __LP64__
140BOOL WKConvertNSEventToCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent);
141void WKSendKeyEventToTSM(NSEvent *theEvent);
142void WKCallDrawingNotification(CGrafPtr port, Rect *bounds);
143#endif
144
145BOOL WKGetGlyphTransformedAdvances(CGFontRef, NSFont*, CGAffineTransform *m, ATSGlyphRef *glyph, CGSize *advance);
146NSFont *WKGetFontInLanguageForRange(NSFont *font, NSString *string, NSRange range);
147NSFont *WKGetFontInLanguageForCharacter(NSFont *font, UniChar ch);
148void WKSetCGFontRenderingMode(CGContextRef cgContext, NSFont *font);
149BOOL WKCGContextGetShouldSmoothFonts(CGContextRef cgContext);
150
151
152void WKSetBaseCTM(CGContextRef, CGAffineTransform);
153void WKSetPatternPhaseInUserSpace(CGContextRef, CGPoint);
154CGAffineTransform WKGetUserToBaseCTM(CGContextRef);
155
156void WKGetGlyphsForCharacters(CGFontRef, const UniChar[], CGGlyph[], size_t);
157bool WKGetVerticalGlyphsForCharacters(CTFontRef, const UniChar[], CGGlyph[], size_t);
158
159CTLineRef WKCreateCTLineWithUniCharProvider(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*);
160#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
161CTTypesetterRef WKCreateCTTypesetterWithUniCharProviderAndOptions(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options);
162
163CGContextRef WKIOSurfaceContextCreate(IOSurfaceRef, unsigned width, unsigned height, CGColorSpaceRef);
164CGImageRef WKIOSurfaceContextCreateImage(CGContextRef context);
165#endif
166
167typedef enum {
168    WKPatternTilingNoDistortion,
169    WKPatternTilingConstantSpacingMinimalDistortion,
170    WKPatternTilingConstantSpacing
171} WKPatternTiling;
172
173CGPatternRef WKCGPatternCreateWithImageAndTransform(CGImageRef image, CGAffineTransform transform, int tiling);
174void WKCGContextResetClip(CGContextRef);
175
176#ifndef __LP64__
177NSEvent *WKCreateNSEventWithCarbonEvent(EventRef eventRef);
178NSEvent *WKCreateNSEventWithCarbonMouseMoveEvent(EventRef inEvent, NSWindow *window);
179NSEvent *WKCreateNSEventWithCarbonClickEvent(EventRef inEvent, WindowRef windowRef);
180#endif
181
182CGContextRef WKNSWindowOverrideCGContext(NSWindow *, CGContextRef);
183void WKNSWindowRestoreCGContext(NSWindow *, CGContextRef);
184
185void WKNSWindowMakeBottomCornersSquare(NSWindow *);
186
187// These constants match the ones used by ThemeScrollbarArrowStyle (some of the values are private, so we can't just
188// use that enum directly).
189typedef enum {
190    WKThemeScrollBarArrowsSingle     = 0,
191    WKThemeScrollBarArrowsLowerRight = 1,
192    WKThemeScrollBarArrowsDouble     = 2,
193    WKThemeScrollBarArrowsUpperLeft  = 3,
194} WKThemeScrollBarArrowStyle;
195
196OSStatus WKThemeDrawTrack(const HIThemeTrackDrawInfo* inDrawInfo, CGContextRef inContext, int inArrowStyle);
197
198
199BOOL WKCGContextIsBitmapContext(CGContextRef context);
200
201void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous);
202
203BOOL WKAppVersionCheckLessThan(NSString *, int, double);
204
205typedef enum {
206    WKMovieTypeUnknown,
207    WKMovieTypeDownload,
208    WKMovieTypeStoredStream,
209    WKMovieTypeLiveStream
210} WKMovieType;
211
212int WKQTMovieGetType(QTMovie* movie);
213
214BOOL WKQTMovieHasClosedCaptions(QTMovie* movie);
215void WKQTMovieSetShowClosedCaptions(QTMovie* movie, BOOL showClosedCaptions);
216void WKQTMovieSelectPreferredAlternates(QTMovie* movie);
217void WKQTMovieSelectPreferredAlternateTrackForMediaType(QTMovie* movie, NSString* mediaType);
218
219unsigned WKQTIncludeOnlyModernMediaFileTypes(void);
220int WKQTMovieDataRate(QTMovie* movie);
221float WKQTMovieMaxTimeLoaded(QTMovie* movie);
222float WKQTMovieMaxTimeSeekable(QTMovie* movie);
223NSString *WKQTMovieMaxTimeLoadedChangeNotification(void);
224void WKQTMovieViewSetDrawSynchronously(QTMovieView* view, BOOL sync);
225void WKQTMovieDisableComponent(uint32_t[5]);
226NSURL *WKQTMovieResolvedURL(QTMovie* movie);
227
228CFStringRef WKCopyFoundationCacheDirectory(void);
229
230#if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
231typedef struct __CFURLStorageSession* CFURLStorageSessionRef;
232#else
233typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
234#endif
235CFURLStorageSessionRef WKCreatePrivateStorageSession(CFStringRef);
236NSURLRequest *WKCopyRequestWithStorageSession(CFURLStorageSessionRef, NSURLRequest*);
237NSCachedURLResponse *WKCachedResponseForRequest(CFURLStorageSessionRef, NSURLRequest*);
238void WKSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef);
239
240typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
241CFHTTPCookieStorageRef WKCopyHTTPCookieStorage(CFURLStorageSessionRef);
242unsigned WKGetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef);
243void WKSetHTTPCookieAcceptPolicy(CFHTTPCookieStorageRef, unsigned policy);
244NSArray *WKHTTPCookiesForURL(CFHTTPCookieStorageRef, NSURL *);
245void WKSetHTTPCookiesForURL(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *);
246void WKDeleteHTTPCookie(CFHTTPCookieStorageRef, NSHTTPCookie *);
247
248CFHTTPCookieStorageRef WKGetDefaultHTTPCookieStorage(void);
249WKCFURLCredentialRef WKCopyCredentialFromCFPersistentStorage(CFURLProtectionSpaceRef);
250void WKSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool flag);
251CFArrayRef WKCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef);
252void WKCFURLRequestSetHTTPRequestBodyParts(CFMutableURLRequestRef, CFArrayRef bodyParts);
253
254void WKSetVisibleApplicationName(CFStringRef);
255
256typedef enum {
257    WKMediaUIPartFullscreenButton   = 0,
258    WKMediaUIPartMuteButton,
259    WKMediaUIPartPlayButton,
260    WKMediaUIPartSeekBackButton,
261    WKMediaUIPartSeekForwardButton,
262    WKMediaUIPartTimelineSlider,
263    WKMediaUIPartTimelineSliderThumb,
264    WKMediaUIPartRewindButton,
265    WKMediaUIPartSeekToRealtimeButton,
266    WKMediaUIPartShowClosedCaptionsButton,
267    WKMediaUIPartHideClosedCaptionsButton,
268    WKMediaUIPartUnMuteButton,
269    WKMediaUIPartPauseButton,
270    WKMediaUIPartBackground,
271    WKMediaUIPartCurrentTimeDisplay,
272    WKMediaUIPartTimeRemainingDisplay,
273    WKMediaUIPartStatusDisplay,
274    WKMediaUIPartControlsPanel,
275    WKMediaUIPartVolumeSliderContainer,
276    WKMediaUIPartVolumeSlider,
277    WKMediaUIPartVolumeSliderThumb,
278    WKMediaUIPartFullScreenVolumeSlider,
279    WKMediaUIPartFullScreenVolumeSliderThumb,
280    WKMediaUIPartVolumeSliderMuteButton,
281    WKMediaUIPartTextTrackDisplayContainer,
282    WKMediaUIPartTextTrackDisplay,
283    WKMediaUIPartExitFullscreenButton,
284} WKMediaUIPart;
285
286typedef enum {
287    WKMediaControllerThemeClassic   = 1,
288    WKMediaControllerThemeQuickTime = 2
289} WKMediaControllerThemeStyle;
290
291typedef enum {
292    WKMediaControllerFlagDisabled = 1 << 0,
293    WKMediaControllerFlagPressed = 1 << 1,
294    WKMediaControllerFlagDrawEndCaps = 1 << 3,
295    WKMediaControllerFlagFocused = 1 << 4
296} WKMediaControllerThemeState;
297
298BOOL WKMediaControllerThemeAvailable(int themeStyle);
299BOOL WKHitTestMediaUIPart(int part, int themeStyle, CGRect bounds, CGPoint point);
300void WKMeasureMediaUIPart(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
301void WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
302void WKDrawMediaSliderTrack(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
303NSView *WKCreateMediaUIBackgroundView(void);
304
305typedef enum {
306    WKMediaUIControlTimeline,
307    WKMediaUIControlSlider,
308    WKMediaUIControlPlayPauseButton,
309    WKMediaUIControlExitFullscreenButton,
310    WKMediaUIControlRewindButton,
311    WKMediaUIControlFastForwardButton,
312    WKMediaUIControlVolumeUpButton,
313    WKMediaUIControlVolumeDownButton
314} WKMediaUIControlType;
315   
316NSControl *WKCreateMediaUIControl(int controlType);
317
318NSArray *WKQTGetSitesInMediaDownloadCache();
319void WKQTClearMediaDownloadCacheForSite(NSString *site);
320void WKQTClearMediaDownloadCache();
321   
322#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
323mach_port_t WKInitializeRenderServer(void);
324   
325@class CALayer;
326
327CALayer *WKMakeRenderLayer(uint32_t contextID);
328   
329typedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef;
330
331WKSoftwareCARendererRef WKSoftwareCARendererCreate(uint32_t contextID);
332void WKSoftwareCARendererDestroy(WKSoftwareCARendererRef);
333void WKSoftwareCARendererRender(WKSoftwareCARendererRef, CGContextRef, CGRect);
334
335typedef struct __WKCARemoteLayerClientRef *WKCARemoteLayerClientRef;
336
337WKCARemoteLayerClientRef WKCARemoteLayerClientMakeWithServerPort(mach_port_t port);
338void WKCARemoteLayerClientInvalidate(WKCARemoteLayerClientRef);
339uint32_t WKCARemoteLayerClientGetClientId(WKCARemoteLayerClientRef);
340void WKCARemoteLayerClientSetLayer(WKCARemoteLayerClientRef, CALayer *);
341CALayer *WKCARemoteLayerClientGetLayer(WKCARemoteLayerClientRef);
342
343typedef struct __WKCAContextRef *WKCAContextRef;
344
345WKCAContextRef WKCAContextMakeRemoteWithServerPort(mach_port_t port);
346WKCAContextRef WKCAContextMakeRemoteForWindowServer(void);
347void WKCAContextInvalidate(WKCAContextRef);
348uint32_t WKCAContextGetContextId(WKCAContextRef);
349void WKCAContextSetLayer(WKCAContextRef, CALayer *);
350CALayer *WKCAContextGetLayer(WKCAContextRef);
351
352#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
353void WKCALayerEnumerateRectsBeingDrawnWithBlock(CALayer *layer, CGContextRef context, void (^block)(CGRect rect));
354#endif
355
356@class CARenderer;
357
358void WKCARendererAddChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
359void WKCARendererRemoveChangeNotificationObserver(CARenderer *, void (*callback)(void*), void* context);
360
361typedef struct __WKWindowBounceAnimationContext *WKWindowBounceAnimationContextRef;
362
363WKWindowBounceAnimationContextRef WKWindowBounceAnimationContextCreate(NSWindow *window);
364void WKWindowBounceAnimationContextDestroy(WKWindowBounceAnimationContextRef context);
365void WKWindowBounceAnimationSetAnimationProgress(WKWindowBounceAnimationContextRef context, double animationProgress);
366
367void WKWindowSetClipRect(NSWindow*, NSRect);
368
369#if defined(__x86_64__)
370#import <mach/mig.h>
371CFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort);
372#endif // defined(__x86_64__)
373
374NSUInteger WKGetInputPanelWindowStyle(void);
375UInt8 WKGetNSEventKeyChar(NSEvent *);
376#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
377
378@class CAPropertyAnimation;
379void WKSetCAAnimationValueFunction(CAPropertyAnimation*, NSString* function);
380
381unsigned WKInitializeMaximumHTTPConnectionCountPerHost(unsigned preferredConnectionCount);
382int WKGetHTTPPipeliningPriority(CFURLRequestRef);
383void WKSetHTTPPipeliningMaximumPriority(int maximumPriority);
384void WKSetHTTPPipeliningPriority(CFURLRequestRef, int priority);
385void WKSetHTTPPipeliningMinimumFastLanePriority(int priority);
386
387void WKSetCONNECTProxyForStream(CFReadStreamRef, CFStringRef proxyHost, CFNumberRef proxyPort);
388void WKSetCONNECTProxyAuthorizationForStream(CFReadStreamRef, CFStringRef proxyAuthorizationString);
389CFHTTPMessageRef WKCopyCONNECTProxyResponse(CFReadStreamRef, CFURLRef responseURL);
390
391#if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
392typedef enum {
393    WKEventPhaseNone = 0,
394    WKEventPhaseBegan = 1,
395    WKEventPhaseChanged = 2,
396    WKEventPhaseEnded = 3,
397} WKEventPhase;
398
399int WKGetNSEventMomentumPhase(NSEvent *);
400#endif
401
402void WKWindowSetAlpha(NSWindow *window, float alphaValue);
403void WKWindowSetScaledFrame(NSWindow *window, NSRect scaleFrame, NSRect nonScaledFrame);
404
405#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
406void WKSyncSurfaceToView(NSView *view);
407
408void WKEnableSettingCursorWhenInBackground(void);
409
410CFDictionaryRef WKNSURLRequestCreateSerializableRepresentation(NSURLRequest *request, CFTypeRef tokenNull);
411NSURLRequest *WKNSURLRequestFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
412
413CFDictionaryRef WKNSURLResponseCreateSerializableRepresentation(NSURLResponse *response, CFTypeRef tokenNull);
414NSURLResponse *WKNSURLResponseFromSerializableRepresentation(CFDictionaryRef representation, CFTypeRef tokenNull);
415
416#ifndef __LP64__
417ScriptCode WKGetScriptCodeFromCurrentKeyboardInputSource(void);
418#endif
419
420#endif
421
422#if MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
423CFIndex WKGetHyphenationLocationBeforeIndex(CFStringRef string, CFIndex index);
424#endif
425
426CFArrayRef WKCFURLCacheCopyAllHostNamesInPersistentStore(void);
427void WKCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostArray);   
428
429CFStringRef WKGetCFURLResponseMIMEType(CFURLResponseRef);
430CFURLRef WKGetCFURLResponseURL(CFURLResponseRef);
431CFHTTPMessageRef WKGetCFURLResponseHTTPResponse(CFURLResponseRef);
432CFStringRef WKCopyCFURLResponseSuggestedFilename(CFURLResponseRef);
433void WKSetCFURLResponseMIMEType(CFURLResponseRef, CFStringRef mimeType);
434
435CIFormat WKCIGetRGBA8Format(void);
436
437#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
438
439typedef enum {
440    WKSandboxExtensionTypeReadOnly,
441    WKSandboxExtensionTypeWriteOnly,   
442    WKSandboxExtensionTypeReadWrite,
443} WKSandboxExtensionType;
444typedef struct __WKSandboxExtension *WKSandboxExtensionRef;
445
446WKSandboxExtensionRef WKSandboxExtensionCreate(const char* path, WKSandboxExtensionType type);
447void WKSandboxExtensionDestroy(WKSandboxExtensionRef sandboxExtension);
448
449bool WKSandboxExtensionConsume(WKSandboxExtensionRef sandboxExtension);
450bool WKSandboxExtensionInvalidate(WKSandboxExtensionRef sandboxExtension);
451
452const char* WKSandboxExtensionGetSerializedFormat(WKSandboxExtensionRef sandboxExtension, size_t* length);
453WKSandboxExtensionRef WKSandboxExtensionCreateFromSerializedFormat(const char* serializationFormat, size_t length);
454
455OSStatus WKEnableSandboxStyleFileQuarantine(void);
456
457bool WKEnterPluginSandbox(const char* profile, const char* parameters[], const char* readOnlyPaths[], const char* readWritePaths[]);
458
459int WKRecommendedScrollerStyle(void);
460
461bool WKExecutableWasLinkedOnOrBeforeSnowLeopard(void);
462
463NSRange WKExtractWordDefinitionTokenRangeFromContextualString(NSString *contextString, NSRange range, NSDictionary **options);
464void WKShowWordDefinitionWindow(NSAttributedString *term, NSPoint screenPoint, NSDictionary *options);
465void WKHideWordDefinitionWindow(void);
466
467CFStringRef WKCopyDefaultSearchProviderDisplayName(void);
468
469NSURL* WKAVAssetResolvedURL(AVAsset*);
470
471NSCursor *WKCursor(const char *name);
472
473#endif
474
475#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
476
477#import <dispatch/dispatch.h>
478
479dispatch_source_t WKCreateVMPressureDispatchOnMainQueue(void);
480
481#endif
482
483#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
484NSString *WKGetMacOSXVersionString(void);
485bool WKExecutableWasLinkedOnOrBeforeLion(void);
486#endif
487
488#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
489void WKCGPathAddRoundedRect(CGMutablePathRef path, const CGAffineTransform* matrix, CGRect rect, CGFloat cornerWidth, CGFloat cornerHeight);
490#endif
491
492#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
493void WKCFURLRequestAllowAllPostCaching(CFURLRequestRef);
494#endif
495
496#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
497@class WebFilterEvaluator;
498
499BOOL WKFilterIsManagedSession(void);
500WebFilterEvaluator *WKFilterCreateInstance(NSURLResponse *);
501void WKFilterRelease(WebFilterEvaluator *);
502BOOL WKFilterWasBlocked(WebFilterEvaluator *);
503const char* WKFilterAddData(WebFilterEvaluator *, const char* data, int* length);
504const char* WKFilterDataComplete(WebFilterEvaluator *, int* length);
505#endif
506
507#ifdef __cplusplus
508}
509#endif
Note: See TracBrowser for help on using the browser.