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