[Services with UI] Action menu does not appear if selection includes both text and...
[WebKit-https.git] / Source / WebKit2 / Shared / WebProcessCreationParameters.h
1 /*
2  * Copyright (C) 2010, 2011, 2012 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 #ifndef WebProcessCreationParameters_h
27 #define WebProcessCreationParameters_h
28
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>
37
38 #if PLATFORM(COCOA)
39 #include "MachPort.h"
40
41 #endif
42
43 #if USE(SOUP)
44 #include "HTTPCookieAcceptPolicy.h"
45 #endif
46
47 namespace API {
48 class Data;
49 }
50
51 namespace IPC {
52     class ArgumentDecoder;
53     class ArgumentEncoder;
54 }
55
56 namespace WebKit {
57
58 struct WebProcessCreationParameters {
59     WebProcessCreationParameters();
60
61     void encode(IPC::ArgumentEncoder&) const;
62     static bool decode(IPC::ArgumentDecoder&, WebProcessCreationParameters&);
63
64     String injectedBundlePath;
65     SandboxExtension::Handle injectedBundlePathExtensionHandle;
66
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;
79
80 #if PLATFORM(IOS)
81     // FIXME: Remove this once <rdar://problem/17726660> is fixed.
82     String hstsDatabasePath;
83     SandboxExtension::Handle hstsDatabasePathExtensionHandle;
84 #endif
85
86     bool shouldUseTestingNetworkSession;
87
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;
97 #endif
98 #if ENABLE(CUSTOM_PROTOCOLS)
99     Vector<String> urlSchemesRegisteredForCustomProtocols;
100 #endif
101 #if USE(SOUP)
102 #if !ENABLE(CUSTOM_PROTOCOLS)
103     Vector<String> urlSchemesRegistered;
104 #endif
105     String cookiePersistentStoragePath;
106     uint32_t cookiePersistentStorageType;
107     HTTPCookieAcceptPolicy cookieAcceptPolicy;
108     bool ignoreTLSErrors;
109 #endif
110
111     CacheModel cacheModel;
112
113     bool shouldAlwaysUseComplexTextCodePath;
114     bool shouldUseFontSmoothing;
115
116     bool iconDatabaseEnabled;
117
118     double terminationTimeout;
119
120     Vector<String> languages;
121
122     TextCheckerState textCheckerState;
123
124     bool fullKeyboardAccessEnabled;
125
126     double defaultRequestTimeoutInterval;
127
128 #if PLATFORM(COCOA) || USE(CFNETWORK)
129     String uiProcessBundleIdentifier;
130 #endif
131
132 #if PLATFORM(COCOA)
133     pid_t presenterApplicationPid;
134
135     bool accessibilityEnhancedUserInterfaceEnabled;
136
137     uint64_t nsURLCacheMemoryCapacity;
138     uint64_t nsURLCacheDiskCapacity;
139
140     IPC::MachPort acceleratedCompositingPort;
141
142     String uiProcessBundleResourcePath;
143     SandboxExtension::Handle uiProcessBundleResourcePathExtensionHandle;
144
145     bool shouldForceScreenFontSubstitution;
146     bool shouldEnableKerningAndLigaturesByDefault;
147     bool shouldEnableJIT;
148     bool shouldEnableFTLJIT;
149     bool shouldEnableMemoryPressureReliefLogging;
150     
151     RefPtr<API::Data> bundleParameterData;
152
153 #endif // PLATFORM(COCOA)
154
155 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
156     HashMap<String, bool> notificationPermissions;
157 #endif
158
159 #if ENABLE(NETWORK_PROCESS)
160     bool usesNetworkProcess;
161 #endif
162
163     HashMap<WebCore::SessionID, HashMap<unsigned, double>> plugInAutoStartOriginHashes;
164     Vector<String> plugInAutoStartOrigins;
165
166     bool memoryCacheDisabled;
167
168 #if ENABLE(SERVICE_CONTROLS)
169     bool hasImageServices;
170     bool hasSelectionServices;
171     bool hasRichContentServices;
172 #endif
173 };
174
175 } // namespace WebKit
176
177 #endif // WebProcessCreationParameters_h