Set minimum priority for fast lane connections
[WebKit-https.git] / Source / WebKit2 / WebProcess / WebCoreSupport / mac / WebSystemInterface.mm
1 /*
2  * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23  * THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 #import "config.h"
27 #import "WebSystemInterface.h"
28
29 #import <WebCore/WebCoreSystemInterface.h>
30 #import <WebKitSystemInterface.h>
31
32 #define INIT(function) wk##function = WK##function
33
34 void InitWebCoreSystemInterface(void)
35 {
36     static dispatch_once_t initOnce;
37     
38     dispatch_once(&initOnce, ^{
39         INIT(AdvanceDefaultButtonPulseAnimation);
40         INIT(CopyCFLocalizationPreferredName);
41         INIT(CGContextGetShouldSmoothFonts);
42         INIT(CopyCONNECTProxyResponse);
43         INIT(CopyNSURLResponseStatusLine);
44         INIT(CreateCTLineWithUniCharProvider);
45         INIT(CreateCustomCFReadStream);
46         INIT(CreateNSURLConnectionDelegateProxy);
47         INIT(DrawBezeledTextArea);
48         INIT(DrawBezeledTextFieldCell);
49         INIT(DrawCapsLockIndicator);
50         INIT(DrawFocusRing);
51         INIT(DrawMediaSliderTrack);
52         INIT(DrawMediaUIPart);
53         INIT(DrawTextFieldCellFocusRing);
54         INIT(GetExtensionsForMIMEType);
55         INIT(GetFontInLanguageForCharacter);
56         INIT(GetFontInLanguageForRange);
57         INIT(GetGlyphTransformedAdvances);
58         INIT(GetGlyphsForCharacters);
59         INIT(GetHTTPPipeliningPriority);
60         INIT(GetMIMETypeForExtension);
61         INIT(GetNSURLResponseLastModifiedDate);
62         INIT(SignedPublicKeyAndChallengeString);
63         INIT(GetPreferredExtensionForMIMEType);
64         INIT(GetUserToBaseCTM);
65         INIT(GetWheelEventDeltas);
66         INIT(HitTestMediaUIPart);
67         INIT(InitializeMaximumHTTPConnectionCountPerHost);
68         INIT(MeasureMediaUIPart);
69         INIT(MediaControllerThemeAvailable);
70         INIT(PopupMenu);
71         INIT(QTIncludeOnlyModernMediaFileTypes);
72         INIT(QTMovieDataRate);
73         INIT(QTMovieDisableComponent);
74         INIT(QTMovieGetType);
75         INIT(QTMovieHasClosedCaptions);
76         INIT(QTMovieMaxTimeLoaded);
77         INIT(QTMovieMaxTimeLoadedChangeNotification);
78         INIT(QTMovieMaxTimeSeekable);
79         INIT(QTMovieSelectPreferredAlternates);
80         INIT(QTMovieSetShowClosedCaptions);
81         INIT(QTMovieViewSetDrawSynchronously);
82         INIT(SetCGFontRenderingMode);
83         INIT(SetCONNECTProxyAuthorizationForStream);
84         INIT(SetCONNECTProxyForStream);
85         INIT(SetCookieStoragePrivateBrowsingEnabled);
86         INIT(SetDragImage);
87         INIT(SetHTTPPipeliningMaximumPriority);
88         INIT(SetHTTPPipeliningPriority);
89         INIT(SetHTTPPipeliningMinimumFastLanePriority);
90         INIT(SetNSURLConnectionDefersCallbacks);
91         INIT(SetNSURLRequestShouldContentSniff);
92         INIT(SetPatternBaseCTM);
93         INIT(SetPatternPhaseInUserSpace);
94         INIT(SetUpFontCache);
95         INIT(SignalCFReadStreamEnd);
96         INIT(SignalCFReadStreamError);
97         INIT(SignalCFReadStreamHasBytes);
98         INIT(CreatePrivateStorageSession);
99         INIT(CopyRequestWithStorageSession);
100         INIT(CopyHTTPCookieStorage);
101         INIT(GetHTTPCookieAcceptPolicy);
102         INIT(HTTPCookiesForURL);
103         INIT(SetHTTPCookiesForURL);
104         INIT(DeleteHTTPCookie);
105
106 #if !defined(BUILDING_ON_SNOW_LEOPARD)
107         INIT(IOSurfaceContextCreate);
108         INIT(IOSurfaceContextCreateImage);
109         INIT(CreateCTTypesetterWithUniCharProviderAndOptions);
110         INIT(MakeScrollbarPainter);
111         INIT(ScrollbarPainterSetDelegate);
112         INIT(ScrollbarPainterPaint);
113         INIT(ScrollbarPainterForceFlashScrollers);
114         INIT(ScrollbarThickness);
115         INIT(ScrollbarMinimumThumbLength);
116         INIT(ScrollbarMinimumTotalLengthNeededForThumb);
117         INIT(ScrollbarPainterKnobAlpha);
118         INIT(SetScrollbarPainterKnobAlpha);
119         INIT(ScrollbarPainterTrackAlpha);
120         INIT(SetScrollbarPainterTrackAlpha);
121         INIT(ScrollbarPainterIsHorizontal);
122         INIT(ScrollbarPainterSetOverlayState);
123         INIT(MakeScrollbarPainterController);
124         INIT(MakeScrollbarReplacementPainter);
125         INIT(SetPainterForPainterController);
126         INIT(VerticalScrollbarPainterForController);
127         INIT(HorizontalScrollbarPainterForController);
128         INIT(SetScrollbarPainterControllerStyle);
129         INIT(ContentAreaScrolled);
130         INIT(ContentAreaWillPaint);
131         INIT(MouseEnteredContentArea);
132         INIT(MouseExitedContentArea);
133         INIT(MouseMovedInContentArea);
134         INIT(WillStartLiveResize);
135         INIT(ContentAreaResized);
136         INIT(WillEndLiveResize);
137         INIT(ContentAreaDidShow);
138         INIT(ContentAreaDidHide);
139         INIT(DidBeginScrollGesture);
140         INIT(DidEndScrollGesture);
141         INIT(ScrollbarPainterUsesOverlayScrollers);
142 #else
143         INIT(GetHyphenationLocationBeforeIndex);
144         INIT(GetNSEventMomentumPhase);
145 #endif
146         
147         INIT(GetAXTextMarkerTypeID);
148         INIT(GetAXTextMarkerRangeTypeID);
149         INIT(CreateAXTextMarker);
150         INIT(GetBytesFromAXTextMarker);
151         INIT(CreateAXTextMarkerRange);
152         INIT(CopyAXTextMarkerRangeStart);
153         INIT(CopyAXTextMarkerRangeEnd);
154         INIT(AccessibilityHandleFocusChanged);
155         INIT(CreateAXUIElementRef);
156         INIT(UnregisterUniqueIdForElement);        
157
158         INIT(GetCFURLResponseMIMEType);
159         INIT(GetCFURLResponseURL);
160         INIT(GetCFURLResponseHTTPResponse);
161         INIT(CopyCFURLResponseSuggestedFilename);
162         INIT(SetCFURLResponseMIMEType);
163     });
164 }