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