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