[GStreamer][MiniBrowser] Honor GStreamer command line parameters in MiniBrowser
[WebKit-https.git] / Source / WebKit / Shared / WebProcessCreationParameters.h
1 /*
2  * Copyright (C) 2010-2018 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 #pragma once
27
28 #include "CacheModel.h"
29 #include "SandboxExtension.h"
30 #include "TextCheckerState.h"
31 #include "UserData.h"
32 #include <pal/SessionID.h>
33 #include <wtf/HashMap.h>
34 #include <wtf/ProcessID.h>
35 #include <wtf/RetainPtr.h>
36 #include <wtf/Vector.h>
37 #include <wtf/text/StringHash.h>
38 #include <wtf/text/WTFString.h>
39
40 #if PLATFORM(COCOA)
41 #include <WebCore/MachSendRight.h>
42 #endif
43
44 #if USE(SOUP)
45 #include "HTTPCookieAcceptPolicy.h"
46 #include <WebCore/SoupNetworkProxySettings.h>
47 #endif
48
49 namespace API {
50 class Data;
51 }
52
53 namespace IPC {
54 class Decoder;
55 class Encoder;
56 }
57
58 namespace WebKit {
59
60 struct WebProcessCreationParameters {
61     WebProcessCreationParameters();
62     ~WebProcessCreationParameters();
63
64     void encode(IPC::Encoder&) const;
65     static bool decode(IPC::Decoder&, WebProcessCreationParameters&);
66
67     String injectedBundlePath;
68     SandboxExtension::Handle injectedBundlePathExtensionHandle;
69     SandboxExtension::HandleArray additionalSandboxExtensionHandles;
70
71     UserData initializationUserData;
72
73     String applicationCacheDirectory;
74     String applicationCacheFlatFileSubdirectoryName;
75     SandboxExtension::Handle applicationCacheDirectoryExtensionHandle;
76     String webSQLDatabaseDirectory;
77     SandboxExtension::Handle webSQLDatabaseDirectoryExtensionHandle;
78     String mediaCacheDirectory;
79     SandboxExtension::Handle mediaCacheDirectoryExtensionHandle;
80     String javaScriptConfigurationDirectory;
81     SandboxExtension::Handle javaScriptConfigurationDirectoryExtensionHandle;
82 #if PLATFORM(MAC)
83     Vector<uint8_t> uiProcessCookieStorageIdentifier;
84 #endif
85 #if PLATFORM(IOS)
86     SandboxExtension::Handle cookieStorageDirectoryExtensionHandle;
87     SandboxExtension::Handle containerCachesDirectoryExtensionHandle;
88     SandboxExtension::Handle containerTemporaryDirectoryExtensionHandle;
89 #endif
90     SandboxExtension::Handle mediaKeyStorageDirectoryExtensionHandle;
91 #if ENABLE(MEDIA_STREAM)
92     SandboxExtension::Handle audioCaptureExtensionHandle;
93     bool shouldCaptureAudioInUIProcess { false };
94 #endif
95     String mediaKeyStorageDirectory;
96
97     String webCoreLoggingChannels;
98     String webKitLoggingChannels;
99
100     Vector<String> urlSchemesRegisteredAsEmptyDocument;
101     Vector<String> urlSchemesRegisteredAsSecure;
102     Vector<String> urlSchemesRegisteredAsBypassingContentSecurityPolicy;
103     Vector<String> urlSchemesForWhichDomainRelaxationIsForbidden;
104     Vector<String> urlSchemesRegisteredAsLocal;
105     Vector<String> urlSchemesRegisteredAsNoAccess;
106     Vector<String> urlSchemesRegisteredAsDisplayIsolated;
107     Vector<String> urlSchemesRegisteredAsCORSEnabled;
108     Vector<String> urlSchemesRegisteredAsAlwaysRevalidated;
109     Vector<String> urlSchemesRegisteredAsCachePartitioned;
110     Vector<String> urlSchemesServiceWorkersCanHandle;
111
112     Vector<String> fontWhitelist;
113     Vector<String> languages;
114 #if USE(GSTREAMER)
115     Vector<String> gstreamerOptions;
116 #endif
117
118     CacheModel cacheModel;
119
120     double defaultRequestTimeoutInterval { INT_MAX };
121
122     bool shouldUseTestingNetworkSession { false };
123     bool shouldAlwaysUseComplexTextCodePath { false };
124     bool shouldEnableMemoryPressureReliefLogging { false };
125     bool shouldSuppressMemoryPressureHandler { false };
126     bool shouldUseFontSmoothing { true };
127     bool resourceLoadStatisticsEnabled { false };
128     bool fullKeyboardAccessEnabled { false };
129     bool memoryCacheDisabled { false };
130
131 #if ENABLE(SERVICE_CONTROLS)
132     bool hasImageServices { false };
133     bool hasSelectionServices { false };
134     bool hasRichContentServices { false };
135 #endif
136
137     Seconds terminationTimeout;
138
139     TextCheckerState textCheckerState;
140
141 #if PLATFORM(COCOA)
142     String uiProcessBundleIdentifier;
143 #endif
144
145     ProcessID presentingApplicationPID { 0 };
146
147 #if PLATFORM(COCOA)
148     WebCore::MachSendRight acceleratedCompositingPort;
149
150     String uiProcessBundleResourcePath;
151     SandboxExtension::Handle uiProcessBundleResourcePathExtensionHandle;
152
153     bool shouldEnableJIT { false };
154     bool shouldEnableFTLJIT { false };
155     bool accessibilityEnhancedUserInterfaceEnabled { false };
156     
157     RefPtr<API::Data> bundleParameterData;
158 #endif // PLATFORM(COCOA)
159
160 #if ENABLE(NOTIFICATIONS)
161     HashMap<String, bool> notificationPermissions;
162 #endif
163
164     HashMap<PAL::SessionID, HashMap<unsigned, double>> plugInAutoStartOriginHashes;
165     Vector<String> plugInAutoStartOrigins;
166
167 #if ENABLE(NETSCAPE_PLUGIN_API)
168     HashMap<String, HashMap<String, HashMap<String, uint8_t>>> pluginLoadClientPolicies;
169 #endif
170
171 #if PLATFORM(COCOA)
172     RetainPtr<CFDataRef> networkATSContext;
173 #endif
174
175 #if OS(LINUX)
176     IPC::Attachment memoryPressureMonitorHandle;
177 #endif
178
179 #if PLATFORM(WAYLAND)
180     String waylandCompositorDisplayName;
181 #endif
182
183 #if USE(SOUP)
184     WebCore::SoupNetworkProxySettings proxySettings;
185 #endif
186
187 #if HAVE(CFNETWORK_STORAGE_PARTITIONING) && !RELEASE_LOG_DISABLED
188     bool shouldLogUserInteraction { false };
189 #endif
190 };
191
192 } // namespace WebKit