Make it possible to not include IPC Messages headers in other headers
[WebKit-https.git] / Source / WebKit / UIProcess / WebProcessProxy.h
1 /*
2  * Copyright (C) 2010-2019 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 "APIUserInitiatedAction.h"
29 #include "AuxiliaryProcessProxy.h"
30 #include "BackgroundProcessResponsivenessTimer.h"
31 #include "MessageReceiverMap.h"
32 #include "PluginInfoStore.h"
33 #include "ProcessLauncher.h"
34 #include "ProcessTerminationReason.h"
35 #include "ProcessThrottler.h"
36 #include "ProcessThrottlerClient.h"
37 #include "ResponsivenessTimer.h"
38 #include "VisibleWebPageCounter.h"
39 #include "WebConnectionToWebProcess.h"
40 #include "WebPageProxyIdentifier.h"
41 #include "WebProcessProxyMessagesReplies.h"
42 #include <WebCore/FrameIdentifier.h>
43 #include <WebCore/PageIdentifier.h>
44 #include <WebCore/ProcessIdentifier.h>
45 #include <WebCore/RegistrableDomain.h>
46 #include <WebCore/SharedStringHash.h>
47 #include <memory>
48 #include <pal/SessionID.h>
49 #include <wtf/Forward.h>
50 #include <wtf/HashMap.h>
51 #include <wtf/HashSet.h>
52 #include <wtf/RefCounted.h>
53 #include <wtf/RefPtr.h>
54
55 namespace API {
56 class Navigation;
57 class PageConfiguration;
58 }
59
60 namespace WebCore {
61 class DeferrableOneShotTimer;
62 class ResourceRequest;
63 struct PluginInfo;
64 struct PrewarmInformation;
65 struct SecurityOriginData;
66 }
67
68 namespace WebKit {
69
70 class NetworkProcessProxy;
71 class ObjCObjectGraph;
72 class PageClient;
73 class ProvisionalPageProxy;
74 class UserMediaCaptureManagerProxy;
75 class VisitedLinkStore;
76 class WebBackForwardListItem;
77 class WebFrameProxy;
78 class WebPageGroup;
79 class WebPageProxy;
80 class WebProcessPool;
81 class WebUserContentControllerProxy;
82 class WebsiteDataStore;
83 enum class WebsiteDataType;
84 struct BackForwardListItemState;
85 struct UserMessage;
86 struct WebNavigationDataStore;
87 struct WebPageCreationParameters;
88 struct WebPreferencesStore;
89 struct WebsiteData;
90
91 #if PLATFORM(IOS_FAMILY)
92 enum ForegroundWebProcessCounterType { };
93 typedef RefCounter<ForegroundWebProcessCounterType> ForegroundWebProcessCounter;
94 typedef ForegroundWebProcessCounter::Token ForegroundWebProcessToken;
95 enum BackgroundWebProcessCounterType { };
96 typedef RefCounter<BackgroundWebProcessCounterType> BackgroundWebProcessCounter;
97 typedef BackgroundWebProcessCounter::Token BackgroundWebProcessToken;
98 #endif
99
100 class WebProcessProxy : public AuxiliaryProcessProxy, public ResponsivenessTimer::Client, public ThreadSafeRefCounted<WebProcessProxy>, public CanMakeWeakPtr<WebProcessProxy>, private ProcessThrottlerClient {
101 public:
102     typedef HashMap<WebCore::FrameIdentifier, RefPtr<WebFrameProxy>> WebFrameProxyMap;
103     typedef HashMap<WebPageProxyIdentifier, WebPageProxy*> WebPageProxyMap;
104     typedef HashMap<uint64_t, RefPtr<API::UserInitiatedAction>> UserInitiatedActionMap;
105
106     enum class IsPrewarmed {
107         No,
108         Yes
109     };
110
111     enum class ShouldLaunchProcess : bool { No, Yes };
112
113     static Ref<WebProcessProxy> create(WebProcessPool&, WebsiteDataStore*, IsPrewarmed, ShouldLaunchProcess = ShouldLaunchProcess::Yes);
114     static Ref<WebProcessProxy> createForServiceWorkers(WebProcessPool&, WebCore::RegistrableDomain&&, WebsiteDataStore&);
115
116     ~WebProcessProxy();
117
118     static void forWebPagesWithOrigin(PAL::SessionID, const WebCore::SecurityOriginData&, const Function<void(WebPageProxy&)>&);
119
120     WebConnection* webConnection() const { return m_webConnection.get(); }
121
122     unsigned suspendedPageCount() const { return m_suspendedPageCount; }
123     void incrementSuspendedPageCount();
124     void decrementSuspendedPageCount();
125
126     WebProcessPool* processPoolIfExists() const;
127     WebProcessPool& processPool() const;
128
129     bool isMatchingRegistrableDomain(const WebCore::RegistrableDomain& domain) const { return m_registrableDomain ? *m_registrableDomain == domain : false; }
130     WebCore::RegistrableDomain registrableDomain() const { return m_registrableDomain.valueOr(WebCore::RegistrableDomain { }); }
131     void setIsInProcessCache(bool);
132     bool isInProcessCache() const { return m_isInProcessCache; }
133
134     void enableServiceWorkers();
135     void disableServiceWorkers();
136
137     WebsiteDataStore& websiteDataStore() const { ASSERT(m_websiteDataStore); return *m_websiteDataStore; }
138     void setWebsiteDataStore(WebsiteDataStore&);
139     
140     PAL::SessionID sessionID() const;
141
142     static WebProcessProxy* processForIdentifier(WebCore::ProcessIdentifier);
143     static WebPageProxy* webPage(WebPageProxyIdentifier);
144     Ref<WebPageProxy> createWebPage(PageClient&, Ref<API::PageConfiguration>&&);
145
146     enum class BeginsUsingDataStore : bool { No, Yes };
147     void addExistingWebPage(WebPageProxy&, BeginsUsingDataStore);
148
149     enum class EndsUsingDataStore : bool { No, Yes };
150     void removeWebPage(WebPageProxy&, EndsUsingDataStore);
151
152     void addProvisionalPageProxy(ProvisionalPageProxy&);
153     void removeProvisionalPageProxy(ProvisionalPageProxy&);
154     
155     typename WebPageProxyMap::ValuesConstIteratorRange pages() const { return m_pageMap.values(); }
156     unsigned pageCount() const { return m_pageMap.size(); }
157     unsigned provisionalPageCount() const { return m_provisionalPages.size(); }
158     unsigned visiblePageCount() const { return m_visiblePageCounter.value(); }
159
160     void activePagesDomainsForTesting(CompletionHandler<void(Vector<String>&&)>&&); // This is what is reported to ActivityMonitor.
161
162     bool isRunningServiceWorkers() const { return !!m_serviceWorkerInformation; }
163
164     void didCreateWebPageInProcess(WebCore::PageIdentifier);
165
166     void addVisitedLinkStoreUser(VisitedLinkStore&, WebPageProxyIdentifier);
167     void removeVisitedLinkStoreUser(VisitedLinkStore&, WebPageProxyIdentifier);
168
169     void addWebUserContentControllerProxy(WebUserContentControllerProxy&, WebPageCreationParameters&);
170     void didDestroyWebUserContentControllerProxy(WebUserContentControllerProxy&);
171
172     RefPtr<API::UserInitiatedAction> userInitiatedActivity(uint64_t);
173
174     ResponsivenessTimer& responsivenessTimer() { return m_responsivenessTimer; }
175     bool isResponsive() const;
176
177     WebFrameProxy* webFrame(WebCore::FrameIdentifier) const;
178     bool canCreateFrame(WebCore::FrameIdentifier) const;
179     void frameCreated(WebCore::FrameIdentifier, WebFrameProxy&);
180     void disconnectFramesFromPage(WebPageProxy*); // Including main frame.
181     size_t frameCountInPage(WebPageProxy*) const; // Including main frame.
182
183     VisibleWebPageToken visiblePageToken() const;
184
185     void updateTextCheckerState();
186
187     void willAcquireUniversalFileReadSandboxExtension() { m_mayHaveUniversalFileReadSandboxExtension = true; }
188     void assumeReadAccessToBaseURL(WebPageProxy&, const String&);
189     bool hasAssumedReadAccessToURL(const URL&) const;
190
191     bool checkURLReceivedFromWebProcess(const String&);
192     bool checkURLReceivedFromWebProcess(const URL&);
193
194     static bool fullKeyboardAccessEnabled();
195
196     void fetchWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType>, CompletionHandler<void(WebsiteData)>&&);
197     void deleteWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType>, WallTime modifiedSince, CompletionHandler<void()>&&);
198     void deleteWebsiteDataForOrigins(PAL::SessionID, OptionSet<WebsiteDataType>, const Vector<WebCore::SecurityOriginData>&, CompletionHandler<void()>&&);
199
200 #if ENABLE(RESOURCE_LOAD_STATISTICS)
201     static void notifyPageStatisticsAndDataRecordsProcessed();
202     static void notifyPageStatisticsTelemetryFinished(API::Object* messageBody);
203
204     static void notifyWebsiteDataDeletionForRegistrableDomainsFinished();
205     static void notifyWebsiteDataScanForRegistrableDomainsFinished();
206 #endif
207
208     void enableSuddenTermination();
209     void disableSuddenTermination();
210     bool isSuddenTerminationEnabled() { return !m_numberOfTimesSuddenTerminationWasDisabled; }
211
212     void requestTermination(ProcessTerminationReason);
213
214     void stopResponsivenessTimer();
215
216     RefPtr<API::Object> transformHandlesToObjects(API::Object*);
217     static RefPtr<API::Object> transformObjectsToHandles(API::Object*);
218
219 #if PLATFORM(COCOA)
220     RefPtr<ObjCObjectGraph> transformHandlesToObjects(ObjCObjectGraph&);
221     static RefPtr<ObjCObjectGraph> transformObjectsToHandles(ObjCObjectGraph&);
222 #endif
223
224     void windowServerConnectionStateChanged();
225
226     void processReadyToSuspend();
227     void didCancelProcessSuspension();
228
229     void setIsHoldingLockedFiles(bool);
230
231     ProcessThrottler& throttler() { return m_throttler; }
232
233     void isResponsive(CompletionHandler<void(bool isWebProcessResponsive)>&&);
234     void isResponsiveWithLazyStop();
235     void didReceiveMainThreadPing();
236     void didReceiveBackgroundResponsivenessPing();
237
238     void memoryPressureStatusChanged(bool isUnderMemoryPressure) { m_isUnderMemoryPressure = isUnderMemoryPressure; }
239     bool isUnderMemoryPressure() const { return m_isUnderMemoryPressure; }
240     void didExceedInactiveMemoryLimitWhileActive();
241
242     void processTerminated();
243
244     void didExceedCPULimit();
245     void didExceedActiveMemoryLimit();
246     void didExceedInactiveMemoryLimit();
247
248     void didCommitProvisionalLoad() { m_hasCommittedAnyProvisionalLoads = true; }
249     bool hasCommittedAnyProvisionalLoads() const { return m_hasCommittedAnyProvisionalLoads; }
250
251 #if PLATFORM(WATCHOS)
252     void takeBackgroundActivityTokenForFullscreenInput();
253     void releaseBackgroundActivityTokenForFullscreenInput();
254 #endif
255
256     bool isPrewarmed() const { return m_isPrewarmed; }
257     void markIsNoLongerInPrewarmedPool();
258
259 #if PLATFORM(COCOA)
260     Vector<String> mediaMIMETypes() const;
261     void cacheMediaMIMETypes(const Vector<String>&);
262 #endif
263
264 #if PLATFORM(MAC)
265     void requestHighPerformanceGPU();
266     void releaseHighPerformanceGPU();
267 #endif
268
269 #if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
270     void startDisplayLink(unsigned observerID, uint32_t displayID);
271     void stopDisplayLink(unsigned observerID, uint32_t displayID);
272 #endif
273
274     // Called when the web process has crashed or we know that it will terminate soon.
275     // Will potentially cause the WebProcessProxy object to be freed.
276     void shutDown();
277
278     class ScopePreventingShutdown {
279     public:
280         explicit ScopePreventingShutdown(WebProcessProxy& process)
281             : m_process(process)
282         {
283             ++(m_process->m_shutdownPreventingScopeCount);
284         }
285
286         ~ScopePreventingShutdown()
287         {
288             ASSERT(m_process->m_shutdownPreventingScopeCount);
289             if (!--(m_process->m_shutdownPreventingScopeCount))
290                 m_process->maybeShutDown();
291         }
292
293     private:
294         Ref<WebProcessProxy> m_process;
295     };
296
297     ScopePreventingShutdown makeScopePreventingShutdown() { return ScopePreventingShutdown { *this }; }
298
299     void didStartProvisionalLoadForMainFrame(const URL&);
300
301     // ProcessThrottlerClient
302     void sendProcessWillSuspendImminently() override;
303     void sendPrepareToSuspend() override;
304     void sendCancelPrepareToSuspend() override;
305     void sendProcessDidResume() override;
306     void didSetAssertionState(AssertionState) override;
307
308 #if PLATFORM(COCOA)
309     enum SandboxExtensionType : uint32_t {
310         None = 0,
311         Video = 1 << 0,
312         Audio = 1 << 1
313     };
314
315     typedef uint32_t MediaCaptureSandboxExtensions;
316
317     bool hasVideoCaptureExtension() const { return m_mediaCaptureSandboxExtensions & Video; }
318     void grantVideoCaptureExtension() { m_mediaCaptureSandboxExtensions |= Video; }
319     void revokeVideoCaptureExtension() { m_mediaCaptureSandboxExtensions &= ~Video; }
320
321     bool hasAudioCaptureExtension() const { return m_mediaCaptureSandboxExtensions & Audio; }
322     void grantAudioCaptureExtension() { m_mediaCaptureSandboxExtensions |= Audio; }
323     void revokeAudioCaptureExtension() { m_mediaCaptureSandboxExtensions &= ~Audio; }
324 #endif
325
326 #if PLATFORM(IOS_FAMILY)
327     void unblockAccessibilityServerIfNeeded();
328 #endif
329
330 #if PLATFORM(IOS_FAMILY)
331     void processWasResumed();
332 #endif
333
334     void webPageMediaStateDidChange(WebPageProxy&);
335
336     void ref() final { ThreadSafeRefCounted::ref(); }
337     void deref() final { ThreadSafeRefCounted::deref(); }
338
339 #if ENABLE(SERVICE_WORKER)
340     void establishServiceWorkerContext(const WebPreferencesStore&);
341     void setServiceWorkerUserAgent(const String&);
342     void updateServiceWorkerPreferencesStore(const WebPreferencesStore&);
343     bool hasServiceWorkerPageProxy(WebPageProxyIdentifier pageProxyID) { return m_serviceWorkerInformation && m_serviceWorkerInformation->serviceWorkerPageProxyID == pageProxyID; }
344 #endif
345
346 protected:
347     WebProcessProxy(WebProcessPool&, WebsiteDataStore*, IsPrewarmed);
348
349     // AuxiliaryProcessProxy
350     void getLaunchOptions(ProcessLauncher::LaunchOptions&) override;
351     void platformGetLaunchOptions(ProcessLauncher::LaunchOptions&) override;
352     void connectionWillOpen(IPC::Connection&) override;
353     void processWillShutDown(IPC::Connection&) override;
354     bool shouldSendPendingMessage(const PendingMessage&) final;
355     
356     // ProcessLauncher::Client
357     void didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier) override;
358
359 #if PLATFORM(COCOA)
360     void cacheMediaMIMETypesInternal(const Vector<String>&);
361 #endif
362
363     bool shouldConfigureJSCForTesting() const final;
364     bool isJITEnabled() const final;
365
366     void validateFreezerStatus();
367
368 private:
369     // IPC message handlers.
370     void updateBackForwardItem(const BackForwardListItemState&);
371     void didDestroyFrame(WebCore::FrameIdentifier);
372     void didDestroyUserGestureToken(uint64_t);
373
374     bool canBeAddedToWebProcessCache() const;
375     void shouldTerminate(CompletionHandler<void(bool)>&&);
376
377     bool hasProvisionalPageWithID(WebPageProxyIdentifier) const;
378     bool isAllowedToUpdateBackForwardItem(WebBackForwardListItem&) const;
379
380     // Plugins
381 #if ENABLE(NETSCAPE_PLUGIN_API)
382     void getPlugins(bool refresh, CompletionHandler<void(Vector<WebCore::PluginInfo>&& plugins, Vector<WebCore::PluginInfo>&& applicationPlugins, Optional<Vector<WebCore::SupportedPluginIdentifier>>&&)>&&);
383 #endif // ENABLE(NETSCAPE_PLUGIN_API)
384 #if ENABLE(NETSCAPE_PLUGIN_API)
385     void getPluginProcessConnection(uint64_t pluginProcessToken, Messages::WebProcessProxy::GetPluginProcessConnectionDelayedReply&&);
386 #endif
387     void addPlugInAutoStartOriginHash(String&& pageOrigin, uint32_t hash);
388     void plugInDidReceiveUserInteraction(uint32_t hash);
389     
390     void getNetworkProcessConnection(Messages::WebProcessProxy::GetNetworkProcessConnectionDelayedReply&&);
391
392     bool platformIsBeingDebugged() const;
393     bool shouldAllowNonValidInjectedCode() const;
394
395     static const HashSet<String>& platformPathsWithAssumedReadAccess();
396
397     void updateBackgroundResponsivenessTimer();
398
399     void processDidTerminateOrFailedToLaunch();
400
401     bool isReleaseLoggingAllowed() const;
402
403     // IPC::Connection::Client
404     friend class WebConnectionToWebProcess;
405     void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
406     void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) override;
407     void didClose(IPC::Connection&) override;
408     void didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) override;
409
410     // ResponsivenessTimer::Client
411     void didBecomeUnresponsive() override;
412     void didBecomeResponsive() override;
413     void willChangeIsResponsive() override;
414     void didChangeIsResponsive() override;
415     bool mayBecomeUnresponsive() override;
416
417     // Implemented in generated WebProcessProxyMessageReceiver.cpp
418     void didReceiveWebProcessProxyMessage(IPC::Connection&, IPC::Decoder&);
419     void didReceiveSyncWebProcessProxyMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&);
420
421     bool canTerminateAuxiliaryProcess();
422
423     void didCollectPrewarmInformation(const WebCore::RegistrableDomain&, const WebCore::PrewarmInformation&);
424
425     void logDiagnosticMessageForResourceLimitTermination(const String& limitKey);
426     
427     void updateRegistrationWithDataStore();
428
429     void maybeShutDown();
430
431 #if PLATFORM(GTK) || PLATFORM(WPE)
432     void sendMessageToWebContext(UserMessage&&);
433     void sendMessageToWebContextWithReply(UserMessage&&, CompletionHandler<void(UserMessage&&)>&&);
434 #endif
435
436     enum class IsWeak { No, Yes };
437     template<typename T> class WeakOrStrongPtr {
438     public:
439         WeakOrStrongPtr(T& object, IsWeak isWeak)
440             : m_isWeak(isWeak)
441             , m_weakObject(makeWeakPtr(object))
442         {
443             updateStrongReference();
444         }
445
446         void setIsWeak(IsWeak isWeak)
447         {
448             m_isWeak = isWeak;
449             updateStrongReference();
450         }
451
452         T* get() const { return m_weakObject.get(); }
453         T* operator->() const { return m_weakObject.get(); }
454         T& operator*() const { return *m_weakObject; }
455         explicit operator bool() const { return !!m_weakObject; }
456
457     private:
458         void updateStrongReference()
459         {
460             m_strongObject = m_isWeak == IsWeak::Yes ? nullptr : m_weakObject.get();
461         }
462
463         IsWeak m_isWeak;
464         WeakPtr<T> m_weakObject;
465         RefPtr<T> m_strongObject;
466     };
467
468     ResponsivenessTimer m_responsivenessTimer;
469     BackgroundProcessResponsivenessTimer m_backgroundResponsivenessTimer;
470     
471     RefPtr<WebConnectionToWebProcess> m_webConnection;
472     WeakOrStrongPtr<WebProcessPool> m_processPool; // Pre-warmed and cached processes do not hold a strong reference to their pool.
473
474     bool m_mayHaveUniversalFileReadSandboxExtension; // True if a read extension for "/" was ever granted - we don't track whether WebProcess still has it.
475     HashSet<String> m_localPathsWithAssumedReadAccess;
476
477     WebPageProxyMap m_pageMap;
478     WebFrameProxyMap m_frameMap;
479     HashSet<ProvisionalPageProxy*> m_provisionalPages;
480     UserInitiatedActionMap m_userInitiatedActionMap;
481
482     HashMap<VisitedLinkStore*, HashSet<WebPageProxyIdentifier>> m_visitedLinkStoresWithUsers;
483     HashSet<WebUserContentControllerProxy*> m_webUserContentControllerProxies;
484
485     int m_numberOfTimesSuddenTerminationWasDisabled;
486     ProcessThrottler m_throttler;
487     ProcessThrottler::BackgroundActivityToken m_tokenForHoldingLockedFiles;
488 #if PLATFORM(IOS_FAMILY)
489     ForegroundWebProcessToken m_foregroundToken;
490     BackgroundWebProcessToken m_backgroundToken;
491     bool m_hasSentMessageToUnblockAccessibilityServer { false };
492     std::unique_ptr<WebCore::DeferrableOneShotTimer> m_unexpectedActivityTimer;
493 #endif
494
495     HashMap<String, uint64_t> m_pageURLRetainCountMap;
496
497     Optional<WebCore::RegistrableDomain> m_registrableDomain;
498     bool m_isInProcessCache { false };
499
500     enum class NoOrMaybe { No, Maybe } m_isResponsive;
501     Vector<CompletionHandler<void(bool webProcessIsResponsive)>> m_isResponsiveCallbacks;
502
503     VisibleWebPageCounter m_visiblePageCounter;
504
505     RefPtr<WebsiteDataStore> m_websiteDataStore;
506
507     bool m_isUnderMemoryPressure { false };
508
509 #if PLATFORM(COCOA) && ENABLE(MEDIA_STREAM)
510     std::unique_ptr<UserMediaCaptureManagerProxy> m_userMediaCaptureManagerProxy;
511 #endif
512
513     unsigned m_suspendedPageCount { 0 };
514     unsigned m_shutdownPreventingScopeCount { 0 };
515     bool m_hasCommittedAnyProvisionalLoads { false };
516     bool m_isPrewarmed;
517     bool m_hasAudibleWebPage { false };
518
519 #if PLATFORM(WATCHOS)
520     ProcessThrottler::BackgroundActivityToken m_backgroundActivityTokenForFullscreenFormControls;
521 #endif
522
523 #if PLATFORM(COCOA)
524     MediaCaptureSandboxExtensions m_mediaCaptureSandboxExtensions { SandboxExtensionType::None };
525 #endif
526
527     struct ServiceWorkerInformation {
528         WebPageProxyIdentifier serviceWorkerPageProxyID;
529         WebCore::PageIdentifier serviceWorkerPageID;
530     };
531     Optional<ServiceWorkerInformation> m_serviceWorkerInformation;
532 };
533
534 } // namespace WebKit