[GTK] Move the redirected XComposite window to the web process
[WebKit-https.git] / Source / WebKit2 / UIProcess / WebPageProxy.h
1 /*
2  * Copyright (C) 2010-2016 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 "APIObject.h"
29 #include "APISession.h"
30 #include "AssistedNodeInformation.h"
31 #include "AutoCorrectionCallback.h"
32 #include "Connection.h"
33 #include "ContextMenuContextData.h"
34 #include "DownloadID.h"
35 #include "DragControllerAction.h"
36 #include "DrawingAreaProxy.h"
37 #include "EditingRange.h"
38 #include "EditorState.h"
39 #include "GeolocationPermissionRequestManagerProxy.h"
40 #include "LayerTreeContext.h"
41 #include "MessageSender.h"
42 #include "NotificationPermissionRequestManagerProxy.h"
43 #include "PageLoadState.h"
44 #include "ProcessThrottler.h"
45 #include "SandboxExtension.h"
46 #include "ShareableBitmap.h"
47 #include "UserMediaPermissionRequestManagerProxy.h"
48 #include "VisibleContentRectUpdateInfo.h"
49 #include "WKBase.h"
50 #include "WKPagePrivate.h"
51 #include "WebColorPicker.h"
52 #include "WebContextMenuItemData.h"
53 #include "WebCoreArgumentCoders.h"
54 #include "WebFrameProxy.h"
55 #include "WebPageCreationParameters.h"
56 #include "WebPageDiagnosticLoggingClient.h"
57 #include "WebPageInjectedBundleClient.h"
58 #include "WebPaymentCoordinatorProxy.h"
59 #include "WebPreferences.h"
60 #include <WebCore/AlternativeTextClient.h> // FIXME: Needed by WebPageProxyMessages.h for DICTATION_ALTERNATIVES.
61 #include "WebPageProxyMessages.h"
62 #include "WebPopupMenuProxy.h"
63 #include "WebProcessLifetimeTracker.h"
64 #include <WebCore/Color.h>
65 #include <WebCore/DragActions.h>
66 #include <WebCore/EventTrackingRegions.h>
67 #include <WebCore/FrameLoaderTypes.h>
68 #include <WebCore/HitTestResult.h>
69 #include <WebCore/MediaProducer.h>
70 #include <WebCore/Page.h>
71 #include <WebCore/PlatformScreen.h>
72 #include <WebCore/ScrollTypes.h>
73 #include <WebCore/SearchPopupMenu.h>
74 #include <WebCore/TextChecking.h>
75 #include <WebCore/TextGranularity.h>
76 #include <WebCore/UserInterfaceLayoutDirection.h>
77 #include <WebCore/ViewState.h>
78 #include <WebCore/VisibleSelection.h>
79 #include <memory>
80 #include <wtf/HashMap.h>
81 #include <wtf/HashSet.h>
82 #include <wtf/PassRefPtr.h>
83 #include <wtf/Ref.h>
84 #include <wtf/RefPtr.h>
85 #include <wtf/Vector.h>
86 #include <wtf/text/WTFString.h>
87
88 OBJC_CLASS NSView;
89 OBJC_CLASS _WKRemoteObjectRegistry;
90
91 #if ENABLE(DRAG_SUPPORT)
92 #include <WebCore/DragActions.h>
93 #endif
94
95 #if ENABLE(TOUCH_EVENTS)
96 #include "NativeWebTouchEvent.h"
97 #endif
98
99 #if PLATFORM(COCOA)
100 #include "LayerRepresentation.h"
101 #endif
102
103 #if PLATFORM(MAC)
104 #include "AttributedString.h"
105 #endif
106
107 #if PLATFORM(IOS)
108 #include "ProcessThrottler.h"
109 #endif
110
111 #if PLATFORM(GTK)
112 #include "ArgumentCodersGtk.h"
113 #endif
114
115 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
116 #include <WebCore/MediaPlaybackTargetPicker.h>
117 #include <WebCore/WebMediaSessionManagerClient.h>
118 #endif
119
120 #if ENABLE(MEDIA_SESSION)
121 namespace WebCore {
122 class MediaSessionMetadata;
123 }
124 #endif
125
126 namespace API {
127 class ContextMenuClient;
128 class FindClient;
129 class FindMatchesClient;
130 class FormClient;
131 class HistoryClient;
132 class LoaderClient;
133 class Navigation;
134 class NavigationClient;
135 class PolicyClient;
136 class UIClient;
137 class URLRequest;
138 }
139
140 namespace IPC {
141 class ArgumentDecoder;
142 class Connection;
143 }
144
145 namespace WebCore {
146 class AuthenticationChallenge;
147 class Cursor;
148 class DragData;
149 class FloatRect;
150 class GraphicsLayer;
151 class IntSize;
152 class ProtectionSpace;
153 class RunLoopObserver;
154 class SharedBuffer;
155 class TextIndicator;
156 struct DictionaryPopupInfo;
157 struct ExceptionDetails;
158 struct FileChooserSettings;
159 struct SecurityOriginData;
160 struct TextAlternativeWithRange;
161 struct TextCheckingResult;
162 struct ViewportAttributes;
163 struct WindowFeatures;
164 }
165
166 #if PLATFORM(GTK)
167 typedef GtkWidget* PlatformWidget;
168 #endif
169
170 namespace WebKit {
171
172 enum HiddenPageThrottlingAutoIncreasesCounterType { };
173 typedef RefCounter<HiddenPageThrottlingAutoIncreasesCounterType> HiddenPageThrottlingAutoIncreasesCounter;
174
175 class CertificateInfo;
176 class NativeWebGestureEvent;
177 class NativeWebKeyboardEvent;
178 class NativeWebMouseEvent;
179 class NativeWebWheelEvent;
180 class PageClient;
181 class RemoteLayerTreeScrollingPerformanceData;
182 class RemoteLayerTreeTransaction;
183 class RemoteScrollingCoordinatorProxy;
184 class StringPairVector;
185 class UserData;
186 class ViewSnapshot;
187 class VisitedLinkStore;
188 class WebBackForwardList;
189 class WebBackForwardListItem;
190 class WebContextMenuProxy;
191 class WebEditCommandProxy;
192 class WebFullScreenManagerProxy;
193 class WebPlaybackSessionManagerProxy;
194 class WebNavigationState;
195 class WebVideoFullscreenManagerProxy;
196 class WebKeyboardEvent;
197 class WebMouseEvent;
198 class WebOpenPanelResultListenerProxy;
199 class WebPageGroup;
200 class WebProcessProxy;
201 class WebUserContentControllerProxy;
202 class WebWheelEvent;
203 class WebsiteDataStore;
204 struct AttributedString;
205 struct ColorSpaceData;
206 struct EditingRange;
207 struct EditorState;
208 struct LoadParameters;
209 struct PlatformPopupMenuData;
210 struct PrintInfo;
211 struct WebPopupItem;
212
213 #if ENABLE(VIBRATION)
214 class WebVibrationProxy;
215 #endif
216
217 #if USE(QUICK_LOOK)
218 class QuickLookDocumentData;
219 #endif
220
221 typedef GenericCallback<uint64_t> UnsignedCallback;
222 typedef GenericCallback<EditingRange> EditingRangeCallback;
223 typedef GenericCallback<const String&> StringCallback;
224 typedef GenericCallback<API::SerializedScriptValue*, bool, const WebCore::ExceptionDetails&> ScriptValueCallback;
225
226 #if PLATFORM(GTK)
227 typedef GenericCallback<API::Error*> PrintFinishedCallback;
228 #endif
229
230 #if ENABLE(TOUCH_EVENTS)
231 struct QueuedTouchEvents {
232     QueuedTouchEvents(const NativeWebTouchEvent& event)
233         : forwardedEvent(event)
234     {
235     }
236     NativeWebTouchEvent forwardedEvent;
237     Vector<NativeWebTouchEvent> deferredTouchEvents;
238 };
239 #endif
240
241 typedef GenericCallback<const String&, bool, int32_t> ValidateCommandCallback;
242 typedef GenericCallback<const WebCore::IntRect&, const EditingRange&> RectForCharacterRangeCallback;
243
244 #if PLATFORM(MAC)
245 typedef GenericCallback<const AttributedString&, const EditingRange&> AttributedStringForCharacterRangeCallback;
246 typedef GenericCallback<const String&, double, bool> FontAtSelectionCallback;
247 #endif
248
249 #if PLATFORM(IOS)
250 typedef GenericCallback<const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t> GestureCallback;
251 typedef GenericCallback<const WebCore::IntPoint&, uint32_t, uint32_t> TouchesCallback;
252 struct NodeAssistanceArguments {
253     AssistedNodeInformation m_nodeInformation;
254     bool m_userIsInteracting;
255     bool m_blurPreviousNode;
256     RefPtr<API::Object> m_userData;
257 };
258
259 using DrawToPDFCallback = GenericCallback<const IPC::DataReference&>;
260 #endif
261
262 #if PLATFORM(COCOA)
263 typedef GenericCallback<const WebCore::MachSendRight&> MachSendRightCallback;
264 #endif
265
266 class WebPageProxy : public API::ObjectImpl<API::Object::Type::Page>
267 #if ENABLE(INPUT_TYPE_COLOR)
268     , public WebColorPicker::Client
269 #endif
270 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
271     , public WebCore::WebMediaSessionManagerClient
272 #endif
273     , public WebPopupMenuProxy::Client
274     , public IPC::MessageReceiver
275     , public IPC::MessageSender {
276 public:
277     static Ref<WebPageProxy> create(PageClient&, WebProcessProxy&, uint64_t pageID, Ref<API::PageConfiguration>&&);
278     virtual ~WebPageProxy();
279
280     const API::PageConfiguration& configuration() const;
281
282     uint64_t pageID() const { return m_pageID; }
283     WebCore::SessionID sessionID() const { return m_sessionID; }
284     void setSessionID(WebCore::SessionID);
285
286     WebFrameProxy* mainFrame() const { return m_mainFrame.get(); }
287     WebFrameProxy* focusedFrame() const { return m_focusedFrame.get(); }
288     WebFrameProxy* frameSetLargestFrame() const { return m_frameSetLargestFrame.get(); }
289
290     DrawingAreaProxy* drawingArea() const { return m_drawingArea.get(); }
291
292     WebNavigationState& navigationState() { return *m_navigationState.get(); }
293
294     WebsiteDataStore& websiteDataStore() { return m_websiteDataStore; }
295
296 #if ENABLE(DATA_DETECTION)
297     NSArray *dataDetectionResults() { return m_dataDetectionResults.get(); }
298 #endif
299         
300 #if ENABLE(ASYNC_SCROLLING)
301     RemoteScrollingCoordinatorProxy* scrollingCoordinatorProxy() const { return m_scrollingCoordinatorProxy.get(); }
302 #endif
303
304     WebBackForwardList& backForwardList() { return m_backForwardList; }
305
306     bool addsVisitedLinks() const { return m_addsVisitedLinks; }
307     void setAddsVisitedLinks(bool addsVisitedLinks) { m_addsVisitedLinks = addsVisitedLinks; }
308
309     void fullscreenMayReturnToInline();
310     void didEnterFullscreen();
311     void didExitFullscreen();
312
313     WebInspectorProxy* inspector() const;
314
315     bool isControlledByAutomation() const { return m_controlledByAutomation; }
316     void setControlledByAutomation(bool);
317
318 #if ENABLE(REMOTE_INSPECTOR)
319     bool allowsRemoteInspection() const { return m_allowsRemoteInspection; }
320     void setAllowsRemoteInspection(bool);
321     String remoteInspectionNameOverride() const { return m_remoteInspectionNameOverride; }
322     void setRemoteInspectionNameOverride(const String&);
323 #endif
324
325 #if ENABLE(VIBRATION)
326     WebVibrationProxy* vibration() { return m_vibration.get(); }
327 #endif
328
329 #if ENABLE(FULLSCREEN_API)
330     WebFullScreenManagerProxy* fullScreenManager();
331 #endif
332 #if (PLATFORM(IOS) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
333     WebPlaybackSessionManagerProxy* playbackSessionManager();
334     WebVideoFullscreenManagerProxy* videoFullscreenManager();
335 #endif
336
337 #if PLATFORM(IOS)
338     bool allowsMediaDocumentInlinePlayback() const;
339     void setAllowsMediaDocumentInlinePlayback(bool);
340 #endif
341
342 #if ENABLE(CONTEXT_MENUS)
343     API::ContextMenuClient& contextMenuClient() { return *m_contextMenuClient; }
344     void setContextMenuClient(std::unique_ptr<API::ContextMenuClient>);
345 #endif
346     API::FindClient& findClient() { return *m_findClient; }
347     void setFindClient(std::unique_ptr<API::FindClient>);
348     API::FindMatchesClient& findMatchesClient() { return *m_findMatchesClient; }
349     void setFindMatchesClient(std::unique_ptr<API::FindMatchesClient>);
350     API::DiagnosticLoggingClient& diagnosticLoggingClient() { return *m_diagnosticLoggingClient; }
351     void setDiagnosticLoggingClient(std::unique_ptr<API::DiagnosticLoggingClient>);
352     void setFormClient(std::unique_ptr<API::FormClient>);
353     void setNavigationClient(std::unique_ptr<API::NavigationClient>);
354     void setHistoryClient(std::unique_ptr<API::HistoryClient>);
355     void setLoaderClient(std::unique_ptr<API::LoaderClient>);
356     void setPolicyClient(std::unique_ptr<API::PolicyClient>);
357     void setInjectedBundleClient(const WKPageInjectedBundleClientBase*);
358     WebPageInjectedBundleClient* injectedBundleClient() { return m_injectedBundleClient.get(); }
359
360     API::UIClient& uiClient() { return *m_uiClient; }
361     void setUIClient(std::unique_ptr<API::UIClient>);
362
363     void initializeWebPage();
364
365     void close();
366     bool tryClose();
367     bool isClosed() const { return m_isClosed; }
368
369     void closePage(bool stopResponsivenessTimer);
370
371     void addPlatformLoadParameters(LoadParameters&);
372     RefPtr<API::Navigation> loadRequest(const WebCore::ResourceRequest&, WebCore::ShouldOpenExternalURLsPolicy = WebCore::ShouldOpenExternalURLsPolicy::ShouldAllowExternalSchemes, API::Object* userData = nullptr);
373     RefPtr<API::Navigation> loadFile(const String& fileURL, const String& resourceDirectoryURL, API::Object* userData = nullptr);
374     RefPtr<API::Navigation> loadData(API::Data*, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData = nullptr);
375     RefPtr<API::Navigation> loadHTMLString(const String& htmlString, const String& baseURL, API::Object* userData = nullptr);
376     void loadAlternateHTMLString(const String& htmlString, const String& baseURL, const String& unreachableURL, API::Object* userData = nullptr);
377     void loadPlainTextString(const String&, API::Object* userData = nullptr);
378     void loadWebArchiveData(API::Data*, API::Object* userData = nullptr);
379     void navigateToPDFLinkWithSimulatedClick(const String& url, WebCore::IntPoint documentPoint, WebCore::IntPoint screenPoint);
380
381     void stopLoading();
382     RefPtr<API::Navigation> reload(bool reloadFromOrigin, bool contentBlockersEnabled);
383
384     RefPtr<API::Navigation> goForward();
385     RefPtr<API::Navigation> goBack();
386
387     RefPtr<API::Navigation> goToBackForwardItem(WebBackForwardListItem*);
388     void tryRestoreScrollPosition();
389     void didChangeBackForwardList(WebBackForwardListItem* addedItem, Vector<RefPtr<WebBackForwardListItem>> removed);
390     void willGoToBackForwardListItem(uint64_t itemID, const UserData&);
391
392     bool shouldKeepCurrentBackForwardListItemInList(WebBackForwardListItem*);
393
394     bool willHandleHorizontalScrollEvents() const;
395
396     bool canShowMIMEType(const String& mimeType);
397
398     bool drawsBackground() const { return m_drawsBackground; }
399     void setDrawsBackground(bool);
400
401     float topContentInset() const { return m_topContentInset; }
402     void setTopContentInset(float);
403
404     WebCore::Color underlayColor() const { return m_underlayColor; }
405     void setUnderlayColor(const WebCore::Color&);
406
407     // At this time, m_pageExtendedBackgroundColor can be set via pageExtendedBackgroundColorDidChange() which is a message
408     // from the UIProcess, or by didCommitLayerTree(). When PLATFORM(MAC) adopts UI side compositing, we should get rid of
409     // the message entirely.
410     WebCore::Color pageExtendedBackgroundColor() const { return m_pageExtendedBackgroundColor; }
411
412     void viewWillStartLiveResize();
413     void viewWillEndLiveResize();
414
415     void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&, std::function<void (CallbackBase::Error)>);
416     
417     void clearSelection();
418     void restoreSelectionInFocusedEditableElement();
419
420     void setViewNeedsDisplay(const WebCore::Region&);
421     void requestScroll(const WebCore::FloatPoint& scrollPosition, const WebCore::IntPoint& scrollOrigin, bool isProgrammaticScroll);
422     
423     void setDelegatesScrolling(bool delegatesScrolling) { m_delegatesScrolling = delegatesScrolling; }
424     bool delegatesScrolling() const { return m_delegatesScrolling; }
425
426     enum class ViewStateChangeDispatchMode { Deferrable, Immediate };
427     void viewStateDidChange(WebCore::ViewState::Flags mayHaveChanged, bool wantsSynchronousReply = false, ViewStateChangeDispatchMode = ViewStateChangeDispatchMode::Deferrable);
428     bool isInWindow() const { return m_viewState & WebCore::ViewState::IsInWindow; }
429     void waitForDidUpdateViewState();
430     void didUpdateViewState() { m_waitingForDidUpdateViewState = false; }
431
432     void layerHostingModeDidChange();
433
434     WebCore::IntSize viewSize() const;
435     bool isViewVisible() const { return m_viewState & WebCore::ViewState::IsVisible; }
436     bool isViewWindowActive() const;
437
438     void addMIMETypeWithCustomContentProvider(const String& mimeType);
439
440     void executeEditCommand(const String& commandName, const String& argument = String());
441     void validateCommand(const String& commandName, std::function<void (const String&, bool, int32_t, CallbackBase::Error)>);
442
443     const EditorState& editorState() const { return m_editorState; }
444     bool canDelete() const { return hasSelectedRange() && isContentEditable(); }
445     bool hasSelectedRange() const { return m_editorState.selectionIsRange; }
446     bool isContentEditable() const { return m_editorState.isContentEditable; }
447     
448     bool maintainsInactiveSelection() const { return m_maintainsInactiveSelection; }
449     void setMaintainsInactiveSelection(bool);
450     void setEditable(bool);
451     bool isEditable() const { return m_isEditable; }
452
453 #if PLATFORM(IOS)
454     void executeEditCommand(const String& commandName, std::function<void (CallbackBase::Error)>);
455     double displayedContentScale() const { return m_lastVisibleContentRectUpdate.scale(); }
456     const WebCore::FloatRect& exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedContentRect(); }
457     const WebCore::FloatRect& unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredContentRect(); }
458
459     void updateVisibleContentRects(const VisibleContentRectUpdateInfo&);
460     void resendLastVisibleContentRects();
461
462     enum class UnobscuredRectConstraint { ConstrainedToDocumentRect, Unconstrained };
463     WebCore::FloatRect computeCustomFixedPositionRect(const WebCore::FloatRect& unobscuredContentRect, double displayedContentScale, UnobscuredRectConstraint = UnobscuredRectConstraint::Unconstrained) const;
464     void overflowScrollViewWillStartPanGesture();
465     void overflowScrollViewDidScroll();
466     void overflowScrollWillStartScroll();
467     void overflowScrollDidEndScroll();
468
469     void dynamicViewportSizeUpdate(const WebCore::FloatSize& minimumLayoutSize, const WebCore::FloatSize& maximumUnobscuredSize, const WebCore::FloatRect& targetExposedContentRect, const WebCore::FloatRect& targetUnobscuredRect, const WebCore::FloatRect& targetUnobscuredRectInScrollViewCoordinates, double targetScale, int32_t deviceOrientation);
470     void synchronizeDynamicViewportUpdate();
471
472     void setViewportConfigurationMinimumLayoutSize(const WebCore::FloatSize&);
473     void setMaximumUnobscuredSize(const WebCore::FloatSize&);
474     void setDeviceOrientation(int32_t);
475     int32_t deviceOrientation() const { return m_deviceOrientation; }
476     void willCommitLayerTree(uint64_t transactionID);
477
478     void selectWithGesture(const WebCore::IntPoint, WebCore::TextGranularity, uint32_t gestureType, uint32_t gestureState, bool isInteractingWithAssistedNode, std::function<void (const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t, CallbackBase::Error)>);
479     void updateSelectionWithTouches(const WebCore::IntPoint, uint32_t touches, bool baseIsStart, std::function<void (const WebCore::IntPoint&, uint32_t, uint32_t, CallbackBase::Error)>);
480     void selectWithTwoTouches(const WebCore::IntPoint from, const WebCore::IntPoint to, uint32_t gestureType, uint32_t gestureState, std::function<void (const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t, CallbackBase::Error)>);
481     void updateBlockSelectionWithTouch(const WebCore::IntPoint, uint32_t touch, uint32_t handlePosition);
482     void extendSelection(WebCore::TextGranularity);
483     void selectWordBackward();
484     void moveSelectionByOffset(int32_t offset, std::function<void (CallbackBase::Error)>);
485     void selectTextWithGranularityAtPoint(const WebCore::IntPoint, WebCore::TextGranularity, bool isInteractingWithAssistedNode, std::function<void (CallbackBase::Error)>);
486     void selectPositionAtPoint(const WebCore::IntPoint, bool isInteractingWithAssistedNode, std::function<void (CallbackBase::Error)>);
487     void selectPositionAtBoundaryWithDirection(const WebCore::IntPoint, WebCore::TextGranularity, WebCore::SelectionDirection, bool isInteractingWithAssistedNode, std::function<void (CallbackBase::Error)>);
488     void moveSelectionAtBoundaryWithDirection(WebCore::TextGranularity, WebCore::SelectionDirection, std::function<void(CallbackBase::Error)>);
489     void beginSelectionInDirection(WebCore::SelectionDirection, std::function<void (uint64_t, CallbackBase::Error)>);
490     void updateSelectionWithExtentPoint(const WebCore::IntPoint, bool isInteractingWithAssistedNode, std::function<void (uint64_t, CallbackBase::Error)>);
491     void updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint, WebCore::TextGranularity, bool isInteractingWithAssistedNode, std::function<void(uint64_t, CallbackBase::Error)>);
492     void requestAutocorrectionData(const String& textForAutocorrection, std::function<void (const Vector<WebCore::FloatRect>&, const String&, double, uint64_t, CallbackBase::Error)>);
493     void applyAutocorrection(const String& correction, const String& originalText, std::function<void (const String&, CallbackBase::Error)>);
494     bool applyAutocorrection(const String& correction, const String& originalText);
495     void requestAutocorrectionContext(std::function<void (const String&, const String&, const String&, const String&, uint64_t, uint64_t, CallbackBase::Error)>);
496     void getAutocorrectionContext(String& contextBefore, String& markedText, String& selectedText, String& contextAfter, uint64_t& location, uint64_t& length);
497     void requestDictationContext(std::function<void (const String&, const String&, const String&, CallbackBase::Error)>);
498     void replaceDictatedText(const String& oldText, const String& newText);
499     void replaceSelectedText(const String& oldText, const String& newText);
500     void didReceivePositionInformation(const InteractionInformationAtPosition&);
501     void getPositionInformation(const WebCore::IntPoint&, InteractionInformationAtPosition&);
502     void requestPositionInformation(const WebCore::IntPoint&);
503     void startInteractionWithElementAtPosition(const WebCore::IntPoint&);
504     void stopInteraction();
505     void performActionOnElement(uint32_t action);
506     void saveImageToLibrary(const SharedMemory::Handle& imageHandle, uint64_t imageSize);
507     void didUpdateBlockSelectionWithTouch(uint32_t touch, uint32_t flags, float growThreshold, float shrinkThreshold);
508     void focusNextAssistedNode(bool isForward, std::function<void (CallbackBase::Error)>);
509     void setAssistedNodeValue(const String&);
510     void setAssistedNodeValueAsNumber(double);
511     void setAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection = false);
512     void applicationDidEnterBackground();
513     void applicationDidFinishSnapshottingAfterEnteringBackground();
514     void applicationWillEnterForeground();
515     void applicationWillResignActive();
516     void applicationDidBecomeActive();
517     void zoomToRect(WebCore::FloatRect, double minimumScale, double maximumScale);
518     void commitPotentialTapFailed();
519     void didNotHandleTapAsClick(const WebCore::IntPoint&);
520     void disableDoubleTapGesturesDuringTapIfNecessary(uint64_t requestID);
521     void contentSizeCategoryDidChange(const String& contentSizeCategory);
522     void getSelectionContext(std::function<void(const String&, const String&, const String&, CallbackBase::Error)>);
523     void handleTwoFingerTapAtPoint(const WebCore::IntPoint&, uint64_t requestID);
524     void setForceAlwaysUserScalable(bool);
525 #endif
526 #if ENABLE(DATA_DETECTION)
527     void setDataDetectionResult(const DataDetectionResult&);
528 #endif
529     void didCommitLayerTree(const WebKit::RemoteLayerTreeTransaction&);
530     void layerTreeCommitComplete();
531
532 #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
533     void didRenderFrame(const WebCore::IntSize& contentsSize, const WebCore::IntRect& coveredRect);
534     void commitPageTransitionViewport();
535 #endif
536 #if PLATFORM(EFL)
537     void setThemePath(const String&);
538 #endif
539
540 #if PLATFORM(GTK)
541     void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
542     void confirmComposition(const String& compositionString, int64_t selectionStart, int64_t selectionLength);
543     void cancelComposition();
544 #endif
545
546 #if PLATFORM(GTK)
547     void setInputMethodState(bool enabled);
548 #endif
549
550 #if PLATFORM (GTK) && HAVE(GTK_GESTURES)
551     void getCenterForZoomGesture(const WebCore::IntPoint& centerInViewCoordinates, WebCore::IntPoint& center);
552 #endif
553
554 #if PLATFORM(COCOA)
555     void windowAndViewFramesChanged(const WebCore::FloatRect& viewFrameInWindowCoordinates, const WebCore::FloatPoint& accessibilityViewCoordinates);
556     void setMainFrameIsScrollable(bool);
557
558     void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
559     bool shouldDelayWindowOrderingForEvent(const WebMouseEvent&);
560     bool acceptsFirstMouse(int eventNumber, const WebMouseEvent&);
561
562     void setAcceleratedCompositingRootLayer(LayerOrView*);
563     LayerOrView* acceleratedCompositingRootLayer() const;
564
565     void insertTextAsync(const String& text, const EditingRange& replacementRange, bool registerUndoGroup = false, EditingRangeIsRelativeTo = EditingRangeIsRelativeTo::EditableRoot);
566     void getMarkedRangeAsync(std::function<void (EditingRange, CallbackBase::Error)>);
567     void getSelectedRangeAsync(std::function<void (EditingRange, CallbackBase::Error)>);
568     void characterIndexForPointAsync(const WebCore::IntPoint&, std::function<void (uint64_t, CallbackBase::Error)>);
569     void firstRectForCharacterRangeAsync(const EditingRange&, std::function<void (const WebCore::IntRect&, const EditingRange&, CallbackBase::Error)>);
570     void setCompositionAsync(const String& text, Vector<WebCore::CompositionUnderline> underlines, const EditingRange& selectionRange, const EditingRange& replacementRange);
571     void confirmCompositionAsync();
572
573     void setScrollPerformanceDataCollectionEnabled(bool);
574     bool scrollPerformanceDataCollectionEnabled() const { return m_scrollPerformanceDataCollectionEnabled; }
575     RemoteLayerTreeScrollingPerformanceData* scrollingPerformanceData() { return m_scrollingPerformanceData.get(); }
576 #endif // PLATFORM(COCOA)
577
578 #if PLATFORM(MAC)
579     void insertDictatedTextAsync(const String& text, const EditingRange& replacementRange, const Vector<WebCore::TextAlternativeWithRange>& dictationAlternatives, bool registerUndoGroup);
580     void attributedSubstringForCharacterRangeAsync(const EditingRange&, std::function<void (const AttributedString&, const EditingRange&, CallbackBase::Error)>);
581     void setFont(const String& fontFamily, double fontSize, uint64_t fontTraits);
582     void fontAtSelection(std::function<void (const String&, double, bool, CallbackBase::Error)>);
583
584     void startWindowDrag();
585     NSWindow *platformWindow();
586     void rootViewToWindow(const WebCore::IntRect& viewRect, WebCore::IntRect& windowRect);
587
588 #if WK_API_ENABLED
589     NSView *inspectorAttachmentView();
590     _WKRemoteObjectRegistry *remoteObjectRegistry();
591 #endif
592
593     void intrinsicContentSizeDidChange(const WebCore::IntSize& intrinsicContentSize);
594     CGRect boundsOfLayerInLayerBackedWindowCoordinates(CALayer *) const;
595 #endif // PLATFORM(MAC)
596
597 #if PLATFORM(EFL)
598     void handleInputMethodKeydown(bool& handled);
599     void confirmComposition(const String&);
600     void setComposition(const String&, Vector<WebCore::CompositionUnderline>&, int);
601     void cancelComposition();
602 #endif
603
604 #if PLATFORM(GTK)
605     PlatformWidget viewWidget();
606     const WebCore::Color& backgroundColor() const { return m_backgroundColor; }
607     void setBackgroundColor(const WebCore::Color& color) { m_backgroundColor = color; }
608 #endif
609
610     void handleMouseEvent(const NativeWebMouseEvent&);
611     void handleWheelEvent(const NativeWebWheelEvent&);
612     void handleKeyboardEvent(const NativeWebKeyboardEvent&);
613
614 #if ENABLE(MAC_GESTURE_EVENTS)
615     void handleGestureEvent(const NativeWebGestureEvent&);
616 #endif
617
618 #if ENABLE(IOS_TOUCH_EVENTS)
619     void handleTouchEventSynchronously(NativeWebTouchEvent&);
620     void handleTouchEventAsynchronously(const NativeWebTouchEvent&);
621
622 #elif ENABLE(TOUCH_EVENTS)
623     void handleTouchEvent(const NativeWebTouchEvent&);
624 #endif
625
626     void scrollBy(WebCore::ScrollDirection, WebCore::ScrollGranularity);
627     void centerSelectionInVisibleArea();
628
629     const String& toolTip() const { return m_toolTip; }
630
631     const String& userAgent() const { return m_userAgent; }
632     void setApplicationNameForUserAgent(const String&);
633     const String& applicationNameForUserAgent() const { return m_applicationNameForUserAgent; }
634     void setCustomUserAgent(const String&);
635     const String& customUserAgent() const { return m_customUserAgent; }
636     static String standardUserAgent(const String& applicationName = String());
637
638     bool supportsTextEncoding() const;
639     void setCustomTextEncodingName(const String&);
640     String customTextEncodingName() const { return m_customTextEncodingName; }
641
642     bool areActiveDOMObjectsAndAnimationsSuspended() const { return m_isPageSuspended; }
643     void resumeActiveDOMObjectsAndAnimations();
644     void suspendActiveDOMObjectsAndAnimations();
645
646     double estimatedProgress() const;
647
648     void terminateProcess();
649
650     SessionState sessionState(const std::function<bool (WebBackForwardListItem&)>& = nullptr) const;
651     RefPtr<API::Navigation> restoreFromSessionState(SessionState, bool navigate);
652
653     bool supportsTextZoom() const;
654     double textZoomFactor() const { return m_textZoomFactor; }
655     void setTextZoomFactor(double);
656     double pageZoomFactor() const;
657     void setPageZoomFactor(double);
658     void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
659
660     void scalePage(double scale, const WebCore::IntPoint& origin);
661     void scalePageInViewCoordinates(double scale, const WebCore::IntPoint& centerInViewCoordinates);
662     double pageScaleFactor() const;
663     double viewScaleFactor() const { return m_viewScaleFactor; }
664     void scaleView(double scale);
665     void setShouldScaleViewToFitDocument(bool);
666     
667     float deviceScaleFactor() const;
668     void setIntrinsicDeviceScaleFactor(float);
669     void setCustomDeviceScaleFactor(float);
670     void windowScreenDidChange(WebCore::PlatformDisplayID);
671
672     void setUseFixedLayout(bool);
673     void setFixedLayoutSize(const WebCore::IntSize&);
674     bool useFixedLayout() const { return m_useFixedLayout; };
675     const WebCore::IntSize& fixedLayoutSize() const { return m_fixedLayoutSize; };
676
677     void listenForLayoutMilestones(WebCore::LayoutMilestones);
678
679     bool hasHorizontalScrollbar() const { return m_mainFrameHasHorizontalScrollbar; }
680     bool hasVerticalScrollbar() const { return m_mainFrameHasVerticalScrollbar; }
681
682     void setSuppressScrollbarAnimations(bool);
683     bool areScrollbarAnimationsSuppressed() const { return m_suppressScrollbarAnimations; }
684
685     bool isPinnedToLeftSide() const { return m_mainFrameIsPinnedToLeftSide; }
686     bool isPinnedToRightSide() const { return m_mainFrameIsPinnedToRightSide; }
687     bool isPinnedToTopSide() const { return m_mainFrameIsPinnedToTopSide; }
688     bool isPinnedToBottomSide() const { return m_mainFrameIsPinnedToBottomSide; }
689
690     bool rubberBandsAtLeft() const;
691     void setRubberBandsAtLeft(bool);
692     bool rubberBandsAtRight() const;
693     void setRubberBandsAtRight(bool);
694     bool rubberBandsAtTop() const;
695     void setRubberBandsAtTop(bool);
696     bool rubberBandsAtBottom() const;
697     void setRubberBandsAtBottom(bool);
698
699     void setShouldUseImplicitRubberBandControl(bool shouldUseImplicitRubberBandControl) { m_shouldUseImplicitRubberBandControl = shouldUseImplicitRubberBandControl; }
700     bool shouldUseImplicitRubberBandControl() const { return m_shouldUseImplicitRubberBandControl; }
701         
702     void setEnableVerticalRubberBanding(bool);
703     bool verticalRubberBandingIsEnabled() const;
704     void setEnableHorizontalRubberBanding(bool);
705     bool horizontalRubberBandingIsEnabled() const;
706         
707     void setBackgroundExtendsBeyondPage(bool);
708     bool backgroundExtendsBeyondPage() const;
709
710     void setPaginationMode(WebCore::Pagination::Mode);
711     WebCore::Pagination::Mode paginationMode() const { return m_paginationMode; }
712     void setPaginationBehavesLikeColumns(bool);
713     bool paginationBehavesLikeColumns() const { return m_paginationBehavesLikeColumns; }
714     void setPageLength(double);
715     double pageLength() const { return m_pageLength; }
716     void setGapBetweenPages(double);
717     double gapBetweenPages() const { return m_gapBetweenPages; }
718     void setPaginationLineGridEnabled(bool);
719     bool paginationLineGridEnabled() const { return m_paginationLineGridEnabled; }
720     unsigned pageCount() const { return m_pageCount; }
721
722 #if PLATFORM(COCOA)
723     // Called by the web process through a message.
724     void registerWebProcessAccessibilityToken(const IPC::DataReference&);
725     // Called by the UI process when it is ready to send its tokens to the web process.
726     void registerUIProcessAccessibilityTokens(const IPC::DataReference& elemenToken, const IPC::DataReference& windowToken);
727     bool readSelectionFromPasteboard(const String& pasteboardName);
728     String stringSelectionForPasteboard();
729     RefPtr<WebCore::SharedBuffer> dataSelectionForPasteboard(const String& pasteboardType);
730     void makeFirstResponder();
731
732     ColorSpaceData colorSpace();
733 #endif
734
735 #if ENABLE(SERVICE_CONTROLS)
736     void replaceSelectionWithPasteboardData(const Vector<String>& types, const IPC::DataReference&);
737 #endif
738
739     void pageScaleFactorDidChange(double);
740     void pluginScaleFactorDidChange(double);
741     void pluginZoomFactorDidChange(double);
742
743     // Find.
744     void findString(const String&, FindOptions, unsigned maxMatchCount);
745     void findStringMatches(const String&, FindOptions, unsigned maxMatchCount);
746     void getImageForFindMatch(int32_t matchIndex);
747     void selectFindMatch(int32_t matchIndex);
748     void didGetImageForFindMatch(const ShareableBitmap::Handle& contentImageHandle, uint32_t matchIndex);
749     void hideFindUI();
750     void countStringMatches(const String&, FindOptions, unsigned maxMatchCount);
751     void didCountStringMatches(const String&, uint32_t matchCount);
752     void setTextIndicator(const WebCore::TextIndicatorData&, uint64_t /* WebCore::TextIndicatorWindowLifetime */ lifetime = 0 /* Permanent */);
753     void setTextIndicatorAnimationProgress(float);
754     void clearTextIndicator();
755     void didFindString(const String&, const Vector<WebCore::IntRect>&, uint32_t matchCount, int32_t matchIndex);
756     void didFailToFindString(const String&);
757     void didFindStringMatches(const String&, const Vector<Vector<WebCore::IntRect>>& matchRects, int32_t firstIndexAfterSelection);
758
759     void getContentsAsString(std::function<void (const String&, CallbackBase::Error)>);
760     void getBytecodeProfile(std::function<void (const String&, CallbackBase::Error)>);
761     void isWebProcessResponsive(std::function<void (bool isWebProcessResponsive)>);
762
763 #if ENABLE(MHTML)
764     void getContentsAsMHTMLData(std::function<void (API::Data*, CallbackBase::Error)>);
765 #endif
766     void getMainResourceDataOfFrame(WebFrameProxy*, std::function<void (API::Data*, CallbackBase::Error)>);
767     void getResourceDataFromFrame(WebFrameProxy*, API::URL*, std::function<void (API::Data*, CallbackBase::Error)>);
768     void getRenderTreeExternalRepresentation(std::function<void (const String&, CallbackBase::Error)>);
769     void getSelectionOrContentsAsString(std::function<void (const String&, CallbackBase::Error)>);
770     void getSelectionAsWebArchiveData(std::function<void (API::Data*, CallbackBase::Error)>);
771     void getSourceForFrame(WebFrameProxy*, std::function<void (const String&, CallbackBase::Error)>);
772     void getWebArchiveOfFrame(WebFrameProxy*, std::function<void (API::Data*, CallbackBase::Error)>);
773     void runJavaScriptInMainFrame(const String&, std::function<void (API::SerializedScriptValue*, bool hadException, const WebCore::ExceptionDetails&, CallbackBase::Error)> callbackFunction);
774     void forceRepaint(PassRefPtr<VoidCallback>);
775
776     float headerHeight(WebFrameProxy*);
777     float footerHeight(WebFrameProxy*);
778     void drawHeader(WebFrameProxy*, const WebCore::FloatRect&);
779     void drawFooter(WebFrameProxy*, const WebCore::FloatRect&);
780
781 #if PLATFORM(COCOA)
782     // Dictionary.
783     void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
784     void performDictionaryLookupOfCurrentSelection();
785 #endif
786
787     void receivedPolicyDecision(WebCore::PolicyAction, WebFrameProxy*, uint64_t listenerID, API::Navigation* navigationID);
788
789     void backForwardRemovedItem(uint64_t itemID);
790
791 #if ENABLE(DRAG_SUPPORT)    
792     // Drag and drop support.
793     void dragEntered(WebCore::DragData&, const String& dragStorageName = String());
794     void dragUpdated(WebCore::DragData&, const String& dragStorageName = String());
795     void dragExited(WebCore::DragData&, const String& dragStorageName = String());
796     void performDragOperation(WebCore::DragData&, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
797
798     void didPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted);
799     void dragEnded(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t operation);
800 #if PLATFORM(COCOA)
801     void setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, bool isLinkDrag);
802     void setPromisedDataForImage(const String& pasteboardName, const SharedMemory::Handle& imageHandle, uint64_t imageSize, const String& filename, const String& extension,
803                          const String& title, const String& url, const String& visibleURL, const SharedMemory::Handle& archiveHandle, uint64_t archiveSize);
804 #if ENABLE(ATTACHMENT_ELEMENT)
805     void setPromisedDataForAttachment(const String& pasteboardName, const String& filename, const String& extension, const String& title, const String& url, const String& visibleURL);
806 #endif
807 #endif
808 #if PLATFORM(GTK)
809     void startDrag(const WebCore::DragData&, const ShareableBitmap::Handle& dragImage);
810 #endif
811 #endif
812
813     void processDidBecomeUnresponsive();
814     void processDidBecomeResponsive();
815     void processDidCrash();
816     void willChangeProcessIsResponsive();
817     void didChangeProcessIsResponsive();
818
819 #if PLATFORM(IOS)
820     void processWillBecomeSuspended();
821     void processWillBecomeForeground();
822 #endif
823
824     virtual void enterAcceleratedCompositingMode(const LayerTreeContext&);
825     virtual void exitAcceleratedCompositingMode();
826     virtual void updateAcceleratedCompositingMode(const LayerTreeContext&);
827
828     enum UndoOrRedo { Undo, Redo };
829     void addEditCommand(WebEditCommandProxy*);
830     void removeEditCommand(WebEditCommandProxy*);
831     bool isValidEditCommand(WebEditCommandProxy*);
832     void registerEditCommand(PassRefPtr<WebEditCommandProxy>, UndoOrRedo);
833
834 #if PLATFORM(COCOA)
835     void registerKeypressCommandName(const String& name) { m_knownKeypressCommandNames.add(name); }
836     bool isValidKeypressCommandName(const String& name) const { return m_knownKeypressCommandNames.contains(name); }
837 #endif
838
839     WebProcessProxy& process() { return m_process; }
840     pid_t processIdentifier() const;
841
842     WebPreferences& preferences() { return m_preferences; }
843     void setPreferences(WebPreferences&);
844
845     WebPageGroup& pageGroup() { return m_pageGroup; }
846
847     bool isValid() const;
848
849 #if ENABLE(DRAG_SUPPORT)
850     WebCore::DragOperation currentDragOperation() const { return m_currentDragOperation; }
851     bool currentDragIsOverFileInput() const { return m_currentDragIsOverFileInput; }
852     unsigned currentDragNumberOfFilesToBeAccepted() const { return m_currentDragNumberOfFilesToBeAccepted; }
853     void resetCurrentDragInformation()
854     {
855         m_currentDragOperation = WebCore::DragOperationNone;
856         m_currentDragIsOverFileInput = false;
857         m_currentDragNumberOfFilesToBeAccepted = 0;
858     }
859 #endif
860
861     void preferencesDidChange();
862
863 #if ENABLE(CONTEXT_MENUS)
864     // Called by the WebContextMenuProxy.
865     void contextMenuItemSelected(const WebContextMenuItemData&);
866 #endif
867
868     // Called by the WebOpenPanelResultListenerProxy.
869 #if PLATFORM(IOS)
870     void didChooseFilesForOpenPanelWithDisplayStringAndIcon(const Vector<String>&, const String& displayString, const API::Data* iconData);
871 #endif
872     void didChooseFilesForOpenPanel(const Vector<String>&);
873     void didCancelForOpenPanel();
874
875     WebPageCreationParameters creationParameters();
876
877 #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
878     void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize&);
879 #endif
880
881     void handleDownloadRequest(DownloadProxy*);
882
883     void advanceToNextMisspelling(bool startBeforeSelection);
884     void changeSpellingToWord(const String& word);
885 #if USE(APPKIT)
886     void uppercaseWord();
887     void lowercaseWord();
888     void capitalizeWord();
889 #endif
890
891 #if PLATFORM(COCOA)
892     bool isSmartInsertDeleteEnabled() const { return m_isSmartInsertDeleteEnabled; }
893     void setSmartInsertDeleteEnabled(bool);
894 #endif
895
896 #if PLATFORM(GTK)
897     String accessibilityPlugID() const { return m_accessibilityPlugID; }
898 #endif
899
900     void setCanRunModal(bool);
901     bool canRunModal();
902
903     void beginPrinting(WebFrameProxy*, const PrintInfo&);
904     void endPrinting();
905     void computePagesForPrinting(WebFrameProxy*, const PrintInfo&, PassRefPtr<ComputedPagesCallback>);
906 #if PLATFORM(COCOA)
907     void drawRectToImage(WebFrameProxy*, const PrintInfo&, const WebCore::IntRect&, const WebCore::IntSize&, PassRefPtr<ImageCallback>);
908     void drawPagesToPDF(WebFrameProxy*, const PrintInfo&, uint32_t first, uint32_t count, PassRefPtr<DataCallback>);
909 #if PLATFORM(IOS)
910     uint32_t computePagesForPrintingAndDrawToPDF(uint64_t frameID, const PrintInfo&, DrawToPDFCallback::CallbackFunction&&);
911     void drawToPDFCallback(const IPC::DataReference& pdfData, uint64_t callbackID);
912 #endif
913 #elif PLATFORM(GTK)
914     void drawPagesForPrinting(WebFrameProxy*, const PrintInfo&, PassRefPtr<PrintFinishedCallback>);
915 #endif
916
917     PageLoadState& pageLoadState() { return m_pageLoadState; }
918
919 #if PLATFORM(COCOA)
920     void handleAlternativeTextUIResult(const String& result);
921 #endif
922
923     void saveDataToFileInDownloadsFolder(const String& suggestedFilename, const String& mimeType, const String& originatingURLString, API::Data*);
924     void savePDFToFileInDownloadsFolder(const String& suggestedFilename, const String& originatingURLString, const IPC::DataReference&);
925 #if PLATFORM(COCOA)
926     void savePDFToTemporaryFolderAndOpenWithNativeApplicationRaw(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size, const String& pdfUUID);
927     void savePDFToTemporaryFolderAndOpenWithNativeApplication(const String& suggestedFilename, const String& originatingURLString, const IPC::DataReference&, const String& pdfUUID);
928     void openPDFFromTemporaryFolderWithNativeApplication(const String& pdfUUID);
929 #endif
930
931     WebCore::IntRect visibleScrollerThumbRect() const { return m_visibleScrollerThumbRect; }
932
933     uint64_t renderTreeSize() const { return m_renderTreeSize; }
934
935     void printMainFrame();
936     
937     void setMediaVolume(float);
938     void setMuted(bool);
939     void setMayStartMediaWhenInWindow(bool);
940     bool mayStartMediaWhenInWindow() const { return m_mayStartMediaWhenInWindow; }
941         
942 #if ENABLE(MEDIA_SESSION)
943     bool hasMediaSessionWithActiveMediaElements() const { return m_hasMediaSessionWithActiveMediaElements; }
944     void handleMediaEvent(WebCore::MediaEventType);
945     void setVolumeOfMediaElement(double, uint64_t);
946 #endif
947
948     // WebPopupMenuProxy::Client
949     NativeWebMouseEvent* currentlyProcessedMouseDownEvent() override;
950
951     void setSuppressVisibilityUpdates(bool flag);
952     bool suppressVisibilityUpdates() { return m_suppressVisibilityUpdates; }
953
954 #if PLATFORM(IOS)
955     void willStartUserTriggeredZooming();
956
957     void potentialTapAtPosition(const WebCore::FloatPoint&, uint64_t& requestID);
958     void commitPotentialTap();
959     void cancelPotentialTap();
960     void tapHighlightAtPosition(const WebCore::FloatPoint&, uint64_t& requestID);
961     void handleTap(const WebCore::FloatPoint&);
962
963     void inspectorNodeSearchMovedToPosition(const WebCore::FloatPoint&);
964     void inspectorNodeSearchEndedAtPosition(const WebCore::FloatPoint&);
965
966     void blurAssistedNode();
967 #endif
968
969     void postMessageToInjectedBundle(const String& messageName, API::Object* messageBody);
970
971 #if ENABLE(INPUT_TYPE_COLOR)
972     void setColorPickerColor(const WebCore::Color&);
973     void endColorPicker();
974 #endif
975
976     WebCore::IntSize minimumLayoutSize() const { return m_minimumLayoutSize; }
977     void setMinimumLayoutSize(const WebCore::IntSize&);
978
979     bool autoSizingShouldExpandToViewHeight() const { return m_autoSizingShouldExpandToViewHeight; }
980     void setAutoSizingShouldExpandToViewHeight(bool);
981
982     void didReceiveAuthenticationChallengeProxy(uint64_t frameID, PassRefPtr<AuthenticationChallengeProxy>);
983
984     int64_t spellDocumentTag();
985     void didFinishCheckingText(uint64_t requestID, const Vector<WebCore::TextCheckingResult>&);
986     void didCancelCheckingText(uint64_t requestID);
987
988     void connectionWillOpen(IPC::Connection&);
989     void webProcessWillShutDown();
990
991     void processDidFinishLaunching();
992
993     void didSaveToPageCache();
994         
995     void setScrollPinningBehavior(WebCore::ScrollPinningBehavior);
996     WebCore::ScrollPinningBehavior scrollPinningBehavior() const { return m_scrollPinningBehavior; }
997
998     void setOverlayScrollbarStyle(WTF::Optional<WebCore::ScrollbarOverlayStyle>);
999     WTF::Optional<WebCore::ScrollbarOverlayStyle> overlayScrollbarStyle() const { return m_scrollbarOverlayStyle; }
1000
1001     bool shouldRecordNavigationSnapshots() const { return m_shouldRecordNavigationSnapshots; }
1002     void setShouldRecordNavigationSnapshots(bool shouldRecordSnapshots) { m_shouldRecordNavigationSnapshots = shouldRecordSnapshots; }
1003     void recordNavigationSnapshot();
1004     void recordNavigationSnapshot(WebBackForwardListItem&);
1005
1006 #if PLATFORM(COCOA)
1007     PassRefPtr<ViewSnapshot> takeViewSnapshot();
1008 #endif
1009
1010 #if ENABLE(SUBTLE_CRYPTO)
1011     void wrapCryptoKey(const Vector<uint8_t>&, bool& succeeded, Vector<uint8_t>&);
1012     void unwrapCryptoKey(const Vector<uint8_t>&, bool& succeeded, Vector<uint8_t>&);
1013 #endif
1014
1015     void takeSnapshot(WebCore::IntRect, WebCore::IntSize bitmapSize, SnapshotOptions, std::function<void (const ShareableBitmap::Handle&, CallbackBase::Error)>);
1016
1017     void navigationGestureDidBegin();
1018     void navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem&);
1019     void navigationGestureDidEnd(bool willNavigate, WebBackForwardListItem&);
1020     void navigationGestureDidEnd();
1021     void navigationGestureSnapshotWasRemoved();
1022     void willRecordNavigationSnapshot(WebBackForwardListItem&);
1023
1024     bool isShowingNavigationGestureSnapshot() const { return m_isShowingNavigationGestureSnapshot; }
1025
1026     bool isPlayingAudio() const { return !!(m_mediaState & WebCore::MediaProducer::IsPlayingAudio); }
1027     void isPlayingMediaDidChange(WebCore::MediaProducer::MediaStateFlags, uint64_t);
1028     WebCore::MediaProducer::MediaStateFlags mediaStateFlags() const { return m_mediaState; }
1029
1030 #if PLATFORM(MAC)
1031     void videoControlsManagerDidChange();
1032     bool hasActiveVideoForControlsManager() const;
1033     bool isPlayingVideoInEnhancedFullscreen() const;
1034 #endif
1035
1036 #if ENABLE(MEDIA_SESSION)
1037     void hasMediaSessionWithActiveMediaElementsDidChange(bool);
1038     void mediaSessionMetadataDidChange(const WebCore::MediaSessionMetadata&);
1039     void focusedContentMediaElementDidChange(uint64_t);
1040 #endif
1041
1042 #if PLATFORM(MAC)
1043     void removeNavigationGestureSnapshot();
1044
1045     API::HitTestResult* lastMouseMoveHitTestResult() const { return m_lastMouseMoveHitTestResult.get(); }
1046     void performImmediateActionHitTestAtLocation(WebCore::FloatPoint);
1047
1048     void immediateActionDidUpdate();
1049     void immediateActionDidCancel();
1050     void immediateActionDidComplete();
1051
1052     void* immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult>, uint64_t, RefPtr<API::Object>);
1053
1054     void installViewStateChangeCompletionHandler(void(^completionHandler)());
1055
1056     void handleAcceptedCandidate(WebCore::TextCheckingResult);
1057     void didHandleAcceptedCandidate();
1058 #endif
1059
1060 #if PLATFORM(EFL) && HAVE(ACCESSIBILITY) && defined(HAVE_ECORE_X)
1061     bool accessibilityObjectReadByPoint(const WebCore::IntPoint&);
1062     bool accessibilityObjectReadPrevious();
1063     bool accessibilityObjectReadNext();
1064 #endif
1065
1066 #if USE(UNIFIED_TEXT_CHECKING)
1067     void checkTextOfParagraph(const String& text, uint64_t checkingTypes, int32_t insertionPoint, Vector<WebCore::TextCheckingResult>& results);
1068 #endif
1069     void getGuessesForWord(const String& word, const String& context, int32_t insertionPoint, Vector<String>& guesses);
1070
1071     void setShouldDispatchFakeMouseMoveEvents(bool);
1072
1073     // Diagnostic messages logging.
1074     void logDiagnosticMessage(const String& message, const String& description, bool shouldSample);
1075     void logDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result, bool shouldSample);
1076     void logDiagnosticMessageWithValue(const String& message, const String& description, const String& value, bool shouldSample);
1077     void logSampledDiagnosticMessage(const String& message, const String& description);
1078     void logSampledDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result);
1079     void logSampledDiagnosticMessageWithValue(const String& message, const String& description, const String& value);
1080
1081 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
1082     void addPlaybackTargetPickerClient(uint64_t);
1083     void removePlaybackTargetPickerClient(uint64_t);
1084     void showPlaybackTargetPicker(uint64_t, const WebCore::FloatRect&, bool hasVideo);
1085     void playbackTargetPickerClientStateDidChange(uint64_t, WebCore::MediaProducer::MediaStateFlags);
1086     void setMockMediaPlaybackTargetPickerEnabled(bool);
1087     void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::State);
1088
1089     // WebMediaSessionManagerClient
1090     void setPlaybackTarget(uint64_t, Ref<WebCore::MediaPlaybackTarget>&&) override;
1091     void externalOutputDeviceAvailableDidChange(uint64_t, bool) override;
1092     void setShouldPlayToPlaybackTarget(uint64_t, bool) override;
1093 #endif
1094
1095     void didChangeBackgroundColor();
1096     void didLayoutForCustomContentProvider();
1097
1098     // For testing
1099     void clearWheelEventTestTrigger();
1100     void callAfterNextPresentationUpdate(std::function<void (CallbackBase::Error)>);
1101
1102     void didLayout(uint32_t layoutMilestones);
1103
1104     void didRestoreScrollPosition();
1105
1106     void setFocus(bool focused);
1107     void setWindowFrame(const WebCore::FloatRect&);
1108     void getWindowFrame(WebCore::FloatRect&);
1109
1110     bool isResourceCachingDisabled() const { return m_isResourceCachingDisabled; }
1111     void setResourceCachingDisabled(bool);
1112
1113     WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection();
1114     void setUserInterfaceLayoutDirection(WebCore::UserInterfaceLayoutDirection);
1115
1116     bool hasHadSelectionChangesFromUserInteraction() const { return m_hasHadSelectionChangesFromUserInteraction; }
1117
1118     bool isAlwaysOnLoggingAllowed() const;
1119
1120     void canAuthenticateAgainstProtectionSpace(uint64_t loaderID, uint64_t frameID, const WebCore::ProtectionSpace&);
1121
1122 private:
1123     WebPageProxy(PageClient&, WebProcessProxy&, uint64_t pageID, Ref<API::PageConfiguration>&&);
1124     void platformInitialize();
1125
1126     void updateViewState(WebCore::ViewState::Flags flagsToUpdate = WebCore::ViewState::AllFlags);
1127     void updateActivityToken();
1128     void updateProccessSuppressionState();
1129     void updateHiddenPageThrottlingAutoIncreases();
1130
1131     enum class ResetStateReason {
1132         PageInvalidated,
1133         WebProcessExited,
1134     };
1135     void resetState(ResetStateReason);
1136     void resetStateAfterProcessExited();
1137
1138     void setUserAgent(const String&);
1139
1140     // IPC::MessageReceiver
1141     // Implemented in generated WebPageProxyMessageReceiver.cpp
1142     void didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) override;
1143     void didReceiveSyncMessage(IPC::Connection&, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&) override;
1144
1145     // IPC::MessageSender
1146     bool sendMessage(std::unique_ptr<IPC::MessageEncoder>, unsigned messageSendFlags) override;
1147     IPC::Connection* messageSenderConnection() override;
1148     uint64_t messageSenderDestinationID() override;
1149
1150     // WebPopupMenuProxy::Client
1151     void valueChangedForPopupMenu(WebPopupMenuProxy*, int32_t newSelectedIndex) override;
1152     void setTextFromItemForPopupMenu(WebPopupMenuProxy*, int32_t index) override;
1153 #if PLATFORM(GTK)
1154     void failedToShowPopupMenu() override;
1155 #endif
1156
1157     void didCreateMainFrame(uint64_t frameID);
1158     void didCreateSubframe(uint64_t frameID);
1159
1160     void didStartProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& url, const String& unreachableURL, const UserData&);
1161     void didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const String&, const UserData&);
1162     void didChangeProvisionalURLForFrame(uint64_t frameID, uint64_t navigationID, const String& url);
1163     void didFailProvisionalLoadForFrame(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, const UserData&);
1164     void didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&, bool containsPluginDocument, const UserData&);
1165     void didFinishDocumentLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData&);
1166     void didFinishLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData&);
1167     void didFailLoadForFrame(uint64_t frameID, uint64_t navigationID, const WebCore::ResourceError&, const UserData&);
1168     void didSameDocumentNavigationForFrame(uint64_t frameID, uint64_t navigationID, uint32_t sameDocumentNavigationType, const String&, const UserData&);
1169     void didReceiveTitleForFrame(uint64_t frameID, const String&, const UserData&);
1170     void didFirstLayoutForFrame(uint64_t frameID, const UserData&);
1171     void didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, const UserData&);
1172     void didDisplayInsecureContentForFrame(uint64_t frameID, const UserData&);
1173     void didRunInsecureContentForFrame(uint64_t frameID, const UserData&);
1174     void didDetectXSSForFrame(uint64_t frameID, const UserData&);
1175     void mainFramePluginHandlesPageScaleGestureDidChange(bool);
1176     void frameDidBecomeFrameSet(uint64_t frameID, bool);
1177     void didStartProgress();
1178     void didChangeProgress(double);
1179     void didFinishProgress();
1180     void setNetworkRequestsInProgress(bool);
1181
1182     void didDestroyNavigation(uint64_t navigationID);
1183
1184     void decidePolicyForNavigationAction(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const NavigationActionData&, uint64_t originatingFrameID, const WebCore::SecurityOriginData& originatingFrameSecurityOrigin, const WebCore::ResourceRequest& originalRequest, const WebCore::ResourceRequest&, uint64_t listenerID, const UserData&, bool& receivedPolicyAction, uint64_t& newNavigationID, uint64_t& policyAction, DownloadID&);
1185     void decidePolicyForNewWindowAction(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, const NavigationActionData&, const WebCore::ResourceRequest&, const String& frameName, uint64_t listenerID, const UserData&);
1186     void decidePolicyForResponse(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, uint64_t listenerID, const UserData&);
1187     void decidePolicyForResponseSync(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, uint64_t listenerID, const UserData&, bool& receivedPolicyAction, uint64_t& policyAction, DownloadID&);
1188     void unableToImplementPolicy(uint64_t frameID, const WebCore::ResourceError&, const UserData&);
1189
1190     void willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const Vector<std::pair<String, String>>& textFieldValues, uint64_t listenerID, const UserData&);
1191
1192     // History client
1193     void didNavigateWithNavigationData(const WebNavigationDataStore&, uint64_t frameID);
1194     void didPerformClientRedirect(const String& sourceURLString, const String& destinationURLString, uint64_t frameID);
1195     void didPerformServerRedirect(const String& sourceURLString, const String& destinationURLString, uint64_t frameID);
1196     void didUpdateHistoryTitle(const String& title, const String& url, uint64_t frameID);
1197
1198     // UI client
1199     void createNewPage(uint64_t frameID, const WebCore::SecurityOriginData&, const WebCore::ResourceRequest&, const WebCore::WindowFeatures&, const NavigationActionData&, uint64_t& newPageID, WebPageCreationParameters&);
1200     void showPage();
1201     void runJavaScriptAlert(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply>);
1202     void runJavaScriptConfirm(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply>);
1203     void runJavaScriptPrompt(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply>);
1204     void setStatusText(const String&);
1205     void mouseDidMoveOverElement(const WebHitTestResultData&, uint32_t modifiers, const UserData&);
1206
1207 #if ENABLE(NETSCAPE_PLUGIN_API)
1208     void unavailablePluginButtonClicked(uint32_t opaquePluginUnavailabilityReason, const String& mimeType, const String& pluginURLString, const String& pluginsPageURLString, const String& frameURLString, const String& pageURLString);
1209 #endif // ENABLE(NETSCAPE_PLUGIN_API)
1210 #if ENABLE(WEBGL)
1211     void webGLPolicyForURL(const String& url, uint32_t& loadPolicy);
1212     void resolveWebGLPolicyForURL(const String& url, uint32_t& loadPolicy);
1213 #endif // ENABLE(WEBGL)
1214     void setToolbarsAreVisible(bool toolbarsAreVisible);
1215     void getToolbarsAreVisible(bool& toolbarsAreVisible);
1216     void setMenuBarIsVisible(bool menuBarIsVisible);
1217     void getMenuBarIsVisible(bool& menuBarIsVisible);
1218     void setStatusBarIsVisible(bool statusBarIsVisible);
1219     void getStatusBarIsVisible(bool& statusBarIsVisible);
1220     void setIsResizable(bool isResizable);
1221     void getIsResizable(bool& isResizable);
1222     void screenToRootView(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint);
1223     void rootViewToScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);
1224 #if PLATFORM(IOS)
1225     void accessibilityScreenToRootView(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint);
1226     void rootViewToAccessibilityScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);
1227 #endif
1228     void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, RefPtr<Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::DelayedReply>);
1229     void didChangeViewportProperties(const WebCore::ViewportAttributes&);
1230     void pageDidScroll();
1231     void runOpenPanel(uint64_t frameID, const WebCore::SecurityOriginData&, const WebCore::FileChooserSettings&);
1232     void printFrame(uint64_t frameID);
1233     void exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply>);
1234     void reachedApplicationCacheOriginQuota(const String& originIdentifier, uint64_t currentQuota, uint64_t totalBytesNeeded, PassRefPtr<Messages::WebPageProxy::ReachedApplicationCacheOriginQuota::DelayedReply>);
1235     void requestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_t frameID, String originIdentifier);
1236
1237     void requestUserMediaPermissionForFrame(uint64_t userMediaID, uint64_t frameID, String userMediaDocumentOriginIdentifier, String topLevelDocumentOriginIdentifier, const Vector<String>& audioDeviceUIDs, const Vector<String>& videoDeviceUIDs);
1238     void checkUserMediaPermissionForFrame(uint64_t userMediaID, uint64_t frameID, String userMediaDocumentOriginIdentifier, String topLevelDocumentOriginIdentifier);
1239
1240     void runModal();
1241     void notifyScrollerThumbIsVisibleInRect(const WebCore::IntRect&);
1242     void recommendedScrollbarStyleDidChange(int32_t newStyle);
1243     void didChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar);
1244     void didChangeScrollOffsetPinningForMainFrame(bool pinnedToLeftSide, bool pinnedToRightSide, bool pinnedToTopSide, bool pinnedToBottomSide);
1245     void didChangePageCount(unsigned);
1246     void pageExtendedBackgroundColorDidChange(const WebCore::Color&);
1247 #if ENABLE(NETSCAPE_PLUGIN_API)
1248     void didFailToInitializePlugin(const String& mimeType, const String& frameURLString, const String& pageURLString);
1249     void didBlockInsecurePluginVersion(const String& mimeType, const String& pluginURLString, const String& frameURLString, const String& pageURLString, bool replacementObscured);
1250 #endif // ENABLE(NETSCAPE_PLUGIN_API)
1251     void setCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents) { m_canShortCircuitHorizontalWheelEvents = canShortCircuitHorizontalWheelEvents; }
1252
1253     void reattachToWebProcess();
1254     RefPtr<API::Navigation> reattachToWebProcessForReload();
1255     RefPtr<API::Navigation> reattachToWebProcessWithItem(WebBackForwardListItem*);
1256
1257     void requestNotificationPermission(uint64_t notificationID, const String& originString);
1258     void showNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t notificationID);
1259     void cancelNotification(uint64_t notificationID);
1260     void clearNotifications(const Vector<uint64_t>& notificationIDs);
1261     void didDestroyNotification(uint64_t notificationID);
1262
1263 #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
1264     void pageDidRequestScroll(const WebCore::IntPoint&);
1265     void pageTransitionViewportReady();
1266     void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&);
1267 #endif
1268
1269     void didChangeContentSize(const WebCore::IntSize&);
1270
1271 #if ENABLE(INPUT_TYPE_COLOR)
1272     void showColorPicker(const WebCore::Color& initialColor, const WebCore::IntRect&);
1273     void didChooseColor(const WebCore::Color&) override;
1274     void didEndColorPicker() override;
1275 #endif
1276
1277     void editorStateChanged(const EditorState&);
1278     void compositionWasCanceled(const EditorState&);
1279     void setHasHadSelectionChangesFromUserInteraction(bool);
1280
1281     // Back/Forward list management
1282     void backForwardAddItem(uint64_t itemID);
1283     void backForwardGoToItem(uint64_t itemID, SandboxExtension::Handle&);
1284     void backForwardItemAtIndex(int32_t index, uint64_t& itemID);
1285     void backForwardBackListCount(int32_t& count);
1286     void backForwardForwardListCount(int32_t& count);
1287     void backForwardClear();
1288
1289     // Undo management
1290     void registerEditCommandForUndo(uint64_t commandID, uint32_t editAction);
1291     void registerInsertionUndoGrouping();
1292     void clearAllEditCommands();
1293     void canUndoRedo(uint32_t action, bool& result);
1294     void executeUndoRedo(uint32_t action, bool& result);
1295
1296     // Keyboard handling
1297 #if PLATFORM(COCOA)
1298     void executeSavedCommandBySelector(const String& selector, bool& handled);
1299 #endif
1300
1301 #if PLATFORM(GTK)
1302     void getEditorCommandsForKeyEvent(const AtomicString&, Vector<String>&);
1303     void bindAccessibilityTree(const String&);
1304 #endif
1305 #if PLATFORM(EFL)
1306     void getEditorCommandsForKeyEvent(Vector<String>&);
1307 #endif
1308
1309     // Popup Menu.
1310     void showPopupMenu(const WebCore::IntRect& rect, uint64_t textDirection, const Vector<WebPopupItem>& items, int32_t selectedIndex, const PlatformPopupMenuData&);
1311     void hidePopupMenu();
1312
1313 #if ENABLE(CONTEXT_MENUS)
1314     void showContextMenu(const ContextMenuContextData&, const UserData&);
1315     void internalShowContextMenu(const ContextMenuContextData&, const UserData&);
1316 #endif
1317
1318 #if ENABLE(TELEPHONE_NUMBER_DETECTION)
1319 #if PLATFORM(MAC)
1320     void showTelephoneNumberMenu(const String& telephoneNumber, const WebCore::IntPoint&);
1321 #endif
1322 #endif
1323
1324     // Search popup results
1325     void saveRecentSearches(const String&, const Vector<WebCore::RecentSearch>&);
1326     void loadRecentSearches(const String&, Vector<WebCore::RecentSearch>&);
1327
1328 #if PLATFORM(COCOA)
1329     // Speech.
1330     void getIsSpeaking(bool&);
1331     void speak(const String&);
1332     void stopSpeaking();
1333
1334     // Spotlight.
1335     void searchWithSpotlight(const String&);
1336         
1337     void searchTheWeb(const String&);
1338
1339     // Dictionary.
1340     void didPerformDictionaryLookup(const WebCore::DictionaryPopupInfo&);
1341 #endif
1342
1343 #if PLATFORM(MAC)
1344     bool appleMailPaginationQuirkEnabled();
1345 #endif
1346
1347     // Spelling and grammar.
1348     void checkSpellingOfString(const String& text, int32_t& misspellingLocation, int32_t& misspellingLength);
1349     void checkGrammarOfString(const String& text, Vector<WebCore::GrammarDetail>&, int32_t& badGrammarLocation, int32_t& badGrammarLength);
1350     void spellingUIIsShowing(bool&);
1351     void updateSpellingUIWithMisspelledWord(const String& misspelledWord);
1352     void updateSpellingUIWithGrammarString(const String& badGrammarPhrase, const WebCore::GrammarDetail&);
1353     void learnWord(const String& word);
1354     void ignoreWord(const String& word);
1355     void requestCheckingOfString(uint64_t requestID, const WebCore::TextCheckingRequestData&, int32_t insertionPoint);
1356
1357     void takeFocus(uint32_t direction);
1358     void setToolTip(const String&);
1359     void setCursor(const WebCore::Cursor&);
1360     void setCursorHiddenUntilMouseMoves(bool);
1361
1362     void didReceiveEvent(uint32_t opaqueType, bool handled);
1363     void stopResponsivenessTimer();
1364
1365     void voidCallback(uint64_t);
1366     void dataCallback(const IPC::DataReference&, uint64_t);
1367     void imageCallback(const ShareableBitmap::Handle&, uint64_t);
1368     void stringCallback(const String&, uint64_t);
1369     void scriptValueCallback(const IPC::DataReference&, bool hadException, const WebCore::ExceptionDetails&, uint64_t);
1370     void computedPagesCallback(const Vector<WebCore::IntRect>&, double totalScaleFactorForPrinting, uint64_t);
1371     void validateCommandCallback(const String&, bool, int, uint64_t);
1372     void unsignedCallback(uint64_t, uint64_t);
1373     void editingRangeCallback(const EditingRange&, uint64_t);
1374 #if PLATFORM(COCOA)
1375     void machSendRightCallback(const WebCore::MachSendRight&, uint64_t);
1376 #endif
1377     void rectForCharacterRangeCallback(const WebCore::IntRect&, const EditingRange&, uint64_t);
1378 #if PLATFORM(MAC)
1379     void attributedStringForCharacterRangeCallback(const AttributedString&, const EditingRange&, uint64_t);
1380     void fontAtSelectionCallback(const String&, double, bool, uint64_t);
1381 #endif
1382 #if PLATFORM(IOS)
1383     void gestureCallback(const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t, uint64_t);
1384     void touchesCallback(const WebCore::IntPoint&, uint32_t, uint32_t, uint64_t);
1385     void autocorrectionDataCallback(const Vector<WebCore::FloatRect>&, const String&, float, uint64_t, uint64_t);
1386     void autocorrectionContextCallback(const String&, const String&, const String&, const String&, uint64_t, uint64_t, uint64_t);
1387     void selectionContextCallback(const String&, const String&, const String&, uint64_t);
1388     void interpretKeyEvent(const EditorState&, bool isCharEvent, bool& handled);
1389     void showPlaybackTargetPicker(bool hasVideo, const WebCore::IntRect& elementRect);
1390 #endif
1391 #if PLATFORM(GTK)
1392     void printFinishedCallback(const WebCore::ResourceError&, uint64_t);
1393 #endif
1394
1395     void focusedFrameChanged(uint64_t frameID);
1396     void frameSetLargestFrameChanged(uint64_t frameID);
1397
1398     void didReceiveAuthenticationChallenge(uint64_t frameID, const WebCore::AuthenticationChallenge&, uint64_t challengeID);
1399
1400     void didFinishLoadingDataForCustomContentProvider(const String& suggestedFilename, const IPC::DataReference&);
1401
1402 #if PLATFORM(COCOA)
1403     void pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus);
1404     void setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t complexTextInputState);
1405 #endif
1406
1407     bool maybeInitializeSandboxExtensionHandle(const WebCore::URL&, SandboxExtension::Handle&);
1408
1409 #if PLATFORM(MAC)
1410     void substitutionsPanelIsShowing(bool&);
1411     void showCorrectionPanel(int32_t panelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
1412     void dismissCorrectionPanel(int32_t reason);
1413     void dismissCorrectionPanelSoon(int32_t reason, String& result);
1414     void recordAutocorrectionResponse(int32_t responseType, const String& replacedString, const String& replacementString);
1415
1416 #if USE(DICTATION_ALTERNATIVES)
1417     void showDictationAlternativeUI(const WebCore::FloatRect& boundingBoxOfDictatedText, uint64_t dictationContext);
1418     void removeDictationAlternatives(uint64_t dictationContext);
1419     void dictationAlternatives(uint64_t dictationContext, Vector<String>& result);
1420 #endif
1421
1422     void setEditableElementIsFocused(bool);
1423 #endif // PLATFORM(MAC)
1424
1425 #if PLATFORM(IOS)
1426     WebCore::FloatSize screenSize();
1427     WebCore::FloatSize availableScreenSize();
1428     float textAutosizingWidth();
1429
1430     void dynamicViewportUpdateChangedTarget(double newTargetScale, const WebCore::FloatPoint& newScrollPosition, uint64_t dynamicViewportSizeUpdateID);
1431     void couldNotRestorePageState();
1432     void restorePageState(const WebCore::FloatPoint& scrollPosition, const WebCore::FloatPoint& scrollOrigin, const WebCore::FloatSize& obscuredInsetOnSave, double scale);
1433     void restorePageCenterAndScale(const WebCore::FloatPoint&, double scale);
1434
1435     void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color& color, const Vector<WebCore::FloatQuad>& geometries, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius);
1436
1437     void startAssistingNode(const AssistedNodeInformation&, bool userIsInteracting, bool blurPreviousNode, const UserData&);
1438     void stopAssistingNode();
1439
1440     void showInspectorHighlight(const WebCore::Highlight&);
1441     void hideInspectorHighlight();
1442
1443     void showInspectorIndication();
1444     void hideInspectorIndication();
1445
1446     void enableInspectorNodeSearch();
1447     void disableInspectorNodeSearch();
1448 #endif // PLATFORM(IOS)
1449
1450 #if ENABLE(DATA_DETECTION)
1451     RetainPtr<NSArray> m_dataDetectionResults;
1452 #endif
1453
1454     void clearLoadDependentCallbacks();
1455
1456     void performDragControllerAction(DragControllerAction, WebCore::DragData&, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
1457
1458     void updateBackingStoreDiscardableState();
1459
1460     void setRenderTreeSize(uint64_t treeSize) { m_renderTreeSize = treeSize; }
1461
1462 #if PLUGIN_ARCHITECTURE(X11)
1463     void createPluginContainer(uint64_t& windowID);
1464     void windowedPluginGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect, uint64_t windowID);
1465     void windowedPluginVisibilityDidChange(bool isVisible, uint64_t windowID);
1466 #endif
1467
1468     void processNextQueuedWheelEvent();
1469     void sendWheelEvent(const WebWheelEvent&);
1470
1471 #if ENABLE(TOUCH_EVENTS)
1472     void updateTouchEventTracking(const WebTouchEvent&);
1473     WebCore::TrackingType touchEventTrackingType(const WebTouchEvent&) const;
1474 #endif
1475
1476 #if ENABLE(NETSCAPE_PLUGIN_API)
1477     void findPlugin(const String& mimeType, uint32_t processType, const String& urlString, const String& frameURLString, const String& pageURLString, bool allowOnlyApplicationPlugins, uint64_t& pluginProcessToken, String& newMIMEType, uint32_t& pluginLoadPolicy, String& unavailabilityDescription);
1478 #endif
1479
1480 #if USE(QUICK_LOOK)
1481     void didStartLoadForQuickLookDocumentInMainFrame(const String& fileName, const String& uti);
1482     void didFinishLoadForQuickLookDocumentInMainFrame(const QuickLookDocumentData&);
1483 #endif
1484
1485 #if ENABLE(CONTENT_FILTERING)
1486     void contentFilterDidBlockLoadForFrame(const WebCore::ContentFilterUnblockHandler&, uint64_t frameID);
1487 #endif
1488
1489     uint64_t generateNavigationID();
1490
1491     WebPreferencesStore preferencesStore() const;
1492
1493     void dispatchViewStateChange();
1494     void viewDidLeaveWindow();
1495     void viewDidEnterWindow();
1496
1497 #if PLATFORM(MAC)
1498     void didPerformImmediateActionHitTest(const WebHitTestResultData&, bool contentPreventsDefault, const UserData&);
1499 #endif
1500
1501     void useFixedLayoutDidChange(bool useFixedLayout) { m_useFixedLayout = useFixedLayout; }
1502     void fixedLayoutSizeDidChange(WebCore::IntSize fixedLayoutSize) { m_fixedLayoutSize = fixedLayoutSize; }
1503
1504     void imageOrMediaDocumentSizeChanged(const WebCore::IntSize&);
1505 #if ENABLE(VIDEO)
1506 #if USE(GSTREAMER)
1507     void requestInstallMissingMediaPlugins(const String& details, const String& description);
1508 #endif
1509 #endif
1510
1511     void handleAutoFillButtonClick(const UserData&);
1512
1513     void finishInitializingWebPageAfterProcessLaunch();
1514
1515     void handleMessage(IPC::Connection&, const String& messageName, const UserData& messageBody);
1516     void handleSynchronousMessage(IPC::Connection&, const String& messageName, const UserData& messageBody, UserData& returnUserData);
1517
1518     PageClient& m_pageClient;
1519     Ref<API::PageConfiguration> m_configuration;
1520
1521     std::unique_ptr<API::LoaderClient> m_loaderClient;
1522     std::unique_ptr<API::PolicyClient> m_policyClient;
1523     std::unique_ptr<API::NavigationClient> m_navigationClient;
1524     std::unique_ptr<API::HistoryClient> m_historyClient;
1525     std::unique_ptr<API::FormClient> m_formClient;
1526     std::unique_ptr<API::UIClient> m_uiClient;
1527     std::unique_ptr<API::FindClient> m_findClient;
1528     std::unique_ptr<API::FindMatchesClient> m_findMatchesClient;
1529     std::unique_ptr<API::DiagnosticLoggingClient> m_diagnosticLoggingClient;
1530 #if ENABLE(CONTEXT_MENUS)
1531     std::unique_ptr<API::ContextMenuClient> m_contextMenuClient;
1532 #endif
1533     std::unique_ptr<WebPageInjectedBundleClient> m_injectedBundleClient;
1534
1535     std::unique_ptr<WebNavigationState> m_navigationState;
1536     String m_failingProvisionalLoadURL;
1537     bool m_isLoadingAlternateHTMLStringForFailingProvisionalLoad { false };
1538
1539     std::unique_ptr<DrawingAreaProxy> m_drawingArea;
1540 #if ENABLE(ASYNC_SCROLLING)
1541     std::unique_ptr<RemoteScrollingCoordinatorProxy> m_scrollingCoordinatorProxy;
1542 #endif
1543
1544     Ref<WebProcessProxy> m_process;
1545     Ref<WebPageGroup> m_pageGroup;
1546     Ref<WebPreferences> m_preferences;
1547
1548     WebProcessLifetimeTracker m_webProcessLifetimeTracker { *this };
1549
1550     Ref<WebUserContentControllerProxy> m_userContentController;
1551     Ref<VisitedLinkStore> m_visitedLinkStore;
1552     Ref<WebsiteDataStore> m_websiteDataStore;
1553
1554     RefPtr<WebFrameProxy> m_mainFrame;
1555     RefPtr<WebFrameProxy> m_focusedFrame;
1556     RefPtr<WebFrameProxy> m_frameSetLargestFrame;
1557
1558     String m_userAgent;
1559     String m_applicationNameForUserAgent;
1560     String m_customUserAgent;
1561     String m_customTextEncodingName;
1562
1563     bool m_treatsSHA1CertificatesAsInsecure;
1564
1565     RefPtr<WebInspectorProxy> m_inspector;
1566
1567 #if ENABLE(FULLSCREEN_API)
1568     RefPtr<WebFullScreenManagerProxy> m_fullScreenManager;
1569 #endif
1570 #if (PLATFORM(IOS) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
1571     RefPtr<WebPlaybackSessionManagerProxy> m_playbackSessionManager;
1572     RefPtr<WebVideoFullscreenManagerProxy> m_videoFullscreenManager;
1573 #endif
1574 #if PLATFORM(IOS)
1575     VisibleContentRectUpdateInfo m_lastVisibleContentRectUpdate;
1576     bool m_hasReceivedLayerTreeTransactionAfterDidCommitLoad;
1577     uint64_t m_firstLayerTreeTransactionIdAfterDidCommitLoad;
1578     int32_t m_deviceOrientation;
1579     bool m_dynamicViewportSizeUpdateWaitingForTarget;
1580     bool m_dynamicViewportSizeUpdateWaitingForLayerTreeCommit;
1581     uint64_t m_dynamicViewportSizeUpdateLayerTreeTransactionID;
1582     uint64_t m_layerTreeTransactionIdAtLastTouchStart;
1583     uint64_t m_currentDynamicViewportSizeUpdateID { 0 };
1584     bool m_hasNetworkRequestsOnSuspended;
1585 #endif
1586
1587 #if ENABLE(VIBRATION)
1588     RefPtr<WebVibrationProxy> m_vibration;
1589 #endif
1590
1591 #if ENABLE(APPLE_PAY)
1592     std::unique_ptr<WebPaymentCoordinatorProxy> m_paymentCoordinator;
1593 #endif
1594
1595     CallbackMap m_callbacks;
1596     HashSet<uint64_t> m_loadDependentStringCallbackIDs;
1597
1598     HashSet<WebEditCommandProxy*> m_editCommandSet;
1599
1600 #if PLATFORM(COCOA)
1601     HashSet<String> m_knownKeypressCommandNames;
1602 #endif
1603
1604     RefPtr<WebPopupMenuProxy> m_activePopupMenu;
1605 #if ENABLE(CONTEXT_MENUS)
1606     std::unique_ptr<WebContextMenuProxy> m_activeContextMenu;
1607     ContextMenuContextData m_activeContextMenuContextData;
1608 #endif
1609     RefPtr<API::HitTestResult> m_lastMouseMoveHitTestResult;
1610
1611     RefPtr<WebOpenPanelResultListenerProxy> m_openPanelResultListener;
1612     GeolocationPermissionRequestManagerProxy m_geolocationPermissionRequestManager;
1613     NotificationPermissionRequestManagerProxy m_notificationPermissionRequestManager;
1614
1615     UserMediaPermissionRequestManagerProxy m_userMediaPermissionRequestManager;
1616
1617     WebCore::ViewState::Flags m_viewState;
1618     bool m_viewWasEverInWindow;
1619 #if PLATFORM(IOS)
1620     bool m_allowsMediaDocumentInlinePlayback { false };
1621     bool m_alwaysRunsAtForegroundPriority;
1622     ProcessThrottler::ForegroundActivityToken m_activityToken;
1623 #endif
1624     bool m_initialCapitalizationEnabled;
1625     Ref<WebBackForwardList> m_backForwardList;
1626         
1627     bool m_maintainsInactiveSelection;
1628
1629     String m_toolTip;
1630
1631     EditorState m_editorState;
1632     bool m_isEditable;
1633
1634     double m_textZoomFactor;
1635     double m_pageZoomFactor;
1636     double m_pageScaleFactor;
1637     double m_pluginZoomFactor;
1638     double m_pluginScaleFactor;
1639     double m_viewScaleFactor { 1 };
1640     float m_intrinsicDeviceScaleFactor;
1641     float m_customDeviceScaleFactor;
1642     float m_topContentInset;
1643
1644     LayerHostingMode m_layerHostingMode;
1645
1646     bool m_drawsBackground;
1647
1648     WebCore::Color m_underlayColor;
1649     WebCore::Color m_pageExtendedBackgroundColor;
1650
1651     bool m_useFixedLayout;
1652     WebCore::IntSize m_fixedLayoutSize;
1653
1654     bool m_suppressScrollbarAnimations;
1655
1656     WebCore::Pagination::Mode m_paginationMode;
1657     bool m_paginationBehavesLikeColumns;
1658     double m_pageLength;
1659     double m_gapBetweenPages;
1660     bool m_paginationLineGridEnabled;
1661         
1662     // If the process backing the web page is alive and kicking.
1663     bool m_isValid;
1664
1665     // Whether WebPageProxy::close() has been called on this page.
1666     bool m_isClosed;
1667
1668     // Whether it can run modal child web pages.
1669     bool m_canRunModal;
1670
1671     bool m_needsToFinishInitializingWebPageAfterProcessLaunch { false };
1672
1673     bool m_isInPrintingMode;
1674     bool m_isPerformingDOMPrintOperation;
1675
1676     bool m_inDecidePolicyForResponseSync;
1677     const WebCore::ResourceRequest* m_decidePolicyForResponseRequest;
1678     bool m_syncMimeTypePolicyActionIsValid;
1679     WebCore::PolicyAction m_syncMimeTypePolicyAction;
1680     DownloadID m_syncMimeTypePolicyDownloadID;
1681
1682     bool m_inDecidePolicyForNavigationAction;
1683     bool m_syncNavigationActionPolicyActionIsValid;
1684     WebCore::PolicyAction m_syncNavigationActionPolicyAction;
1685     DownloadID m_syncNavigationActionPolicyDownloadID;
1686     bool m_shouldSuppressAppLinksInNextNavigationPolicyDecision { false };
1687
1688     Deque<NativeWebKeyboardEvent> m_keyEventQueue;
1689     Deque<NativeWebWheelEvent> m_wheelEventQueue;
1690     Deque<std::unique_ptr<Vector<NativeWebWheelEvent>>> m_currentlyProcessedWheelEvents;
1691 #if ENABLE(MAC_GESTURE_EVENTS)
1692     Deque<NativeWebGestureEvent> m_gestureEventQueue;
1693 #endif
1694
1695     bool m_processingMouseMoveEvent;
1696     std::unique_ptr<NativeWebMouseEvent> m_nextMouseMoveEvent;
1697     std::unique_ptr<NativeWebMouseEvent> m_currentlyProcessedMouseDownEvent;
1698
1699 #if ENABLE(TOUCH_EVENTS)
1700     struct TouchEventTracking {
1701         WebCore::TrackingType touchForceChangedTracking { WebCore::TrackingType::NotTracking };
1702         WebCore::TrackingType touchStartTracking { WebCore::TrackingType::NotTracking };
1703         WebCore::TrackingType touchMoveTracking { WebCore::TrackingType::NotTracking };
1704         WebCore::TrackingType touchEndTracking { WebCore::TrackingType::NotTracking };
1705
1706         bool isTrackingAnything() const
1707         {
1708             return touchForceChangedTracking != WebCore::TrackingType::NotTracking
1709                 || touchStartTracking != WebCore::TrackingType::NotTracking
1710                 || touchMoveTracking != WebCore::TrackingType::NotTracking
1711                 || touchEndTracking != WebCore::TrackingType::NotTracking;
1712         }
1713
1714         void reset()
1715         {
1716             touchForceChangedTracking = WebCore::TrackingType::NotTracking;
1717             touchStartTracking = WebCore::TrackingType::NotTracking;
1718             touchMoveTracking = WebCore::TrackingType::NotTracking;
1719             touchEndTracking = WebCore::TrackingType::NotTracking;
1720         }
1721     };
1722     TouchEventTracking m_touchEventTracking;
1723 #endif
1724 #if ENABLE(TOUCH_EVENTS) && !ENABLE(IOS_TOUCH_EVENTS)
1725     Deque<QueuedTouchEvents> m_touchEventQueue;
1726 #endif
1727
1728 #if ENABLE(INPUT_TYPE_COLOR)
1729     RefPtr<WebColorPicker> m_colorPicker;
1730 #endif
1731
1732     const uint64_t m_pageID;
1733     WebCore::SessionID m_sessionID;
1734
1735     bool m_isPageSuspended;
1736     bool m_addsVisitedLinks;
1737
1738     bool m_controlledByAutomation { false };
1739
1740 #if ENABLE(REMOTE_INSPECTOR)
1741     bool m_allowsRemoteInspection;
1742     String m_remoteInspectionNameOverride;
1743 #endif
1744
1745 #if PLATFORM(COCOA)
1746     bool m_isSmartInsertDeleteEnabled;
1747 #endif
1748
1749 #if PLATFORM(GTK)
1750     String m_accessibilityPlugID;
1751     WebCore::Color m_backgroundColor;
1752 #endif
1753
1754     int64_t m_spellDocumentTag;
1755     bool m_hasSpellDocumentTag;
1756     unsigned m_pendingLearnOrIgnoreWordMessageCount;
1757
1758     bool m_mainFrameHasCustomContentProvider;
1759
1760 #if ENABLE(DRAG_SUPPORT)
1761     // Current drag destination details are delivered as an asynchronous response,
1762     // so we preserve them to be used when the next dragging delegate call is made.
1763     WebCore::DragOperation m_currentDragOperation;
1764     bool m_currentDragIsOverFileInput;
1765     unsigned m_currentDragNumberOfFilesToBeAccepted;
1766 #endif
1767
1768     PageLoadState m_pageLoadState;
1769     
1770     bool m_delegatesScrolling;
1771
1772     bool m_mainFrameHasHorizontalScrollbar;
1773     bool m_mainFrameHasVerticalScrollbar;
1774
1775     // Whether horizontal wheel events can be handled directly for swiping purposes.
1776     bool m_canShortCircuitHorizontalWheelEvents;
1777
1778     bool m_mainFrameIsPinnedToLeftSide;
1779     bool m_mainFrameIsPinnedToRightSide;
1780     bool m_mainFrameIsPinnedToTopSide;
1781     bool m_mainFrameIsPinnedToBottomSide;
1782
1783     bool m_shouldUseImplicitRubberBandControl;
1784     bool m_rubberBandsAtLeft;
1785     bool m_rubberBandsAtRight;
1786     bool m_rubberBandsAtTop;
1787     bool m_rubberBandsAtBottom;
1788         
1789     bool m_enableVerticalRubberBanding;
1790     bool m_enableHorizontalRubberBanding;
1791
1792     bool m_backgroundExtendsBeyondPage;
1793
1794     bool m_shouldRecordNavigationSnapshots;
1795     bool m_isShowingNavigationGestureSnapshot;
1796
1797     bool m_mainFramePluginHandlesPageScaleGesture { false };
1798
1799     unsigned m_pageCount;
1800
1801     WebCore::IntRect m_visibleScrollerThumbRect;
1802
1803     uint64_t m_renderTreeSize;
1804     uint64_t m_sessionRestorationRenderTreeSize;
1805     bool m_wantsSessionRestorationRenderTreeSizeThresholdEvent;
1806     bool m_hitRenderTreeSizeThreshold;
1807
1808     bool m_suppressVisibilityUpdates;
1809     bool m_autoSizingShouldExpandToViewHeight;
1810     WebCore::IntSize m_minimumLayoutSize;
1811
1812     float m_mediaVolume;
1813     bool m_muted;
1814     bool m_mayStartMediaWhenInWindow;
1815
1816     bool m_waitingForDidUpdateViewState;
1817
1818     bool m_shouldScaleViewToFitDocument { false };
1819     bool m_suppressNavigationSnapshotting { false };
1820
1821 #if PLATFORM(COCOA)
1822     HashMap<String, String> m_temporaryPDFFiles;
1823     std::unique_ptr<WebCore::RunLoopObserver> m_viewStateChangeDispatcher;
1824
1825     std::unique_ptr<RemoteLayerTreeScrollingPerformanceData> m_scrollingPerformanceData;
1826     bool m_scrollPerformanceDataCollectionEnabled;
1827 #endif
1828     UserObservablePageCounter::Token m_pageIsUserObservableCount;
1829     ProcessSuppressionDisabledToken m_preventProcessSuppressionCount;
1830     HiddenPageThrottlingAutoIncreasesCounter::Token m_hiddenPageDOMTimerThrottlingAutoIncreasesCount;
1831         
1832     WebCore::ScrollPinningBehavior m_scrollPinningBehavior;
1833     WTF::Optional<WebCore::ScrollbarOverlayStyle> m_scrollbarOverlayStyle;
1834
1835     uint64_t m_navigationID;
1836
1837     WebPreferencesStore::ValueMap m_configurationPreferenceValues;
1838     WebCore::ViewState::Flags m_potentiallyChangedViewStateFlags;
1839     bool m_viewStateChangeWantsSynchronousReply;
1840     Vector<uint64_t> m_nextViewStateChangeCallbacks;
1841
1842     WebCore::MediaProducer::MediaStateFlags m_mediaState { WebCore::MediaProducer::IsNotPlaying };
1843
1844     bool m_isResourceCachingDisabled { false };
1845
1846     bool m_hasHadSelectionChangesFromUserInteraction { false };
1847
1848 #if ENABLE(MEDIA_SESSION)
1849     bool m_hasMediaSessionWithActiveMediaElements { false };
1850 #endif
1851
1852 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
1853     bool m_requiresTargetMonitoring { false };
1854 #endif
1855
1856 #if PLATFORM(IOS)
1857     bool m_hasDeferredStartAssistingNode { false };
1858     std::unique_ptr<NodeAssistanceArguments> m_deferredNodeAssistanceArguments;
1859     bool m_forceAlwaysUserScalable { false };
1860 #endif
1861
1862 #if ENABLE(DOWNLOAD_ATTRIBUTE)
1863     bool m_syncNavigationActionHasDownloadAttribute { false };
1864 #endif
1865 };
1866
1867 } // namespace WebKit