tizen beta release
[profile/ivi/webkit-efl.git] / Source / WebKit / mac / WebView / WebPreferencesPrivate.h
1 /*
2  * Copyright (C) 2005, 2007, 2011 Apple Computer, 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  *
8  * 1.  Redistributions of source code must retain the above copyright
9  *     notice, this list of conditions and the following disclaimer. 
10  * 2.  Redistributions in binary form must reproduce the above copyright
11  *     notice, this list of conditions and the following disclaimer in the
12  *     documentation and/or other materials provided with the distribution. 
13  * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
14  *     its contributors may be used to endorse or promote products derived
15  *     from this software without specific prior written permission. 
16  *
17  * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
18  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20  * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28
29 #import <WebKit/WebPreferences.h>
30 #import <Quartz/Quartz.h>
31
32 typedef enum {
33     WebKitEditableLinkDefaultBehavior,
34     WebKitEditableLinkAlwaysLive,
35     WebKitEditableLinkOnlyLiveWithShiftKey,
36     WebKitEditableLinkLiveWhenNotFocused,
37     WebKitEditableLinkNeverLive
38 } WebKitEditableLinkBehavior;
39
40 typedef enum {
41     WebTextDirectionSubmenuNeverIncluded,
42     WebTextDirectionSubmenuAutomaticallyIncluded,
43     WebTextDirectionSubmenuAlwaysIncluded
44 } WebTextDirectionSubmenuInclusionBehavior;
45
46 typedef enum {
47     WebKitEditingMacBehavior,
48     WebKitEditingWinBehavior,
49     WebKitEditingUnixBehavior
50 } WebKitEditingBehavior;
51
52 extern NSString *WebPreferencesChangedNotification;
53 extern NSString *WebPreferencesRemovedNotification;
54 extern NSString *WebPreferencesChangedInternalNotification;
55
56 @interface WebPreferences (WebPrivate)
57
58 // Preferences that might be public in a future release
59
60 - (BOOL)isDNSPrefetchingEnabled;
61 - (void)setDNSPrefetchingEnabled:(BOOL)flag;
62
63 - (BOOL)developerExtrasEnabled;
64 - (void)setDeveloperExtrasEnabled:(BOOL)flag;
65
66 - (BOOL)authorAndUserStylesEnabled;
67 - (void)setAuthorAndUserStylesEnabled:(BOOL)flag;
68
69 - (BOOL)applicationChromeModeEnabled;
70 - (void)setApplicationChromeModeEnabled:(BOOL)flag;
71
72 - (BOOL)usesEncodingDetector;
73 - (void)setUsesEncodingDetector:(BOOL)flag;
74
75 - (BOOL)respectStandardStyleKeyEquivalents;
76 - (void)setRespectStandardStyleKeyEquivalents:(BOOL)flag;
77
78 - (BOOL)showsURLsInToolTips;
79 - (void)setShowsURLsInToolTips:(BOOL)flag;
80
81 - (BOOL)showsToolTipOverTruncatedText;
82 - (void)setShowsToolTipOverTruncatedText:(BOOL)flag;
83
84 - (BOOL)textAreasAreResizable;
85 - (void)setTextAreasAreResizable:(BOOL)flag;
86
87 - (PDFDisplayMode)PDFDisplayMode;
88 - (void)setPDFDisplayMode:(PDFDisplayMode)mode;
89
90 - (BOOL)shrinksStandaloneImagesToFit;
91 - (void)setShrinksStandaloneImagesToFit:(BOOL)flag;
92
93 - (BOOL)automaticallyDetectsCacheModel;
94 - (void)setAutomaticallyDetectsCacheModel:(BOOL)automaticallyDetectsCacheModel;
95
96 - (BOOL)webArchiveDebugModeEnabled;
97 - (void)setWebArchiveDebugModeEnabled:(BOOL)webArchiveDebugModeEnabled;
98
99 - (BOOL)localFileContentSniffingEnabled;
100 - (void)setLocalFileContentSniffingEnabled:(BOOL)localFileContentSniffingEnabled;
101
102 - (BOOL)offlineWebApplicationCacheEnabled;
103 - (void)setOfflineWebApplicationCacheEnabled:(BOOL)offlineWebApplicationCacheEnabled;
104
105 - (BOOL)databasesEnabled;
106 - (void)setDatabasesEnabled:(BOOL)databasesEnabled;
107
108 - (BOOL)localStorageEnabled;
109 - (void)setLocalStorageEnabled:(BOOL)localStorageEnabled;
110
111 - (BOOL)isWebSecurityEnabled;
112 - (void)setWebSecurityEnabled:(BOOL)flag;
113
114 - (BOOL)allowUniversalAccessFromFileURLs;
115 - (void)setAllowUniversalAccessFromFileURLs:(BOOL)flag;
116
117 - (BOOL)allowFileAccessFromFileURLs;
118 - (void)setAllowFileAccessFromFileURLs:(BOOL)flag;
119
120 - (BOOL)zoomsTextOnly;
121 - (void)setZoomsTextOnly:(BOOL)zoomsTextOnly;
122
123 - (BOOL)javaScriptCanAccessClipboard;
124 - (void)setJavaScriptCanAccessClipboard:(BOOL)flag;
125
126 - (BOOL)isXSSAuditorEnabled;
127 - (void)setXSSAuditorEnabled:(BOOL)flag;
128
129 - (BOOL)experimentalNotificationsEnabled;
130 - (void)setExperimentalNotificationsEnabled:(BOOL)notificationsEnabled;
131
132 - (BOOL)isFrameFlatteningEnabled;
133 - (void)setFrameFlatteningEnabled:(BOOL)flag;
134
135 - (BOOL)isSpatialNavigationEnabled;
136 - (void)setSpatialNavigationEnabled:(BOOL)flag;
137
138 // zero means do AutoScale
139 - (float)PDFScaleFactor;
140 - (void)setPDFScaleFactor:(float)scale;
141
142 - (int64_t)applicationCacheTotalQuota;
143 - (void)setApplicationCacheTotalQuota:(int64_t)quota;
144
145 - (int64_t)applicationCacheDefaultOriginQuota;
146 - (void)setApplicationCacheDefaultOriginQuota:(int64_t)quota;
147
148 - (WebKitEditableLinkBehavior)editableLinkBehavior;
149 - (void)setEditableLinkBehavior:(WebKitEditableLinkBehavior)behavior;
150
151 - (WebKitEditingBehavior)editingBehavior;
152 - (void)setEditingBehavior:(WebKitEditingBehavior)behavior;
153
154 - (WebTextDirectionSubmenuInclusionBehavior)textDirectionSubmenuInclusionBehavior;
155 - (void)setTextDirectionSubmenuInclusionBehavior:(WebTextDirectionSubmenuInclusionBehavior)behavior;
156
157 // Used to set preference specified in the test via LayoutTestController.overridePreference(..).
158 // For use with DumpRenderTree only.
159 - (void)_setPreferenceForTestWithValue:(NSString *)value forKey:(NSString *)key;
160
161 // If site-specific spoofing is enabled, some pages that do inappropriate user-agent string checks will be
162 // passed a nonstandard user-agent string to get them to work correctly. This method might be removed in
163 // the future when there's no more need for it.
164 - (BOOL)_useSiteSpecificSpoofing;
165 - (void)_setUseSiteSpecificSpoofing:(BOOL)newValue;
166
167 // WARNING: Allowing paste through the DOM API opens a security hole. We only use it for testing purposes.
168 - (BOOL)isDOMPasteAllowed;
169 - (void)setDOMPasteAllowed:(BOOL)DOMPasteAllowed;
170
171 - (NSString *)_ftpDirectoryTemplatePath;
172 - (void)_setFTPDirectoryTemplatePath:(NSString *)path;
173
174 - (void)_setForceFTPDirectoryListings:(BOOL)force;
175 - (BOOL)_forceFTPDirectoryListings;
176
177 - (NSString *)_localStorageDatabasePath;
178 - (void)_setLocalStorageDatabasePath:(NSString *)path;
179
180 - (BOOL)acceleratedDrawingEnabled;
181 - (void)setAcceleratedDrawingEnabled:(BOOL)enabled;
182
183 - (BOOL)canvasUsesAcceleratedDrawing;
184 - (void)setCanvasUsesAcceleratedDrawing:(BOOL)enabled;
185
186 - (BOOL)acceleratedCompositingEnabled;
187 - (void)setAcceleratedCompositingEnabled:(BOOL)enabled;
188
189 - (BOOL)showDebugBorders;
190 - (void)setShowDebugBorders:(BOOL)show;
191
192 - (BOOL)showRepaintCounter;
193 - (void)setShowRepaintCounter:(BOOL)show;
194
195 - (BOOL)webAudioEnabled;
196 - (void)setWebAudioEnabled:(BOOL)enabled;
197
198 - (BOOL)webGLEnabled;
199 - (void)setWebGLEnabled:(BOOL)enabled;
200
201 - (BOOL)accelerated2dCanvasEnabled;
202 - (void)setAccelerated2dCanvasEnabled:(BOOL)enabled;
203
204 - (BOOL)paginateDuringLayoutEnabled;
205 - (void)setPaginateDuringLayoutEnabled:(BOOL)flag;
206
207 - (BOOL)memoryInfoEnabled;
208 - (void)setMemoryInfoEnabled:(BOOL)enabled;
209
210 - (BOOL)hyperlinkAuditingEnabled;
211 - (void)setHyperlinkAuditingEnabled:(BOOL)enabled;
212
213 - (void)setMediaPlaybackRequiresUserGesture:(BOOL)flag;
214 - (BOOL)mediaPlaybackRequiresUserGesture;
215
216 - (void)setMediaPlaybackAllowsInline:(BOOL)flag;
217 - (BOOL)mediaPlaybackAllowsInline;
218
219 - (NSString *)pictographFontFamily;
220 - (void)setPictographFontFamily:(NSString *)family;
221
222 // This is a global setting.
223 - (BOOL)mockScrollbarsEnabled;
224 - (void)setMockScrollbarsEnabled:(BOOL)flag;
225
226 // Other private methods
227 - (void)_postPreferencesChangedNotification;
228 - (void)_postPreferencesChangedAPINotification;
229 + (WebPreferences *)_getInstanceForIdentifier:(NSString *)identifier;
230 + (void)_setInstance:(WebPreferences *)instance forIdentifier:(NSString *)identifier;
231 + (void)_removeReferenceForIdentifier:(NSString *)identifier;
232 - (NSTimeInterval)_backForwardCacheExpirationInterval;
233 + (CFStringEncoding)_systemCFStringEncoding;
234 + (void)_setInitialDefaultTextEncodingToSystemEncoding;
235 + (void)_setIBCreatorID:(NSString *)string;
236 + (void)_switchNetworkLoaderToNewTestingSession;
237 + (void)_setCurrentNetworkLoaderSessionCookieAcceptPolicy:(NSHTTPCookieAcceptPolicy)cookieAcceptPolicy;
238
239 + (void)setWebKitLinkTimeVersion:(int)version;
240
241 // For WebView's use only.
242 - (void)willAddToWebView;
243 - (void)didRemoveFromWebView;
244
245 // Full screen support is dependent on WebCore/WebKit being
246 // compiled with ENABLE_FULLSCREEN_API. 
247 - (void)setFullScreenEnabled:(BOOL)flag;
248 - (BOOL)fullScreenEnabled;
249
250 - (void)setAsynchronousSpellCheckingEnabled:(BOOL)flag;
251 - (BOOL)asynchronousSpellCheckingEnabled;
252
253 - (void)setUsePreHTML5ParserQuirks:(BOOL)flag;
254 - (BOOL)usePreHTML5ParserQuirks;
255
256 - (void)setLoadsSiteIconsIgnoringImageLoadingPreference: (BOOL)flag;
257 - (BOOL)loadsSiteIconsIgnoringImageLoadingPreference;
258
259 // AVFoundation support is dependent on WebCore/WebKit being
260 // compiled with USE_AVFOUNDATION.
261 - (void)setAVFoundationEnabled:(BOOL)flag;
262 - (BOOL)isAVFoundationEnabled;
263
264 // WebSocket support depends on ENABLE(WEB_SOCKETS).
265 - (void)setHixie76WebSocketProtocolEnabled:(BOOL)flag;
266 - (BOOL)isHixie76WebSocketProtocolEnabled;
267
268 - (void)setSuppressIncrementalRendering:(BOOL)flag;
269 - (BOOL)suppressIncrementalRendering;
270
271 - (void)setBackspaceKeyNavigationEnabled:(BOOL)flag;
272 - (BOOL)backspaceKeyNavigationEnabled;
273
274 @end