2 * Copyright (C) 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
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.
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.
26 #ifndef WebProcessCreationParameters_h
27 #define WebProcessCreationParameters_h
29 #include "CacheModel.h"
30 #include "SandboxExtension.h"
31 #include "TextCheckerState.h"
32 #include <WebCore/SessionIDHash.h>
33 #include <wtf/RetainPtr.h>
34 #include <wtf/Vector.h>
35 #include <wtf/text/StringHash.h>
36 #include <wtf/text/WTFString.h>
44 #include "HTTPCookieAcceptPolicy.h"
52 class ArgumentDecoder;
53 class ArgumentEncoder;
58 struct WebProcessCreationParameters {
59 WebProcessCreationParameters();
61 void encode(IPC::ArgumentEncoder&) const;
62 static bool decode(IPC::ArgumentDecoder&, WebProcessCreationParameters&);
64 String injectedBundlePath;
65 SandboxExtension::Handle injectedBundlePathExtensionHandle;
67 String applicationCacheDirectory;
68 SandboxExtension::Handle applicationCacheDirectoryExtensionHandle;
69 String webSQLDatabaseDirectory;
70 SandboxExtension::Handle webSQLDatabaseDirectoryExtensionHandle;
71 String diskCacheDirectory;
72 SandboxExtension::Handle diskCacheDirectoryExtensionHandle;
73 String cookieStorageDirectory;
74 SandboxExtension::Handle cookieStorageDirectoryExtensionHandle;
75 String openGLCacheDirectory;
76 SandboxExtension::Handle openGLCacheDirectoryExtensionHandle;
77 String containerTemporaryDirectory;
78 SandboxExtension::Handle containerTemporaryDirectoryExtensionHandle;
81 // FIXME: Remove this once <rdar://problem/17726660> is fixed.
82 String hstsDatabasePath;
83 SandboxExtension::Handle hstsDatabasePathExtensionHandle;
86 bool shouldUseTestingNetworkSession;
88 Vector<String> urlSchemesRegistererdAsEmptyDocument;
89 Vector<String> urlSchemesRegisteredAsSecure;
90 Vector<String> urlSchemesForWhichDomainRelaxationIsForbidden;
91 Vector<String> urlSchemesRegisteredAsLocal;
92 Vector<String> urlSchemesRegisteredAsNoAccess;
93 Vector<String> urlSchemesRegisteredAsDisplayIsolated;
94 Vector<String> urlSchemesRegisteredAsCORSEnabled;
95 #if ENABLE(CACHE_PARTITIONING)
96 Vector<String> urlSchemesRegisteredAsCachePartitioned;
98 #if ENABLE(CUSTOM_PROTOCOLS)
99 Vector<String> urlSchemesRegisteredForCustomProtocols;
102 #if !ENABLE(CUSTOM_PROTOCOLS)
103 Vector<String> urlSchemesRegistered;
105 String cookiePersistentStoragePath;
106 uint32_t cookiePersistentStorageType;
107 HTTPCookieAcceptPolicy cookieAcceptPolicy;
108 bool ignoreTLSErrors;
111 CacheModel cacheModel;
113 bool shouldAlwaysUseComplexTextCodePath;
114 bool shouldUseFontSmoothing;
116 bool iconDatabaseEnabled;
118 double terminationTimeout;
120 Vector<String> languages;
122 TextCheckerState textCheckerState;
124 bool fullKeyboardAccessEnabled;
126 double defaultRequestTimeoutInterval;
128 #if PLATFORM(COCOA) || USE(CFNETWORK)
129 String uiProcessBundleIdentifier;
133 pid_t presenterApplicationPid;
135 bool accessibilityEnhancedUserInterfaceEnabled;
137 uint64_t nsURLCacheMemoryCapacity;
138 uint64_t nsURLCacheDiskCapacity;
140 IPC::MachPort acceleratedCompositingPort;
142 String uiProcessBundleResourcePath;
143 SandboxExtension::Handle uiProcessBundleResourcePathExtensionHandle;
145 bool shouldForceScreenFontSubstitution;
146 bool shouldEnableKerningAndLigaturesByDefault;
147 bool shouldEnableJIT;
148 bool shouldEnableFTLJIT;
149 bool shouldEnableMemoryPressureReliefLogging;
151 RefPtr<API::Data> bundleParameterData;
153 #endif // PLATFORM(COCOA)
155 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
156 HashMap<String, bool> notificationPermissions;
159 #if ENABLE(NETWORK_PROCESS)
160 bool usesNetworkProcess;
163 HashMap<WebCore::SessionID, HashMap<unsigned, double>> plugInAutoStartOriginHashes;
164 Vector<String> plugInAutoStartOrigins;
166 bool memoryCacheDisabled;
168 #if ENABLE(SERVICE_CONTROLS)
169 bool hasImageServices;
170 bool hasSelectionServices;
171 bool hasRichContentServices;
175 } // namespace WebKit
177 #endif // WebProcessCreationParameters_h