Unreviewed, rolling out r243008.
[WebKit-https.git] / Source / WebKit / WebProcess / WebProcess.messages.in
1 # Copyright (C) 2010-2018 Apple Inc. All rights reserved.
2 #
3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions
5 # are met:
6 # 1.  Redistributions of source code must retain the above copyright
7 #     notice, this list of conditions and the following disclaimer.
8 # 2.  Redistributions in binary form must reproduce the above copyright
9 #     notice, this list of conditions and the following disclaimer in the
10 #     documentation and/or other materials provided with the distribution.
11 #
12 # THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
13 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
14 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
15 # DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
16 # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
18 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
19 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
20 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
21 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
23 messages -> WebProcess LegacyReceiver {
24     InitializeWebProcess(struct WebKit::WebProcessCreationParameters processCreationParameters)
25
26     # Create a new page.
27     CreateWebPage(uint64_t newPageID, struct WebKit::WebPageCreationParameters pageCreationParameters)
28
29     PrewarmGlobally();
30     PrewarmWithDomainInformation(struct WebCore::PrewarmInformation prewarmInformation)
31
32     # Global preferences.
33     SetCacheModel(enum:uint8_t WebKit::CacheModel cacheModel)
34
35     RegisterURLSchemeAsEmptyDocument(String scheme)
36     RegisterURLSchemeAsSecure(String scheme)
37     RegisterURLSchemeAsBypassingContentSecurityPolicy(String scheme)
38     SetDomainRelaxationForbiddenForURLScheme(String scheme)
39     RegisterURLSchemeAsLocal(String scheme)
40     RegisterURLSchemeAsNoAccess(String scheme)
41     RegisterURLSchemeAsDisplayIsolated(String scheme)
42     RegisterURLSchemeAsCORSEnabled(String scheme)
43     RegisterURLSchemeAsCachePartitioned(String scheme)
44     RegisterURLSchemeAsCanDisplayOnlyIfCanRequest(String scheme)
45
46     SetDefaultRequestTimeoutInterval(double timeoutInterval)
47     SetAlwaysUsesComplexTextCodePath(bool alwaysUseComplexText)
48     SetShouldUseFontSmoothing(bool useFontSmoothing)
49     SetResourceLoadStatisticsEnabled(bool resourceLoadStatisticsEnabled);
50     ClearResourceLoadStatistics();
51     UserPreferredLanguagesChanged(Vector<String> languages)
52     FullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled)
53
54     # Plug-ins.
55     DidAddPlugInAutoStartOriginHash(uint32_t hash, WallTime expirationTime, PAL::SessionID sessionID)
56     ResetPlugInAutoStartOriginDefaultHashes(HashMap<uint32_t,WallTime> hashes)
57     ResetPlugInAutoStartOriginHashes(HashMap<PAL::SessionID, HashMap<uint32_t,WallTime>> hashes)
58     SetPluginLoadClientPolicy(uint8_t policy, String host, String bundleIdentifier, String versionString)
59     ResetPluginLoadClientPolicies(HashMap<String, HashMap<String, HashMap<String, uint8_t>>> pluginLoadClientPolicies)
60     ClearPluginClientPolicies()
61     RefreshPlugins()
62
63     void StartMemorySampler(WebKit::SandboxExtension::Handle sampleLogFileHandle, String sampleLogFilePath, double interval);
64     void StopMemorySampler();
65
66     SetTextCheckerState(struct WebKit::TextCheckerState textCheckerState)
67
68     SetEnhancedAccessibility(bool flag)
69
70     GetWebCoreStatistics(uint64_t callbackID)
71     GarbageCollectJavaScriptObjects()
72     SetJavaScriptGarbageCollectorTimerEnabled(bool enable)
73
74     SetInjectedBundleParameter(String parameter, IPC::DataReference value);
75     SetInjectedBundleParameters(IPC::DataReference parameters);
76     HandleInjectedBundleMessage(String messageName, WebKit::UserData messageBody);
77
78     ReleasePageCache()
79
80     FetchWebsiteData(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes) -> (struct WebKit::WebsiteData websiteData) LegacySync
81     DeleteWebsiteData(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, WallTime modifiedSince) -> () LegacySync
82     DeleteWebsiteDataForOrigins(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, Vector<WebCore::SecurityOriginData> origins) -> () LegacySync
83
84     SetHiddenPageDOMTimerThrottlingIncreaseLimit(int milliseconds)
85 #if PLATFORM(COCOA)
86     SetQOS(int latencyQOS, int throughputQOS)
87 #endif
88
89     SetMemoryCacheDisabled(bool disabled);
90
91 #if ENABLE(SERVICE_CONTROLS)
92     SetEnabledServices(bool hasImageServices, bool hasSelectionServices, bool hasRichContentServices)
93 #endif
94
95     EnsureAutomationSessionProxy(String sessionIdentifier)
96     DestroyAutomationSessionProxy()
97
98     ProcessWillSuspendImminently() -> (bool handled) LegacySync
99     PrepareToSuspend()
100     CancelPrepareToSuspend()
101     ProcessDidResume()
102
103     MainThreadPing()
104     BackgroundResponsivenessPing()
105
106 #if ENABLE(GAMEPAD)
107     SetInitialGamepads(Vector<WebKit::GamepadData> gamepadDatas)
108     GamepadConnected(WebKit::GamepadData gamepadData)
109     GamepadDisconnected(unsigned index)
110 #endif
111
112 #if ENABLE(SERVICE_WORKER)
113     EstablishWorkerContextConnectionToNetworkProcess(uint64_t pageGroupID, uint64_t pageID, struct WebKit::WebPreferencesStore store, PAL::SessionID initialSessionID)
114     RegisterServiceWorkerClients()
115 #endif
116
117     DidTakeAllMessagesForPort(Vector<WebCore::MessageWithMessagePorts> messages, uint64_t messageCallbackIdentifier, uint64_t messageBatchIdentifier)
118     DidCheckRemotePortForActivity(uint64_t callbackIdentifier, bool hasActivity)
119     CheckProcessLocalPortForActivity(struct WebCore::MessagePortIdentifier port, uint64_t callbackIdentifier)
120     MessagesAvailableForPort(struct WebCore::MessagePortIdentifier port)
121
122     SetHasSuspendedPageProxy(bool hasSuspendedPageProxy);
123     SetIsInProcessCache(bool isInProcessCache)
124     MarkIsNoLongerPrewarmed()
125     UpdateActivePages()
126     GetActivePagesOriginsForTesting() -> (Vector<String> activeOrigins) Async
127
128 #if PLATFORM(MAC)
129     SetScreenProperties(struct WebCore::ScreenProperties screenProperties)
130 #if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
131     ScrollerStylePreferenceChanged(bool useOvelayScrollbars)
132     DisplayConfigurationChanged(CGDirectDisplayID displayID, CGDisplayChangeSummaryFlags flags)
133     DisplayWasRefreshed(uint32_t displayID)
134 #endif
135 #endif
136
137 #if PLATFORM(IOS)
138     BacklightLevelDidChange(float backlightLevel)
139 #endif
140
141     IsJITEnabled() -> (bool enabled) Async
142
143 #if PLATFORM(COCOA)
144     SetMediaMIMETypes(Vector<String> types)
145 #endif
146
147 #if ENABLE(MEDIA_STREAM)
148     AddMockMediaDevice(struct WebCore::MockMediaDevice device);
149     ClearMockMediaDevices();
150     RemoveMockMediaDevice(String persistentId);
151     ResetMockMediaDevices();
152
153 #if ENABLE(SANDBOX_EXTENSIONS)
154     GrantUserMediaDeviceSandboxExtensions(WebKit::MediaDeviceSandboxExtensions sandboxExtensions)
155     RevokeUserMediaDeviceSandboxExtensions(Vector<String> sandboxExtensionIDs)
156 #endif
157 #endif
158
159     ClearCurrentModifierStateForTesting()
160 }