OSDN Git Service

Merge Webkit at r70949: Initial merge by git.
[android-x86/external-webkit.git] / WebKit / mac / WebView / WebPreferencesPrivate.h
1 /*
2  * Copyright (C) 2005, 2007 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 } WebKitEditingBehavior;
50
51 extern NSString *WebPreferencesChangedNotification;
52 extern NSString *WebPreferencesRemovedNotification;
53
54 @interface WebPreferences (WebPrivate)
55
56 // Preferences that might be public in a future release
57
58 - (BOOL)isDNSPrefetchingEnabled;
59 - (void)setDNSPrefetchingEnabled:(BOOL)flag;
60
61 - (BOOL)developerExtrasEnabled;
62 - (void)setDeveloperExtrasEnabled:(BOOL)flag;
63
64 - (BOOL)authorAndUserStylesEnabled;
65 - (void)setAuthorAndUserStylesEnabled:(BOOL)flag;
66
67 - (BOOL)applicationChromeModeEnabled;
68 - (void)setApplicationChromeModeEnabled:(BOOL)flag;
69
70 - (BOOL)usesEncodingDetector;
71 - (void)setUsesEncodingDetector:(BOOL)flag;
72
73 - (BOOL)respectStandardStyleKeyEquivalents;
74 - (void)setRespectStandardStyleKeyEquivalents:(BOOL)flag;
75
76 - (BOOL)showsURLsInToolTips;
77 - (void)setShowsURLsInToolTips:(BOOL)flag;
78
79 - (BOOL)textAreasAreResizable;
80 - (void)setTextAreasAreResizable:(BOOL)flag;
81
82 - (PDFDisplayMode)PDFDisplayMode;
83 - (void)setPDFDisplayMode:(PDFDisplayMode)mode;
84
85 - (BOOL)shrinksStandaloneImagesToFit;
86 - (void)setShrinksStandaloneImagesToFit:(BOOL)flag;
87
88 - (BOOL)automaticallyDetectsCacheModel;
89 - (void)setAutomaticallyDetectsCacheModel:(BOOL)automaticallyDetectsCacheModel;
90
91 - (BOOL)webArchiveDebugModeEnabled;
92 - (void)setWebArchiveDebugModeEnabled:(BOOL)webArchiveDebugModeEnabled;
93
94 - (BOOL)localFileContentSniffingEnabled;
95 - (void)setLocalFileContentSniffingEnabled:(BOOL)localFileContentSniffingEnabled;
96
97 - (BOOL)offlineWebApplicationCacheEnabled;
98 - (void)setOfflineWebApplicationCacheEnabled:(BOOL)offlineWebApplicationCacheEnabled;
99
100 - (BOOL)databasesEnabled;
101 - (void)setDatabasesEnabled:(BOOL)databasesEnabled;
102
103 - (BOOL)localStorageEnabled;
104 - (void)setLocalStorageEnabled:(BOOL)localStorageEnabled;
105
106 - (BOOL)isWebSecurityEnabled;
107 - (void)setWebSecurityEnabled:(BOOL)flag;
108
109 - (BOOL)allowUniversalAccessFromFileURLs;
110 - (void)setAllowUniversalAccessFromFileURLs:(BOOL)flag;
111
112 - (BOOL)allowFileAccessFromFileURLs;
113 - (void)setAllowFileAccessFromFileURLs:(BOOL)flag;
114
115 - (BOOL)zoomsTextOnly;
116 - (void)setZoomsTextOnly:(BOOL)zoomsTextOnly;
117
118 - (BOOL)javaScriptCanAccessClipboard;
119 - (void)setJavaScriptCanAccessClipboard:(BOOL)flag;
120
121 - (BOOL)isXSSAuditorEnabled;
122 - (void)setXSSAuditorEnabled:(BOOL)flag;
123
124 - (BOOL)experimentalNotificationsEnabled;
125 - (void)setExperimentalNotificationsEnabled:(BOOL)notificationsEnabled;
126
127 - (unsigned)pluginAllowedRunTime;
128 - (void)setPluginAllowedRunTime:(unsigned)allowedRunTime;
129
130 - (BOOL)isFrameFlatteningEnabled;
131 - (void)setFrameFlatteningEnabled:(BOOL)flag;
132
133 - (BOOL)isSpatialNavigationEnabled;
134 - (void)setSpatialNavigationEnabled:(BOOL)flag;
135
136 // zero means do AutoScale
137 - (float)PDFScaleFactor;
138 - (void)setPDFScaleFactor:(float)scale;
139
140 - (int64_t)applicationCacheTotalQuota;
141 - (void)setApplicationCacheTotalQuota:(int64_t)quota;
142
143 - (int64_t)applicationCacheDefaultOriginQuota;
144 - (void)setApplicationCacheDefaultOriginQuota:(int64_t)quota;
145
146 - (WebKitEditableLinkBehavior)editableLinkBehavior;
147 - (void)setEditableLinkBehavior:(WebKitEditableLinkBehavior)behavior;
148
149 - (WebKitEditingBehavior)editingBehavior;
150 - (void)setEditingBehavior:(WebKitEditingBehavior)behavior;
151
152 - (WebTextDirectionSubmenuInclusionBehavior)textDirectionSubmenuInclusionBehavior;
153 - (void)setTextDirectionSubmenuInclusionBehavior:(WebTextDirectionSubmenuInclusionBehavior)behavior;
154
155 // Used to set preference specified in the test via LayoutTestController.overridePreference(..).
156 // For use with DumpRenderTree only.
157 - (void)_setPreferenceForTestWithValue:(NSString *)value forKey:(NSString *)key;
158
159 // If site-specific spoofing is enabled, some pages that do inappropriate user-agent string checks will be
160 // passed a nonstandard user-agent string to get them to work correctly. This method might be removed in
161 // the future when there's no more need for it.
162 - (BOOL)_useSiteSpecificSpoofing;
163 - (void)_setUseSiteSpecificSpoofing:(BOOL)newValue;
164
165 // WARNING: Allowing paste through the DOM API opens a security hole. We only use it for testing purposes.
166 - (BOOL)isDOMPasteAllowed;
167 - (void)setDOMPasteAllowed:(BOOL)DOMPasteAllowed;
168
169 - (NSString *)_ftpDirectoryTemplatePath;
170 - (void)_setFTPDirectoryTemplatePath:(NSString *)path;
171
172 - (void)_setForceFTPDirectoryListings:(BOOL)force;
173 - (BOOL)_forceFTPDirectoryListings;
174
175 - (NSString *)_localStorageDatabasePath;
176 - (void)_setLocalStorageDatabasePath:(NSString *)path;
177
178 - (BOOL)acceleratedCompositingEnabled;
179 - (void)setAcceleratedCompositingEnabled:(BOOL)enabled;
180
181 - (BOOL)showDebugBorders;
182 - (void)setShowDebugBorders:(BOOL)show;
183
184 - (BOOL)showRepaintCounter;
185 - (void)setShowRepaintCounter:(BOOL)show;
186
187 - (BOOL)webGLEnabled;
188 - (void)setWebGLEnabled:(BOOL)enabled;
189
190 - (BOOL)accelerated2dCanvasEnabled;
191 - (void)setAccelerated2dCanvasEnabled:(BOOL)enabled;
192
193 - (BOOL)paginateDuringLayoutEnabled;
194 - (void)setPaginateDuringLayoutEnabled:(BOOL)flag;
195
196 - (BOOL)memoryInfoEnabled;
197 - (void)setMemoryInfoEnabled:(BOOL)enabled;
198
199 - (BOOL)hyperlinkAuditingEnabled;
200 - (void)setHyperlinkAuditingEnabled:(BOOL)enabled;
201
202 // Other private methods
203 - (void)_postPreferencesChangesNotification;
204 + (WebPreferences *)_getInstanceForIdentifier:(NSString *)identifier;
205 + (void)_setInstance:(WebPreferences *)instance forIdentifier:(NSString *)identifier;
206 + (void)_removeReferenceForIdentifier:(NSString *)identifier;
207 - (NSTimeInterval)_backForwardCacheExpirationInterval;
208 + (CFStringEncoding)_systemCFStringEncoding;
209 + (void)_setInitialDefaultTextEncodingToSystemEncoding;
210 + (void)_setIBCreatorID:(NSString *)string;
211
212 + (void)setWebKitLinkTimeVersion:(int)version;
213
214 // For WebView's use only.
215 - (void)willAddToWebView;
216 - (void)didRemoveFromWebView;
217
218 // Full screen support is dependent on WebCore/WebKit being
219 // compiled with ENABLE_FULLSCREEN_API. 
220 - (void)setFullScreenEnabled:(BOOL)flag;
221 - (BOOL)fullScreenEnabled;
222
223 - (void)setUsePreHTML5ParserQuirks:(BOOL)flag;
224 - (BOOL)usePreHTML5ParserQuirks;
225
226 @end