2 * Copyright (C) 2010, 2011, 2014-2015 Apple Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
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.
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.
26 #ifndef WebPageProxy_h
27 #define WebPageProxy_h
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 "DragControllerAction.h"
36 #include "DrawingAreaProxy.h"
37 #include "EditingRange.h"
38 #include "EditorState.h"
39 #include "GeolocationPermissionRequestManagerProxy.h"
40 #include "InteractionInformationAtPosition.h"
41 #include "LayerTreeContext.h"
42 #include "MessageSender.h"
43 #include "NotificationPermissionRequestManagerProxy.h"
44 #include "PageLoadState.h"
45 #include "PlatformProcessIdentifier.h"
46 #include "ProcessThrottler.h"
47 #include "SandboxExtension.h"
48 #include "ShareableBitmap.h"
49 #include "UserMediaPermissionRequestManagerProxy.h"
50 #include "VisibleContentRectUpdateInfo.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>
79 #include <wtf/HashMap.h>
80 #include <wtf/HashSet.h>
81 #include <wtf/PassRefPtr.h>
83 #include <wtf/RefPtr.h>
84 #include <wtf/Vector.h>
85 #include <wtf/text/WTFString.h>
88 OBJC_CLASS _WKRemoteObjectRegistry;
90 #if ENABLE(DRAG_SUPPORT)
91 #include <WebCore/DragActions.h>
94 #if ENABLE(TOUCH_EVENTS)
95 #include "NativeWebTouchEvent.h"
99 #include "WKPageEfl.h"
100 #include "WebUIPopupMenuClient.h"
105 #include "LayerRepresentation.h"
109 #include "AttributedString.h"
113 #include "ProcessThrottler.h"
117 #include "ArgumentCodersGtk.h"
120 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
121 #include <WebCore/MediaPlaybackTargetPicker.h>
122 #include <WebCore/WebMediaSessionManagerClient.h>
125 #if ENABLE(MEDIA_SESSION)
127 class MediaSessionMetadata;
132 class ContextMenuClient;
134 class FindMatchesClient;
139 class NavigationClient;
146 class ArgumentDecoder;
151 class AuthenticationChallenge;
157 class MediaConstraintsImpl;
158 class ProtectionSpace;
159 class RunLoopObserver;
162 struct DictionaryPopupInfo;
163 struct ExceptionDetails;
164 struct FileChooserSettings;
165 struct SecurityOriginData;
166 struct TextAlternativeWithRange;
167 struct TextCheckingResult;
168 struct ViewportAttributes;
169 struct WindowFeatures;
173 typedef GtkWidget* PlatformWidget;
178 class CertificateInfo;
179 class NativeWebGestureEvent;
180 class NativeWebKeyboardEvent;
181 class NativeWebMouseEvent;
182 class NativeWebWheelEvent;
184 class RemoteLayerTreeScrollingPerformanceData;
185 class RemoteLayerTreeTransaction;
186 class RemoteScrollingCoordinatorProxy;
187 class StringPairVector;
190 class VisitedLinkStore;
191 class WebBackForwardList;
192 class WebBackForwardListItem;
193 class WebContextMenuProxy;
194 class WebEditCommandProxy;
195 class WebFullScreenManagerProxy;
196 class WebNavigationState;
197 class WebVideoFullscreenManagerProxy;
198 class WebKeyboardEvent;
200 class WebOpenPanelResultListenerProxy;
202 class WebProcessProxy;
203 class WebUserContentControllerProxy;
205 class WebsiteDataStore;
206 struct AttributedString;
207 struct ColorSpaceData;
210 struct PlatformPopupMenuData;
214 #if ENABLE(VIBRATION)
215 class WebVibrationProxy;
219 class QuickLookDocumentData;
222 typedef GenericCallback<uint64_t> UnsignedCallback;
223 typedef GenericCallback<EditingRange> EditingRangeCallback;
224 typedef GenericCallback<const String&> StringCallback;
225 typedef GenericCallback<API::SerializedScriptValue*, bool, const WebCore::ExceptionDetails&> ScriptValueCallback;
228 typedef GenericCallback<API::Error*> PrintFinishedCallback;
231 #if ENABLE(TOUCH_EVENTS)
232 struct QueuedTouchEvents {
233 QueuedTouchEvents(const NativeWebTouchEvent& event)
234 : forwardedEvent(event)
237 NativeWebTouchEvent forwardedEvent;
238 Vector<NativeWebTouchEvent> deferredTouchEvents;
242 typedef GenericCallback<const String&, bool, int32_t> ValidateCommandCallback;
243 typedef GenericCallback<const WebCore::IntRect&, const EditingRange&> RectForCharacterRangeCallback;
246 typedef GenericCallback<const AttributedString&, const EditingRange&> AttributedStringForCharacterRangeCallback;
247 typedef GenericCallback<const String&, double, bool> FontAtSelectionCallback;
251 typedef GenericCallback<const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t> GestureCallback;
252 typedef GenericCallback<const WebCore::IntPoint&, uint32_t> TouchesCallback;
253 struct NodeAssistanceArguments {
254 AssistedNodeInformation m_nodeInformation;
255 bool m_userIsInteracting;
256 bool m_blurPreviousNode;
257 RefPtr<API::Object> m_userData;
262 typedef GenericCallback<const WebCore::MachSendRight&> MachSendRightCallback;
265 class WebPageProxy : public API::ObjectImpl<API::Object::Type::Page>
266 #if ENABLE(INPUT_TYPE_COLOR)
267 , public WebColorPicker::Client
269 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
270 , public WebCore::WebMediaSessionManagerClient
272 , public WebPopupMenuProxy::Client
273 , public IPC::MessageReceiver
274 , public IPC::MessageSender {
276 static Ref<WebPageProxy> create(PageClient&, WebProcessProxy&, uint64_t pageID, Ref<API::PageConfiguration>&&);
277 virtual ~WebPageProxy();
279 const API::PageConfiguration& configuration() const;
281 uint64_t pageID() const { return m_pageID; }
282 WebCore::SessionID sessionID() const { return m_sessionID; }
283 void setSessionID(WebCore::SessionID);
285 WebFrameProxy* mainFrame() const { return m_mainFrame.get(); }
286 WebFrameProxy* focusedFrame() const { return m_focusedFrame.get(); }
287 WebFrameProxy* frameSetLargestFrame() const { return m_frameSetLargestFrame.get(); }
289 DrawingAreaProxy* drawingArea() const { return m_drawingArea.get(); }
291 WebNavigationState& navigationState() { return *m_navigationState.get(); }
293 WebsiteDataStore& websiteDataStore() { return m_websiteDataStore; }
295 #if ENABLE(ASYNC_SCROLLING)
296 RemoteScrollingCoordinatorProxy* scrollingCoordinatorProxy() const { return m_scrollingCoordinatorProxy.get(); }
299 WebBackForwardList& backForwardList() { return m_backForwardList; }
301 bool addsVisitedLinks() const { return m_addsVisitedLinks; }
302 void setAddsVisitedLinks(bool addsVisitedLinks) { m_addsVisitedLinks = addsVisitedLinks; }
304 void fullscreenMayReturnToInline();
305 void didEnterFullscreen();
306 void didExitFullscreen();
308 WebInspectorProxy* inspector();
310 #if ENABLE(REMOTE_INSPECTOR)
311 bool allowsRemoteInspection() const { return m_allowsRemoteInspection; }
312 void setAllowsRemoteInspection(bool);
313 String remoteInspectionNameOverride() const { return m_remoteInspectionNameOverride; }
314 void setRemoteInspectionNameOverride(const String&);
317 #if ENABLE(VIBRATION)
318 WebVibrationProxy* vibration() { return m_vibration.get(); }
321 #if ENABLE(FULLSCREEN_API)
322 WebFullScreenManagerProxy* fullScreenManager();
325 RefPtr<WebVideoFullscreenManagerProxy> videoFullscreenManager();
327 bool allowsMediaDocumentInlinePlayback() const;
328 void setAllowsMediaDocumentInlinePlayback(bool);
331 #if ENABLE(CONTEXT_MENUS)
332 API::ContextMenuClient& contextMenuClient() { return *m_contextMenuClient; }
333 void setContextMenuClient(std::unique_ptr<API::ContextMenuClient>);
335 API::FindClient& findClient() { return *m_findClient; }
336 void setFindClient(std::unique_ptr<API::FindClient>);
337 API::FindMatchesClient& findMatchesClient() { return *m_findMatchesClient; }
338 void setFindMatchesClient(std::unique_ptr<API::FindMatchesClient>);
339 API::DiagnosticLoggingClient& diagnosticLoggingClient() { return *m_diagnosticLoggingClient; }
340 void setDiagnosticLoggingClient(std::unique_ptr<API::DiagnosticLoggingClient>);
341 void setFormClient(std::unique_ptr<API::FormClient>);
342 void setNavigationClient(std::unique_ptr<API::NavigationClient>);
343 void setHistoryClient(std::unique_ptr<API::HistoryClient>);
344 void setLoaderClient(std::unique_ptr<API::LoaderClient>);
345 void setPolicyClient(std::unique_ptr<API::PolicyClient>);
346 void setInjectedBundleClient(const WKPageInjectedBundleClientBase*);
347 WebPageInjectedBundleClient* injectedBundleClient() { return m_injectedBundleClient.get(); }
349 API::UIClient& uiClient() { return *m_uiClient; }
350 void setUIClient(std::unique_ptr<API::UIClient>);
352 void initializeUIPopupMenuClient(const WKPageUIPopupMenuClientBase*);
355 void initializeWebPage();
359 bool isClosed() const { return m_isClosed; }
361 RefPtr<API::Navigation> loadRequest(const WebCore::ResourceRequest&, WebCore::ShouldOpenExternalURLsPolicy = WebCore::ShouldOpenExternalURLsPolicy::ShouldAllowExternalSchemes, API::Object* userData = nullptr);
362 RefPtr<API::Navigation> loadFile(const String& fileURL, const String& resourceDirectoryURL, API::Object* userData = nullptr);
363 RefPtr<API::Navigation> loadData(API::Data*, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData = nullptr);
364 RefPtr<API::Navigation> loadHTMLString(const String& htmlString, const String& baseURL, API::Object* userData = nullptr);
365 void loadAlternateHTMLString(const String& htmlString, const String& baseURL, const String& unreachableURL, API::Object* userData = nullptr);
366 void loadPlainTextString(const String&, API::Object* userData = nullptr);
367 void loadWebArchiveData(API::Data*, API::Object* userData = nullptr);
368 void navigateToPDFLinkWithSimulatedClick(const String& url, WebCore::IntPoint documentPoint, WebCore::IntPoint screenPoint);
371 RefPtr<API::Navigation> reload(bool reloadFromOrigin, bool contentBlockersEnabled);
373 RefPtr<API::Navigation> goForward();
374 RefPtr<API::Navigation> goBack();
376 RefPtr<API::Navigation> goToBackForwardItem(WebBackForwardListItem*);
377 void tryRestoreScrollPosition();
378 void didChangeBackForwardList(WebBackForwardListItem* addedItem, Vector<RefPtr<WebBackForwardListItem>> removed);
379 void willGoToBackForwardListItem(uint64_t itemID, const UserData&);
381 bool shouldKeepCurrentBackForwardListItemInList(WebBackForwardListItem*);
383 bool willHandleHorizontalScrollEvents() const;
385 bool canShowMIMEType(const String& mimeType);
387 bool drawsBackground() const { return m_drawsBackground; }
388 void setDrawsBackground(bool);
390 float topContentInset() const { return m_topContentInset; }
391 void setTopContentInset(float);
393 WebCore::Color underlayColor() const { return m_underlayColor; }
394 void setUnderlayColor(const WebCore::Color&);
396 // At this time, m_pageExtendedBackgroundColor can be set via pageExtendedBackgroundColorDidChange() which is a message
397 // from the UIProcess, or by didCommitLayerTree(). When PLATFORM(MAC) adopts UI side compositing, we should get rid of
398 // the message entirely.
399 WebCore::Color pageExtendedBackgroundColor() const { return m_pageExtendedBackgroundColor; }
401 void viewWillStartLiveResize();
402 void viewWillEndLiveResize();
404 void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&, std::function<void (CallbackBase::Error)>);
406 void clearSelection();
407 void restoreSelectionInFocusedEditableElement();
409 void setViewNeedsDisplay(const WebCore::IntRect&);
411 bool canScrollView();
412 void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset); // FIXME: CoordinatedGraphics should use requestScroll().
413 void requestScroll(const WebCore::FloatPoint& scrollPosition, const WebCore::IntPoint& scrollOrigin, bool isProgrammaticScroll);
415 void setDelegatesScrolling(bool delegatesScrolling) { m_delegatesScrolling = delegatesScrolling; }
416 bool delegatesScrolling() const { return m_delegatesScrolling; }
418 enum class ViewStateChangeDispatchMode { Deferrable, Immediate };
419 void viewStateDidChange(WebCore::ViewState::Flags mayHaveChanged, bool wantsSynchronousReply = false, ViewStateChangeDispatchMode = ViewStateChangeDispatchMode::Deferrable);
420 bool isInWindow() const { return m_viewState & WebCore::ViewState::IsInWindow; }
421 void waitForDidUpdateViewState();
422 void didUpdateViewState() { m_waitingForDidUpdateViewState = false; }
424 void layerHostingModeDidChange();
426 WebCore::IntSize viewSize() const;
427 bool isViewVisible() const { return m_viewState & WebCore::ViewState::IsVisible; }
428 bool isViewWindowActive() const;
430 void addMIMETypeWithCustomContentProvider(const String& mimeType);
432 void executeEditCommand(const String& commandName, const String& argument = String());
433 void validateCommand(const String& commandName, std::function<void (const String&, bool, int32_t, CallbackBase::Error)>);
435 const EditorState& editorState() const { return m_editorState; }
436 bool canDelete() const { return hasSelectedRange() && isContentEditable(); }
437 bool hasSelectedRange() const { return m_editorState.selectionIsRange; }
438 bool isContentEditable() const { return m_editorState.isContentEditable; }
440 bool maintainsInactiveSelection() const { return m_maintainsInactiveSelection; }
441 void setMaintainsInactiveSelection(bool);
442 void setEditable(bool);
443 bool isEditable() const { return m_isEditable; }
446 void executeEditCommand(const String& commandName, std::function<void (CallbackBase::Error)>);
447 double displayedContentScale() const { return m_lastVisibleContentRectUpdate.scale(); }
448 const WebCore::FloatRect& exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedRect(); }
449 const WebCore::FloatRect& unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredRect(); }
451 void updateVisibleContentRects(const WebCore::FloatRect& exposedRect, const WebCore::FloatRect& unobscuredRect, const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& customFixedPositionRect, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate);
452 void resendLastVisibleContentRects();
454 enum class UnobscuredRectConstraint { ConstrainedToDocumentRect, Unconstrained };
455 WebCore::FloatRect computeCustomFixedPositionRect(const WebCore::FloatRect& unobscuredContentRect, double displayedContentScale, UnobscuredRectConstraint = UnobscuredRectConstraint::Unconstrained) const;
456 void overflowScrollViewWillStartPanGesture();
457 void overflowScrollViewDidScroll();
458 void overflowScrollWillStartScroll();
459 void overflowScrollDidEndScroll();
461 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);
462 void synchronizeDynamicViewportUpdate();
464 void setViewportConfigurationMinimumLayoutSize(const WebCore::FloatSize&);
465 void setMaximumUnobscuredSize(const WebCore::FloatSize&);
466 void setDeviceOrientation(int32_t);
467 int32_t deviceOrientation() const { return m_deviceOrientation; }
468 void willCommitLayerTree(uint64_t transactionID);
470 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)>);
471 void updateSelectionWithTouches(const WebCore::IntPoint, uint32_t touches, bool baseIsStart, std::function<void (const WebCore::IntPoint&, uint32_t, CallbackBase::Error)>);
472 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)>);
473 void updateBlockSelectionWithTouch(const WebCore::IntPoint, uint32_t touch, uint32_t handlePosition);
474 void extendSelection(WebCore::TextGranularity);
475 void selectWordBackward();
476 void moveSelectionByOffset(int32_t offset, std::function<void (CallbackBase::Error)>);
477 void selectTextWithGranularityAtPoint(const WebCore::IntPoint, WebCore::TextGranularity, bool isInteractingWithAssistedNode, std::function<void (CallbackBase::Error)>);
478 void selectPositionAtPoint(const WebCore::IntPoint, bool isInteractingWithAssistedNode, std::function<void (CallbackBase::Error)>);
479 void selectPositionAtBoundaryWithDirection(const WebCore::IntPoint, WebCore::TextGranularity, WebCore::SelectionDirection, bool isInteractingWithAssistedNode, std::function<void (CallbackBase::Error)>);
480 void moveSelectionAtBoundaryWithDirection(WebCore::TextGranularity, WebCore::SelectionDirection, std::function<void(CallbackBase::Error)>);
481 void beginSelectionInDirection(WebCore::SelectionDirection, std::function<void (uint64_t, CallbackBase::Error)>);
482 void updateSelectionWithExtentPoint(const WebCore::IntPoint, bool isInteractingWithAssistedNode, std::function<void (uint64_t, CallbackBase::Error)>);
483 void updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint, WebCore::TextGranularity, bool isInteractingWithAssistedNode, std::function<void(uint64_t, CallbackBase::Error)>);
484 void requestAutocorrectionData(const String& textForAutocorrection, std::function<void (const Vector<WebCore::FloatRect>&, const String&, double, uint64_t, CallbackBase::Error)>);
485 void applyAutocorrection(const String& correction, const String& originalText, std::function<void (const String&, CallbackBase::Error)>);
486 bool applyAutocorrection(const String& correction, const String& originalText);
487 void requestAutocorrectionContext(std::function<void (const String&, const String&, const String&, const String&, uint64_t, uint64_t, CallbackBase::Error)>);
488 void getAutocorrectionContext(String& contextBefore, String& markedText, String& selectedText, String& contextAfter, uint64_t& location, uint64_t& length);
489 void requestDictationContext(std::function<void (const String&, const String&, const String&, CallbackBase::Error)>);
490 void replaceDictatedText(const String& oldText, const String& newText);
491 void replaceSelectedText(const String& oldText, const String& newText);
492 void didReceivePositionInformation(const InteractionInformationAtPosition&);
493 void getPositionInformation(const WebCore::IntPoint&, InteractionInformationAtPosition&);
494 void requestPositionInformation(const WebCore::IntPoint&);
495 void startInteractionWithElementAtPosition(const WebCore::IntPoint&);
496 void stopInteraction();
497 void performActionOnElement(uint32_t action);
498 void saveImageToLibrary(const SharedMemory::Handle& imageHandle, uint64_t imageSize);
499 void didUpdateBlockSelectionWithTouch(uint32_t touch, uint32_t flags, float growThreshold, float shrinkThreshold);
500 void focusNextAssistedNode(bool isForward, std::function<void (CallbackBase::Error)>);
501 void setAssistedNodeValue(const String&);
502 void setAssistedNodeValueAsNumber(double);
503 void setAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection = false);
504 void applicationDidEnterBackground();
505 void applicationWillEnterForeground();
506 void applicationWillResignActive();
507 void applicationDidBecomeActive();
508 void zoomToRect(WebCore::FloatRect, double minimumScale, double maximumScale);
509 void commitPotentialTapFailed();
510 void didNotHandleTapAsClick(const WebCore::IntPoint&);
511 void disableDoubleTapGesturesDuringTapIfNecessary(uint64_t requestID);
512 void didFinishDrawingPagesToPDF(const IPC::DataReference&);
513 void contentSizeCategoryDidChange(const String& contentSizeCategory);
514 void getLookupContextAtPoint(const WebCore::IntPoint&, std::function<void(const String&, CallbackBase::Error)>);
517 void didCommitLayerTree(const WebKit::RemoteLayerTreeTransaction&);
519 #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
520 void didRenderFrame(const WebCore::IntSize& contentsSize, const WebCore::IntRect& coveredRect);
521 void commitPageTransitionViewport();
524 void setThemePath(const String&);
528 void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
529 void confirmComposition(const String& compositionString, int64_t selectionStart, int64_t selectionLength);
530 void cancelComposition();
534 void setInputMethodState(bool enabled);
537 #if PLATFORM (GTK) && HAVE(GTK_GESTURES)
538 void getCenterForZoomGesture(const WebCore::IntPoint& centerInViewCoordinates, WebCore::IntPoint& center);
542 void windowAndViewFramesChanged(const WebCore::FloatRect& viewFrameInWindowCoordinates, const WebCore::FloatPoint& accessibilityViewCoordinates);
543 void setMainFrameIsScrollable(bool);
545 void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
546 bool shouldDelayWindowOrderingForEvent(const WebMouseEvent&);
547 bool acceptsFirstMouse(int eventNumber, const WebMouseEvent&);
549 void setAcceleratedCompositingRootLayer(LayerOrView*);
550 LayerOrView* acceleratedCompositingRootLayer() const;
552 void insertTextAsync(const String& text, const EditingRange& replacementRange, bool registerUndoGroup = false);
553 void getMarkedRangeAsync(std::function<void (EditingRange, CallbackBase::Error)>);
554 void getSelectedRangeAsync(std::function<void (EditingRange, CallbackBase::Error)>);
555 void characterIndexForPointAsync(const WebCore::IntPoint&, std::function<void (uint64_t, CallbackBase::Error)>);
556 void firstRectForCharacterRangeAsync(const EditingRange&, std::function<void (const WebCore::IntRect&, const EditingRange&, CallbackBase::Error)>);
557 void setCompositionAsync(const String& text, Vector<WebCore::CompositionUnderline> underlines, const EditingRange& selectionRange, const EditingRange& replacementRange);
558 void confirmCompositionAsync();
560 void setScrollPerformanceDataCollectionEnabled(bool);
561 bool scrollPerformanceDataCollectionEnabled() const { return m_scrollPerformanceDataCollectionEnabled; }
562 RemoteLayerTreeScrollingPerformanceData* scrollingPerformanceData() { return m_scrollingPerformanceData.get(); }
563 #endif // PLATFORM(COCOA)
566 void insertDictatedTextAsync(const String& text, const EditingRange& replacementRange, const Vector<WebCore::TextAlternativeWithRange>& dictationAlternatives, bool registerUndoGroup);
567 void attributedSubstringForCharacterRangeAsync(const EditingRange&, std::function<void (const AttributedString&, const EditingRange&, CallbackBase::Error)>);
568 void setFont(const String& fontFamily, double fontSize, uint64_t fontTraits);
569 void fontAtSelection(std::function<void (const String&, double, bool, CallbackBase::Error)>);
571 void startWindowDrag();
572 NSWindow *platformWindow();
575 NSView *inspectorAttachmentView();
576 _WKRemoteObjectRegistry *remoteObjectRegistry();
579 void intrinsicContentSizeDidChange(const WebCore::IntSize& intrinsicContentSize);
580 CGRect boundsOfLayerInLayerBackedWindowCoordinates(CALayer *) const;
581 #endif // PLATFORM(MAC)
584 void handleInputMethodKeydown(bool& handled);
585 void confirmComposition(const String&);
586 void setComposition(const String&, Vector<WebCore::CompositionUnderline>&, int);
587 void cancelComposition();
591 PlatformWidget viewWidget();
592 const WebCore::Color& backgroundColor() const { return m_backgroundColor; }
593 void setBackgroundColor(const WebCore::Color& color) { m_backgroundColor = color; }
596 void handleMouseEvent(const NativeWebMouseEvent&);
597 void handleWheelEvent(const NativeWebWheelEvent&);
598 void handleKeyboardEvent(const NativeWebKeyboardEvent&);
600 #if ENABLE(MAC_GESTURE_EVENTS)
601 void handleGestureEvent(const NativeWebGestureEvent&);
604 #if ENABLE(IOS_TOUCH_EVENTS)
605 void handleTouchEventSynchronously(const NativeWebTouchEvent&);
606 void handleTouchEventAsynchronously(const NativeWebTouchEvent&);
608 #elif ENABLE(TOUCH_EVENTS)
609 void handleTouchEvent(const NativeWebTouchEvent&);
612 void scrollBy(WebCore::ScrollDirection, WebCore::ScrollGranularity);
613 void centerSelectionInVisibleArea();
615 const String& toolTip() const { return m_toolTip; }
617 const String& userAgent() const { return m_userAgent; }
618 void setApplicationNameForUserAgent(const String&);
619 const String& applicationNameForUserAgent() const { return m_applicationNameForUserAgent; }
620 void setCustomUserAgent(const String&);
621 const String& customUserAgent() const { return m_customUserAgent; }
622 static String standardUserAgent(const String& applicationName = String());
624 bool supportsTextEncoding() const;
625 void setCustomTextEncodingName(const String&);
626 String customTextEncodingName() const { return m_customTextEncodingName; }
628 bool areActiveDOMObjectsAndAnimationsSuspended() const { return m_isPageSuspended; }
629 void resumeActiveDOMObjectsAndAnimations();
630 void suspendActiveDOMObjectsAndAnimations();
632 double estimatedProgress() const;
634 void terminateProcess();
636 SessionState sessionState(const std::function<bool (WebBackForwardListItem&)>& = nullptr) const;
637 RefPtr<API::Navigation> restoreFromSessionState(SessionState, bool navigate);
639 bool supportsTextZoom() const;
640 double textZoomFactor() const { return m_textZoomFactor; }
641 void setTextZoomFactor(double);
642 double pageZoomFactor() const;
643 void setPageZoomFactor(double);
644 void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
646 void scalePage(double scale, const WebCore::IntPoint& origin);
647 void scalePageInViewCoordinates(double scale, const WebCore::IntPoint& centerInViewCoordinates);
648 double pageScaleFactor() const;
649 double viewScaleFactor() const { return m_viewScaleFactor; }
650 void scaleView(double scale);
651 void setShouldScaleViewToFitDocument(bool);
653 float deviceScaleFactor() const;
654 void setIntrinsicDeviceScaleFactor(float);
655 void setCustomDeviceScaleFactor(float);
656 void windowScreenDidChange(PlatformDisplayID);
658 void setUseFixedLayout(bool);
659 void setFixedLayoutSize(const WebCore::IntSize&);
660 bool useFixedLayout() const { return m_useFixedLayout; };
661 const WebCore::IntSize& fixedLayoutSize() const { return m_fixedLayoutSize; };
663 void listenForLayoutMilestones(WebCore::LayoutMilestones);
665 bool hasHorizontalScrollbar() const { return m_mainFrameHasHorizontalScrollbar; }
666 bool hasVerticalScrollbar() const { return m_mainFrameHasVerticalScrollbar; }
668 void setSuppressScrollbarAnimations(bool);
669 bool areScrollbarAnimationsSuppressed() const { return m_suppressScrollbarAnimations; }
671 bool isPinnedToLeftSide() const { return m_mainFrameIsPinnedToLeftSide; }
672 bool isPinnedToRightSide() const { return m_mainFrameIsPinnedToRightSide; }
673 bool isPinnedToTopSide() const { return m_mainFrameIsPinnedToTopSide; }
674 bool isPinnedToBottomSide() const { return m_mainFrameIsPinnedToBottomSide; }
676 bool rubberBandsAtLeft() const;
677 void setRubberBandsAtLeft(bool);
678 bool rubberBandsAtRight() const;
679 void setRubberBandsAtRight(bool);
680 bool rubberBandsAtTop() const;
681 void setRubberBandsAtTop(bool);
682 bool rubberBandsAtBottom() const;
683 void setRubberBandsAtBottom(bool);
685 void setShouldUseImplicitRubberBandControl(bool shouldUseImplicitRubberBandControl) { m_shouldUseImplicitRubberBandControl = shouldUseImplicitRubberBandControl; }
686 bool shouldUseImplicitRubberBandControl() const { return m_shouldUseImplicitRubberBandControl; }
688 void setEnableVerticalRubberBanding(bool);
689 bool verticalRubberBandingIsEnabled() const;
690 void setEnableHorizontalRubberBanding(bool);
691 bool horizontalRubberBandingIsEnabled() const;
693 void setBackgroundExtendsBeyondPage(bool);
694 bool backgroundExtendsBeyondPage() const;
696 void setPaginationMode(WebCore::Pagination::Mode);
697 WebCore::Pagination::Mode paginationMode() const { return m_paginationMode; }
698 void setPaginationBehavesLikeColumns(bool);
699 bool paginationBehavesLikeColumns() const { return m_paginationBehavesLikeColumns; }
700 void setPageLength(double);
701 double pageLength() const { return m_pageLength; }
702 void setGapBetweenPages(double);
703 double gapBetweenPages() const { return m_gapBetweenPages; }
704 unsigned pageCount() const { return m_pageCount; }
707 // Called by the web process through a message.
708 void registerWebProcessAccessibilityToken(const IPC::DataReference&);
709 // Called by the UI process when it is ready to send its tokens to the web process.
710 void registerUIProcessAccessibilityTokens(const IPC::DataReference& elemenToken, const IPC::DataReference& windowToken);
711 bool readSelectionFromPasteboard(const String& pasteboardName);
712 String stringSelectionForPasteboard();
713 RefPtr<WebCore::SharedBuffer> dataSelectionForPasteboard(const String& pasteboardType);
714 void makeFirstResponder();
716 ColorSpaceData colorSpace();
719 #if ENABLE(SERVICE_CONTROLS)
720 void replaceSelectionWithPasteboardData(const Vector<String>& types, const IPC::DataReference&);
723 void pageScaleFactorDidChange(double);
724 void pluginScaleFactorDidChange(double);
725 void pluginZoomFactorDidChange(double);
728 void findString(const String&, FindOptions, unsigned maxMatchCount);
729 void findStringMatches(const String&, FindOptions, unsigned maxMatchCount);
730 void getImageForFindMatch(int32_t matchIndex);
731 void selectFindMatch(int32_t matchIndex);
732 void didGetImageForFindMatch(const ShareableBitmap::Handle& contentImageHandle, uint32_t matchIndex);
734 void countStringMatches(const String&, FindOptions, unsigned maxMatchCount);
735 void didCountStringMatches(const String&, uint32_t matchCount);
736 void setTextIndicator(const WebCore::TextIndicatorData&, uint64_t /* WebCore::TextIndicatorWindowLifetime */ lifetime = 0 /* Permanent */);
737 void setTextIndicatorAnimationProgress(float);
738 void clearTextIndicator();
739 void didFindString(const String&, const Vector<WebCore::IntRect>&, uint32_t matchCount, int32_t matchIndex);
740 void didFailToFindString(const String&);
741 void didFindStringMatches(const String&, const Vector<Vector<WebCore::IntRect>>& matchRects, int32_t firstIndexAfterSelection);
743 void getContentsAsString(std::function<void (const String&, CallbackBase::Error)>);
744 void getBytecodeProfile(std::function<void (const String&, CallbackBase::Error)>);
747 void getContentsAsMHTMLData(std::function<void (API::Data*, CallbackBase::Error)>);
749 void getMainResourceDataOfFrame(WebFrameProxy*, std::function<void (API::Data*, CallbackBase::Error)>);
750 void getResourceDataFromFrame(WebFrameProxy*, API::URL*, std::function<void (API::Data*, CallbackBase::Error)>);
751 void getRenderTreeExternalRepresentation(std::function<void (const String&, CallbackBase::Error)>);
752 void getSelectionOrContentsAsString(std::function<void (const String&, CallbackBase::Error)>);
753 void getSelectionAsWebArchiveData(std::function<void (API::Data*, CallbackBase::Error)>);
754 void getSourceForFrame(WebFrameProxy*, std::function<void (const String&, CallbackBase::Error)>);
755 void getWebArchiveOfFrame(WebFrameProxy*, std::function<void (API::Data*, CallbackBase::Error)>);
756 void runJavaScriptInMainFrame(const String&, std::function<void (API::SerializedScriptValue*, bool hadException, const WebCore::ExceptionDetails&, CallbackBase::Error)> callbackFunction);
757 void forceRepaint(PassRefPtr<VoidCallback>);
759 float headerHeight(WebFrameProxy*);
760 float footerHeight(WebFrameProxy*);
761 void drawHeader(WebFrameProxy*, const WebCore::FloatRect&);
762 void drawFooter(WebFrameProxy*, const WebCore::FloatRect&);
766 void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
767 void performDictionaryLookupOfCurrentSelection();
770 void receivedPolicyDecision(WebCore::PolicyAction, WebFrameProxy*, uint64_t listenerID, API::Navigation* navigationID);
772 void backForwardRemovedItem(uint64_t itemID);
774 #if ENABLE(DRAG_SUPPORT)
775 // Drag and drop support.
776 void dragEntered(WebCore::DragData&, const String& dragStorageName = String());
777 void dragUpdated(WebCore::DragData&, const String& dragStorageName = String());
778 void dragExited(WebCore::DragData&, const String& dragStorageName = String());
779 void performDragOperation(WebCore::DragData&, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
781 void didPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted);
782 void dragEnded(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t operation);
784 void setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, bool isLinkDrag);
785 void setPromisedDataForImage(const String& pasteboardName, const SharedMemory::Handle& imageHandle, uint64_t imageSize, const String& filename, const String& extension,
786 const String& title, const String& url, const String& visibleURL, const SharedMemory::Handle& archiveHandle, uint64_t archiveSize);
787 #if ENABLE(ATTACHMENT_ELEMENT)
788 void setPromisedDataForAttachment(const String& pasteboardName, const String& filename, const String& extension, const String& title, const String& url, const String& visibleURL);
792 void startDrag(const WebCore::DragData&, const ShareableBitmap::Handle& dragImage);
796 void processDidBecomeUnresponsive();
797 void processDidBecomeResponsive();
798 void processDidCrash();
799 void willChangeProcessIsResponsive();
800 void didChangeProcessIsResponsive();
803 void processWillBecomeSuspended();
804 void processWillBecomeForeground();
807 virtual void enterAcceleratedCompositingMode(const LayerTreeContext&);
808 virtual void exitAcceleratedCompositingMode();
809 virtual void updateAcceleratedCompositingMode(const LayerTreeContext&);
810 void willEnterAcceleratedCompositingMode();
812 enum UndoOrRedo { Undo, Redo };
813 void addEditCommand(WebEditCommandProxy*);
814 void removeEditCommand(WebEditCommandProxy*);
815 bool isValidEditCommand(WebEditCommandProxy*);
816 void registerEditCommand(PassRefPtr<WebEditCommandProxy>, UndoOrRedo);
819 void registerKeypressCommandName(const String& name) { m_knownKeypressCommandNames.add(name); }
820 bool isValidKeypressCommandName(const String& name) const { return m_knownKeypressCommandNames.contains(name); }
823 WebProcessProxy& process() { return m_process; }
824 PlatformProcessIdentifier processIdentifier() const;
826 WebPreferences& preferences() { return m_preferences; }
827 void setPreferences(WebPreferences&);
829 WebPageGroup& pageGroup() { return m_pageGroup; }
831 bool isValid() const;
833 #if ENABLE(DRAG_SUPPORT)
834 WebCore::DragOperation currentDragOperation() const { return m_currentDragOperation; }
835 bool currentDragIsOverFileInput() const { return m_currentDragIsOverFileInput; }
836 unsigned currentDragNumberOfFilesToBeAccepted() const { return m_currentDragNumberOfFilesToBeAccepted; }
837 void resetCurrentDragInformation()
839 m_currentDragOperation = WebCore::DragOperationNone;
840 m_currentDragIsOverFileInput = false;
841 m_currentDragNumberOfFilesToBeAccepted = 0;
845 void preferencesDidChange();
847 #if ENABLE(CONTEXT_MENUS)
848 // Called by the WebContextMenuProxy.
849 void contextMenuItemSelected(const WebContextMenuItemData&);
852 // Called by the WebOpenPanelResultListenerProxy.
854 void didChooseFilesForOpenPanelWithDisplayStringAndIcon(const Vector<String>&, const String& displayString, const API::Data* iconData);
856 void didChooseFilesForOpenPanel(const Vector<String>&);
857 void didCancelForOpenPanel();
859 WebPageCreationParameters creationParameters();
861 #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
862 void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize&);
865 void handleDownloadRequest(DownloadProxy*);
867 void advanceToNextMisspelling(bool startBeforeSelection);
868 void changeSpellingToWord(const String& word);
870 void uppercaseWord();
871 void lowercaseWord();
872 void capitalizeWord();
876 bool isSmartInsertDeleteEnabled() const { return m_isSmartInsertDeleteEnabled; }
877 void setSmartInsertDeleteEnabled(bool);
881 String accessibilityPlugID() const { return m_accessibilityPlugID; }
884 void setCanRunModal(bool);
887 void beginPrinting(WebFrameProxy*, const PrintInfo&);
889 void computePagesForPrinting(WebFrameProxy*, const PrintInfo&, PassRefPtr<ComputedPagesCallback>);
891 void drawRectToImage(WebFrameProxy*, const PrintInfo&, const WebCore::IntRect&, const WebCore::IntSize&, PassRefPtr<ImageCallback>);
892 void drawPagesToPDF(WebFrameProxy*, const PrintInfo&, uint32_t first, uint32_t count, PassRefPtr<DataCallback>);
894 void drawPagesForPrinting(WebFrameProxy*, const PrintInfo&, PassRefPtr<PrintFinishedCallback>);
897 PageLoadState& pageLoadState() { return m_pageLoadState; }
900 void handleAlternativeTextUIResult(const String& result);
903 void saveDataToFileInDownloadsFolder(const String& suggestedFilename, const String& mimeType, const String& originatingURLString, API::Data*);
904 void savePDFToFileInDownloadsFolder(const String& suggestedFilename, const String& originatingURLString, const IPC::DataReference&);
906 void savePDFToTemporaryFolderAndOpenWithNativeApplicationRaw(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size, const String& pdfUUID);
907 void savePDFToTemporaryFolderAndOpenWithNativeApplication(const String& suggestedFilename, const String& originatingURLString, const IPC::DataReference&, const String& pdfUUID);
908 void openPDFFromTemporaryFolderWithNativeApplication(const String& pdfUUID);
911 WebCore::IntRect visibleScrollerThumbRect() const { return m_visibleScrollerThumbRect; }
913 uint64_t renderTreeSize() const { return m_renderTreeSize; }
915 void printMainFrame();
917 void setMediaVolume(float);
919 void setMayStartMediaWhenInWindow(bool);
920 bool mayStartMediaWhenInWindow() const { return m_mayStartMediaWhenInWindow; }
922 #if ENABLE(MEDIA_SESSION)
923 bool hasMediaSessionWithActiveMediaElements() const { return m_hasMediaSessionWithActiveMediaElements; }
924 void handleMediaEvent(WebCore::MediaEventType);
925 void setVolumeOfMediaElement(double, uint64_t);
928 // WebPopupMenuProxy::Client
929 virtual NativeWebMouseEvent* currentlyProcessedMouseDownEvent() override;
931 void setSuppressVisibilityUpdates(bool flag);
932 bool suppressVisibilityUpdates() { return m_suppressVisibilityUpdates; }
935 void willStartUserTriggeredZooming();
937 void potentialTapAtPosition(const WebCore::FloatPoint&, uint64_t& requestID);
938 void commitPotentialTap();
939 void cancelPotentialTap();
940 void tapHighlightAtPosition(const WebCore::FloatPoint&, uint64_t& requestID);
941 void handleTap(const WebCore::FloatPoint&);
943 void inspectorNodeSearchMovedToPosition(const WebCore::FloatPoint&);
944 void inspectorNodeSearchEndedAtPosition(const WebCore::FloatPoint&);
946 void blurAssistedNode();
949 void postMessageToInjectedBundle(const String& messageName, API::Object* messageBody);
951 #if ENABLE(INPUT_TYPE_COLOR)
952 void setColorPickerColor(const WebCore::Color&);
953 void endColorPicker();
956 WebCore::IntSize minimumLayoutSize() const { return m_minimumLayoutSize; }
957 void setMinimumLayoutSize(const WebCore::IntSize&);
959 bool autoSizingShouldExpandToViewHeight() const { return m_autoSizingShouldExpandToViewHeight; }
960 void setAutoSizingShouldExpandToViewHeight(bool);
962 void didReceiveAuthenticationChallengeProxy(uint64_t frameID, PassRefPtr<AuthenticationChallengeProxy>);
964 int64_t spellDocumentTag();
965 void didFinishCheckingText(uint64_t requestID, const Vector<WebCore::TextCheckingResult>&);
966 void didCancelCheckingText(uint64_t requestID);
968 void connectionWillOpen(IPC::Connection&);
969 void webProcessWillShutDown();
971 void processDidFinishLaunching();
973 void didSaveToPageCache();
975 void setScrollPinningBehavior(WebCore::ScrollPinningBehavior);
976 WebCore::ScrollPinningBehavior scrollPinningBehavior() const { return m_scrollPinningBehavior; }
978 void setOverlayScrollbarStyle(WTF::Optional<WebCore::ScrollbarOverlayStyle>);
979 WTF::Optional<WebCore::ScrollbarOverlayStyle> overlayScrollbarStyle() const { return m_scrollbarOverlayStyle; }
981 bool shouldRecordNavigationSnapshots() const { return m_shouldRecordNavigationSnapshots; }
982 void setShouldRecordNavigationSnapshots(bool shouldRecordSnapshots) { m_shouldRecordNavigationSnapshots = shouldRecordSnapshots; }
983 void recordNavigationSnapshot();
984 void recordNavigationSnapshot(WebBackForwardListItem&);
987 PassRefPtr<ViewSnapshot> takeViewSnapshot();
990 #if ENABLE(SUBTLE_CRYPTO)
991 void wrapCryptoKey(const Vector<uint8_t>&, bool& succeeded, Vector<uint8_t>&);
992 void unwrapCryptoKey(const Vector<uint8_t>&, bool& succeeded, Vector<uint8_t>&);
995 void takeSnapshot(WebCore::IntRect, WebCore::IntSize bitmapSize, SnapshotOptions, std::function<void (const ShareableBitmap::Handle&, CallbackBase::Error)>);
997 void navigationGestureDidBegin();
998 void navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem&);
999 void navigationGestureDidEnd(bool willNavigate, WebBackForwardListItem&);
1000 void navigationGestureDidEnd();
1001 void navigationGestureSnapshotWasRemoved();
1002 void willRecordNavigationSnapshot(WebBackForwardListItem&);
1004 bool isShowingNavigationGestureSnapshot() const { return m_isShowingNavigationGestureSnapshot; }
1006 bool isPlayingAudio() const { return !!(m_mediaState & WebCore::MediaProducer::IsPlayingAudio); }
1007 void isPlayingMediaDidChange(WebCore::MediaProducer::MediaStateFlags, uint64_t);
1009 #if ENABLE(MEDIA_SESSION)
1010 void hasMediaSessionWithActiveMediaElementsDidChange(bool);
1011 void mediaSessionMetadataDidChange(const WebCore::MediaSessionMetadata&);
1012 void focusedContentMediaElementDidChange(uint64_t);
1016 void removeNavigationGestureSnapshot();
1018 API::HitTestResult* lastMouseMoveHitTestResult() const { return m_lastMouseMoveHitTestResult.get(); }
1019 void performImmediateActionHitTestAtLocation(WebCore::FloatPoint);
1021 void immediateActionDidUpdate();
1022 void immediateActionDidCancel();
1023 void immediateActionDidComplete();
1025 void* immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult>, uint64_t, RefPtr<API::Object>);
1027 void installViewStateChangeCompletionHandler(void(^completionHandler)());
1030 #if PLATFORM(EFL) && HAVE(ACCESSIBILITY) && defined(HAVE_ECORE_X)
1031 bool accessibilityObjectReadByPoint(const WebCore::IntPoint&);
1032 bool accessibilityObjectReadPrevious();
1033 bool accessibilityObjectReadNext();
1036 #if USE(UNIFIED_TEXT_CHECKING)
1037 void checkTextOfParagraph(const String& text, uint64_t checkingTypes, Vector<WebCore::TextCheckingResult>& results);
1039 void getGuessesForWord(const String& word, const String& context, Vector<String>& guesses);
1041 void setShouldDispatchFakeMouseMoveEvents(bool);
1043 // Diagnostic messages logging.
1044 void logDiagnosticMessage(const String& message, const String& description, bool shouldSample);
1045 void logDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result, bool shouldSample);
1046 void logDiagnosticMessageWithValue(const String& message, const String& description, const String& value, bool shouldSample);
1047 void logSampledDiagnosticMessage(const String& message, const String& description);
1048 void logSampledDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result);
1049 void logSampledDiagnosticMessageWithValue(const String& message, const String& description, const String& value);
1051 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
1052 void addPlaybackTargetPickerClient(uint64_t);
1053 void removePlaybackTargetPickerClient(uint64_t);
1054 void showPlaybackTargetPicker(uint64_t, const WebCore::FloatRect&, bool hasVideo);
1055 void playbackTargetPickerClientStateDidChange(uint64_t, WebCore::MediaProducer::MediaStateFlags);
1056 void setMockMediaPlaybackTargetPickerEnabled(bool);
1057 void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::State);
1059 // WebMediaSessionManagerClient
1060 virtual void setPlaybackTarget(uint64_t, Ref<WebCore::MediaPlaybackTarget>&&) override;
1061 virtual void externalOutputDeviceAvailableDidChange(uint64_t, bool) override;
1062 virtual void setShouldPlayToPlaybackTarget(uint64_t, bool) override;
1065 void didChangeBackgroundColor();
1066 void didLayoutForCustomContentProvider();
1069 void clearWheelEventTestTrigger();
1070 void callAfterNextPresentationUpdate(std::function<void (CallbackBase::Error)>);
1072 void didLayout(uint32_t layoutMilestones);
1074 void didRestoreScrollPosition();
1077 WebPageProxy(PageClient&, WebProcessProxy&, uint64_t pageID, Ref<API::PageConfiguration>&&);
1078 void platformInitialize();
1080 void updateViewState(WebCore::ViewState::Flags flagsToUpdate = WebCore::ViewState::AllFlags);
1081 void updateActivityToken();
1082 void updateProccessSuppressionState();
1084 enum class ResetStateReason {
1088 void resetState(ResetStateReason);
1089 void resetStateAfterProcessExited();
1091 void setUserAgent(const String&);
1093 // IPC::MessageReceiver
1094 // Implemented in generated WebPageProxyMessageReceiver.cpp
1095 virtual void didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) override;
1096 virtual void didReceiveSyncMessage(IPC::Connection&, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&) override;
1098 // IPC::MessageSender
1099 virtual bool sendMessage(std::unique_ptr<IPC::MessageEncoder>, unsigned messageSendFlags) override;
1100 virtual IPC::Connection* messageSenderConnection() override;
1101 virtual uint64_t messageSenderDestinationID() override;
1103 // WebPopupMenuProxy::Client
1104 virtual void valueChangedForPopupMenu(WebPopupMenuProxy*, int32_t newSelectedIndex) override;
1105 virtual void setTextFromItemForPopupMenu(WebPopupMenuProxy*, int32_t index) override;
1107 virtual void failedToShowPopupMenu() override;
1110 void didCreateMainFrame(uint64_t frameID);
1111 void didCreateSubframe(uint64_t frameID);
1113 void didStartProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& url, const String& unreachableURL, const UserData&);
1114 void didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const String&, const UserData&);
1115 void didChangeProvisionalURLForFrame(uint64_t frameID, uint64_t navigationID, const String& url);
1116 void didFailProvisionalLoadForFrame(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, const UserData&);
1117 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&);
1118 void didFinishDocumentLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData&);
1119 void didFinishLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData&);
1120 void didFailLoadForFrame(uint64_t frameID, uint64_t navigationID, const WebCore::ResourceError&, const UserData&);
1121 void didSameDocumentNavigationForFrame(uint64_t frameID, uint64_t navigationID, uint32_t sameDocumentNavigationType, const String&, const UserData&);
1122 void didReceiveTitleForFrame(uint64_t frameID, const String&, const UserData&);
1123 void didFirstLayoutForFrame(uint64_t frameID, const UserData&);
1124 void didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, const UserData&);
1125 void didDisplayInsecureContentForFrame(uint64_t frameID, const UserData&);
1126 void didRunInsecureContentForFrame(uint64_t frameID, const UserData&);
1127 void didDetectXSSForFrame(uint64_t frameID, const UserData&);
1128 void frameDidBecomeFrameSet(uint64_t frameID, bool);
1129 void didStartProgress();
1130 void didChangeProgress(double);
1131 void didFinishProgress();
1132 void setNetworkRequestsInProgress(bool);
1134 void didDestroyNavigation(uint64_t navigationID);
1136 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, uint64_t& downloadID);
1137 void decidePolicyForNewWindowAction(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, const NavigationActionData&, const WebCore::ResourceRequest&, const String& frameName, uint64_t listenerID, const UserData&);
1138 void decidePolicyForResponse(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, uint64_t listenerID, const UserData&);
1139 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, uint64_t& downloadID);
1140 void unableToImplementPolicy(uint64_t frameID, const WebCore::ResourceError&, const UserData&);
1142 void willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const Vector<std::pair<String, String>>& textFieldValues, uint64_t listenerID, const UserData&);
1145 void didNavigateWithNavigationData(const WebNavigationDataStore&, uint64_t frameID);
1146 void didPerformClientRedirect(const String& sourceURLString, const String& destinationURLString, uint64_t frameID);
1147 void didPerformServerRedirect(const String& sourceURLString, const String& destinationURLString, uint64_t frameID);
1148 void didUpdateHistoryTitle(const String& title, const String& url, uint64_t frameID);
1151 void createNewPage(uint64_t frameID, const WebCore::SecurityOriginData&, const WebCore::ResourceRequest&, const WebCore::WindowFeatures&, const NavigationActionData&, uint64_t& newPageID, WebPageCreationParameters&);
1153 void closePage(bool stopResponsivenessTimer);
1154 void runJavaScriptAlert(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply>);
1155 void runJavaScriptConfirm(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply>);
1156 void runJavaScriptPrompt(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply>);
1157 void setStatusText(const String&);
1158 void mouseDidMoveOverElement(const WebHitTestResultData&, uint32_t modifiers, const UserData&);
1160 #if ENABLE(NETSCAPE_PLUGIN_API)
1161 void unavailablePluginButtonClicked(uint32_t opaquePluginUnavailabilityReason, const String& mimeType, const String& pluginURLString, const String& pluginsPageURLString, const String& frameURLString, const String& pageURLString);
1162 #endif // ENABLE(NETSCAPE_PLUGIN_API)
1164 void webGLPolicyForURL(const String& url, uint32_t& loadPolicy);
1165 void resolveWebGLPolicyForURL(const String& url, uint32_t& loadPolicy);
1166 #endif // ENABLE(WEBGL)
1167 void setToolbarsAreVisible(bool toolbarsAreVisible);
1168 void getToolbarsAreVisible(bool& toolbarsAreVisible);
1169 void setMenuBarIsVisible(bool menuBarIsVisible);
1170 void getMenuBarIsVisible(bool& menuBarIsVisible);
1171 void setStatusBarIsVisible(bool statusBarIsVisible);
1172 void getStatusBarIsVisible(bool& statusBarIsVisible);
1173 void setIsResizable(bool isResizable);
1174 void getIsResizable(bool& isResizable);
1175 void setWindowFrame(const WebCore::FloatRect&);
1176 void getWindowFrame(WebCore::FloatRect&);
1177 void screenToRootView(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint);
1178 void rootViewToScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);
1180 void accessibilityScreenToRootView(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint);
1181 void rootViewToAccessibilityScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);
1183 void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, bool& shouldClose);
1184 void didChangeViewportProperties(const WebCore::ViewportAttributes&);
1185 void pageDidScroll();
1186 void runOpenPanel(uint64_t frameID, const WebCore::FileChooserSettings&);
1187 void printFrame(uint64_t frameID);
1188 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>);
1189 void reachedApplicationCacheOriginQuota(const String& originIdentifier, uint64_t currentQuota, uint64_t totalBytesNeeded, PassRefPtr<Messages::WebPageProxy::ReachedApplicationCacheOriginQuota::DelayedReply>);
1190 void requestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_t frameID, String originIdentifier);
1192 void requestUserMediaPermissionForFrame(uint64_t userMediaID, uint64_t frameID, String originIdentifier, const Vector<String>& audioDeviceUIDs, const Vector<String>& videoDeviceUIDs);
1193 void checkUserMediaPermissionForFrame(uint64_t userMediaID, uint64_t frameID, String originIdentifier);
1196 void notifyScrollerThumbIsVisibleInRect(const WebCore::IntRect&);
1197 void recommendedScrollbarStyleDidChange(int32_t newStyle);
1198 void didChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar);
1199 void didChangeScrollOffsetPinningForMainFrame(bool pinnedToLeftSide, bool pinnedToRightSide, bool pinnedToTopSide, bool pinnedToBottomSide);
1200 void didChangePageCount(unsigned);
1201 void pageExtendedBackgroundColorDidChange(const WebCore::Color&);
1202 #if ENABLE(NETSCAPE_PLUGIN_API)
1203 void didFailToInitializePlugin(const String& mimeType, const String& frameURLString, const String& pageURLString);
1204 void didBlockInsecurePluginVersion(const String& mimeType, const String& pluginURLString, const String& frameURLString, const String& pageURLString, bool replacementObscured);
1205 #endif // ENABLE(NETSCAPE_PLUGIN_API)
1206 void setCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents) { m_canShortCircuitHorizontalWheelEvents = canShortCircuitHorizontalWheelEvents; }
1208 void reattachToWebProcess();
1209 RefPtr<API::Navigation> reattachToWebProcessForReload();
1210 RefPtr<API::Navigation> reattachToWebProcessWithItem(WebBackForwardListItem*);
1212 void requestNotificationPermission(uint64_t notificationID, const String& originString);
1213 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);
1214 void cancelNotification(uint64_t notificationID);
1215 void clearNotifications(const Vector<uint64_t>& notificationIDs);
1216 void didDestroyNotification(uint64_t notificationID);
1218 #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
1219 void pageDidRequestScroll(const WebCore::IntPoint&);
1220 void pageTransitionViewportReady();
1221 void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&);
1224 void didChangeContentSize(const WebCore::IntSize&);
1226 #if ENABLE(INPUT_TYPE_COLOR)
1227 void showColorPicker(const WebCore::Color& initialColor, const WebCore::IntRect&);
1228 virtual void didChooseColor(const WebCore::Color&) override;
1229 virtual void didEndColorPicker() override;
1232 void editorStateChanged(const EditorState&);
1233 void compositionWasCanceled(const EditorState&);
1235 // Back/Forward list management
1236 void backForwardAddItem(uint64_t itemID);
1237 void backForwardGoToItem(uint64_t itemID, SandboxExtension::Handle&);
1238 void backForwardItemAtIndex(int32_t index, uint64_t& itemID);
1239 void backForwardBackListCount(int32_t& count);
1240 void backForwardForwardListCount(int32_t& count);
1241 void backForwardClear();
1244 void registerEditCommandForUndo(uint64_t commandID, uint32_t editAction);
1245 void registerInsertionUndoGrouping();
1246 void clearAllEditCommands();
1247 void canUndoRedo(uint32_t action, bool& result);
1248 void executeUndoRedo(uint32_t action, bool& result);
1250 // Keyboard handling
1252 void executeSavedCommandBySelector(const String& selector, bool& handled);
1256 void getEditorCommandsForKeyEvent(const AtomicString&, Vector<String>&);
1257 void bindAccessibilityTree(const String&);
1260 void getEditorCommandsForKeyEvent(Vector<String>&);
1264 void showPopupMenu(const WebCore::IntRect& rect, uint64_t textDirection, const Vector<WebPopupItem>& items, int32_t selectedIndex, const PlatformPopupMenuData&);
1265 void hidePopupMenu();
1267 #if ENABLE(CONTEXT_MENUS)
1268 void showContextMenu(const ContextMenuContextData&, const UserData&);
1269 void internalShowContextMenu(const ContextMenuContextData&, const UserData&);
1272 #if ENABLE(TELEPHONE_NUMBER_DETECTION)
1274 void showTelephoneNumberMenu(const String& telephoneNumber, const WebCore::IntPoint&);
1278 // Search popup results
1279 void saveRecentSearches(const String&, const Vector<WebCore::RecentSearch>&);
1280 void loadRecentSearches(const String&, Vector<WebCore::RecentSearch>&);
1284 void getIsSpeaking(bool&);
1285 void speak(const String&);
1286 void stopSpeaking();
1289 void searchWithSpotlight(const String&);
1291 void searchTheWeb(const String&);
1294 void didPerformDictionaryLookup(const WebCore::DictionaryPopupInfo&);
1298 bool appleMailPaginationQuirkEnabled();
1301 // Spelling and grammar.
1302 void checkSpellingOfString(const String& text, int32_t& misspellingLocation, int32_t& misspellingLength);
1303 void checkGrammarOfString(const String& text, Vector<WebCore::GrammarDetail>&, int32_t& badGrammarLocation, int32_t& badGrammarLength);
1304 void spellingUIIsShowing(bool&);
1305 void updateSpellingUIWithMisspelledWord(const String& misspelledWord);
1306 void updateSpellingUIWithGrammarString(const String& badGrammarPhrase, const WebCore::GrammarDetail&);
1307 void learnWord(const String& word);
1308 void ignoreWord(const String& word);
1309 void requestCheckingOfString(uint64_t requestID, const WebCore::TextCheckingRequestData&);
1311 void setFocus(bool focused);
1312 void takeFocus(uint32_t direction);
1313 void setToolTip(const String&);
1314 void setCursor(const WebCore::Cursor&);
1315 void setCursorHiddenUntilMouseMoves(bool);
1317 void didReceiveEvent(uint32_t opaqueType, bool handled);
1318 void stopResponsivenessTimer();
1320 void voidCallback(uint64_t);
1321 void dataCallback(const IPC::DataReference&, uint64_t);
1322 void imageCallback(const ShareableBitmap::Handle&, uint64_t);
1323 void stringCallback(const String&, uint64_t);
1324 void scriptValueCallback(const IPC::DataReference&, bool hadException, const WebCore::ExceptionDetails&, uint64_t);
1325 void computedPagesCallback(const Vector<WebCore::IntRect>&, double totalScaleFactorForPrinting, uint64_t);
1326 void validateCommandCallback(const String&, bool, int, uint64_t);
1327 void unsignedCallback(uint64_t, uint64_t);
1328 void editingRangeCallback(const EditingRange&, uint64_t);
1330 void machSendRightCallback(const WebCore::MachSendRight&, uint64_t);
1332 void rectForCharacterRangeCallback(const WebCore::IntRect&, const EditingRange&, uint64_t);
1334 void attributedStringForCharacterRangeCallback(const AttributedString&, const EditingRange&, uint64_t);
1335 void fontAtSelectionCallback(const String&, double, bool, uint64_t);
1338 void gestureCallback(const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t, uint64_t);
1339 void touchesCallback(const WebCore::IntPoint&, uint32_t, uint64_t);
1340 void autocorrectionDataCallback(const Vector<WebCore::FloatRect>&, const String&, float, uint64_t, uint64_t);
1341 void autocorrectionContextCallback(const String&, const String&, const String&, const String&, uint64_t, uint64_t, uint64_t);
1342 void dictationContextCallback(const String&, const String&, const String&, uint64_t);
1343 void interpretKeyEvent(const EditorState&, bool isCharEvent, bool& handled);
1344 void showPlaybackTargetPicker(bool hasVideo, const WebCore::IntRect& elementRect);
1347 void printFinishedCallback(const WebCore::ResourceError&, uint64_t);
1350 void focusedFrameChanged(uint64_t frameID);
1351 void frameSetLargestFrameChanged(uint64_t frameID);
1353 void canAuthenticateAgainstProtectionSpaceInFrame(uint64_t frameID, const WebCore::ProtectionSpace&, bool& canAuthenticate);
1354 void didReceiveAuthenticationChallenge(uint64_t frameID, const WebCore::AuthenticationChallenge&, uint64_t challengeID);
1356 void didFinishLoadingDataForCustomContentProvider(const String& suggestedFilename, const IPC::DataReference&);
1359 void pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus);
1360 void setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t complexTextInputState);
1363 bool maybeInitializeSandboxExtensionHandle(const WebCore::URL&, SandboxExtension::Handle&);
1366 void substitutionsPanelIsShowing(bool&);
1367 void showCorrectionPanel(int32_t panelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
1368 void dismissCorrectionPanel(int32_t reason);
1369 void dismissCorrectionPanelSoon(int32_t reason, String& result);
1370 void recordAutocorrectionResponse(int32_t responseType, const String& replacedString, const String& replacementString);
1372 #if USE(DICTATION_ALTERNATIVES)
1373 void showDictationAlternativeUI(const WebCore::FloatRect& boundingBoxOfDictatedText, uint64_t dictationContext);
1374 void removeDictationAlternatives(uint64_t dictationContext);
1375 void dictationAlternatives(uint64_t dictationContext, Vector<String>& result);
1377 #endif // PLATFORM(MAC)
1380 WebCore::FloatSize screenSize();
1381 WebCore::FloatSize availableScreenSize();
1382 float textAutosizingWidth();
1384 void dynamicViewportUpdateChangedTarget(double newTargetScale, const WebCore::FloatPoint& newScrollPosition, uint64_t dynamicViewportSizeUpdateID);
1385 void couldNotRestorePageState();
1386 void restorePageState(const WebCore::FloatRect&, double scale);
1387 void restorePageCenterAndScale(const WebCore::FloatPoint&, double scale);
1389 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);
1391 void startAssistingNode(const AssistedNodeInformation&, bool userIsInteracting, bool blurPreviousNode, const UserData&);
1392 void stopAssistingNode();
1394 void showInspectorHighlight(const WebCore::Highlight&);
1395 void hideInspectorHighlight();
1397 void showInspectorIndication();
1398 void hideInspectorIndication();
1400 void enableInspectorNodeSearch();
1401 void disableInspectorNodeSearch();
1402 #endif // PLATFORM(IOS)
1404 void clearLoadDependentCallbacks();
1406 void performDragControllerAction(DragControllerAction, WebCore::DragData&, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
1408 void updateBackingStoreDiscardableState();
1410 void setRenderTreeSize(uint64_t treeSize) { m_renderTreeSize = treeSize; }
1412 #if PLUGIN_ARCHITECTURE(X11)
1413 void createPluginContainer(uint64_t& windowID);
1414 void windowedPluginGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect, uint64_t windowID);
1415 void windowedPluginVisibilityDidChange(bool isVisible, uint64_t windowID);
1418 void processNextQueuedWheelEvent();
1419 void sendWheelEvent(const WebWheelEvent&);
1421 #if ENABLE(TOUCH_EVENTS)
1422 bool shouldStartTrackingTouchEvents(const WebTouchEvent&) const;
1425 #if ENABLE(NETSCAPE_PLUGIN_API)
1426 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);
1430 void didStartLoadForQuickLookDocumentInMainFrame(const String& fileName, const String& uti);
1431 void didFinishLoadForQuickLookDocumentInMainFrame(const QuickLookDocumentData&);
1434 #if ENABLE(CONTENT_FILTERING)
1435 void contentFilterDidBlockLoadForFrame(const WebCore::ContentFilterUnblockHandler&, uint64_t frameID);
1438 uint64_t generateNavigationID();
1440 WebPreferencesStore preferencesStore() const;
1442 void dispatchViewStateChange();
1443 void viewDidLeaveWindow();
1444 void viewDidEnterWindow();
1447 void didPerformImmediateActionHitTest(const WebHitTestResultData&, bool contentPreventsDefault, const UserData&);
1450 void useFixedLayoutDidChange(bool useFixedLayout) { m_useFixedLayout = useFixedLayout; }
1451 void fixedLayoutSizeDidChange(WebCore::IntSize fixedLayoutSize) { m_fixedLayoutSize = fixedLayoutSize; }
1453 void imageOrMediaDocumentSizeChanged(const WebCore::IntSize&);
1456 void requestInstallMissingMediaPlugins(const String& details, const String& description);
1460 void handleAutoFillButtonClick(const UserData&);
1462 void handleMessage(IPC::Connection&, const String& messageName, const UserData& messageBody);
1463 void handleSynchronousMessage(IPC::Connection&, const String& messageName, const UserData& messageBody, UserData& returnUserData);
1465 PageClient& m_pageClient;
1466 Ref<API::PageConfiguration> m_configuration;
1468 std::unique_ptr<API::LoaderClient> m_loaderClient;
1469 std::unique_ptr<API::PolicyClient> m_policyClient;
1470 std::unique_ptr<API::NavigationClient> m_navigationClient;
1471 std::unique_ptr<API::HistoryClient> m_historyClient;
1472 std::unique_ptr<API::FormClient> m_formClient;
1473 std::unique_ptr<API::UIClient> m_uiClient;
1475 WebUIPopupMenuClient m_uiPopupMenuClient;
1477 std::unique_ptr<API::FindClient> m_findClient;
1478 std::unique_ptr<API::FindMatchesClient> m_findMatchesClient;
1479 std::unique_ptr<API::DiagnosticLoggingClient> m_diagnosticLoggingClient;
1480 #if ENABLE(CONTEXT_MENUS)
1481 std::unique_ptr<API::ContextMenuClient> m_contextMenuClient;
1483 std::unique_ptr<WebPageInjectedBundleClient> m_injectedBundleClient;
1485 std::unique_ptr<WebNavigationState> m_navigationState;
1486 String m_failingProvisionalLoadURL;
1488 std::unique_ptr<DrawingAreaProxy> m_drawingArea;
1489 #if ENABLE(ASYNC_SCROLLING)
1490 std::unique_ptr<RemoteScrollingCoordinatorProxy> m_scrollingCoordinatorProxy;
1493 Ref<WebProcessProxy> m_process;
1494 Ref<WebPageGroup> m_pageGroup;
1495 Ref<WebPreferences> m_preferences;
1497 WebProcessLifetimeTracker m_webProcessLifetimeTracker { *this };
1499 const RefPtr<WebUserContentControllerProxy> m_userContentController;
1500 Ref<VisitedLinkStore> m_visitedLinkStore;
1501 Ref<WebsiteDataStore> m_websiteDataStore;
1503 RefPtr<WebFrameProxy> m_mainFrame;
1504 RefPtr<WebFrameProxy> m_focusedFrame;
1505 RefPtr<WebFrameProxy> m_frameSetLargestFrame;
1508 String m_applicationNameForUserAgent;
1509 String m_customUserAgent;
1510 String m_customTextEncodingName;
1512 bool m_treatsSHA1CertificatesAsInsecure;
1514 RefPtr<WebInspectorProxy> m_inspector;
1516 #if ENABLE(FULLSCREEN_API)
1517 RefPtr<WebFullScreenManagerProxy> m_fullScreenManager;
1520 RefPtr<WebVideoFullscreenManagerProxy> m_videoFullscreenManager;
1521 VisibleContentRectUpdateInfo m_lastVisibleContentRectUpdate;
1522 bool m_hasReceivedLayerTreeTransactionAfterDidCommitLoad;
1523 uint64_t m_firstLayerTreeTransactionIdAfterDidCommitLoad;
1524 int32_t m_deviceOrientation;
1525 bool m_dynamicViewportSizeUpdateWaitingForTarget;
1526 bool m_dynamicViewportSizeUpdateWaitingForLayerTreeCommit;
1527 uint64_t m_dynamicViewportSizeUpdateLayerTreeTransactionID;
1528 uint64_t m_layerTreeTransactionIdAtLastTouchStart;
1529 uint64_t m_currentDynamicViewportSizeUpdateID { 0 };
1530 bool m_hasNetworkRequestsOnSuspended;
1533 #if ENABLE(VIBRATION)
1534 RefPtr<WebVibrationProxy> m_vibration;
1537 CallbackMap m_callbacks;
1538 HashSet<uint64_t> m_loadDependentStringCallbackIDs;
1540 HashSet<WebEditCommandProxy*> m_editCommandSet;
1543 HashSet<String> m_knownKeypressCommandNames;
1546 RefPtr<WebPopupMenuProxy> m_activePopupMenu;
1547 #if ENABLE(CONTEXT_MENUS)
1548 std::unique_ptr<WebContextMenuProxy> m_activeContextMenu;
1549 ContextMenuContextData m_activeContextMenuContextData;
1551 RefPtr<API::HitTestResult> m_lastMouseMoveHitTestResult;
1553 RefPtr<WebOpenPanelResultListenerProxy> m_openPanelResultListener;
1554 GeolocationPermissionRequestManagerProxy m_geolocationPermissionRequestManager;
1555 NotificationPermissionRequestManagerProxy m_notificationPermissionRequestManager;
1557 UserMediaPermissionRequestManagerProxy m_userMediaPermissionRequestManager;
1559 WebCore::ViewState::Flags m_viewState;
1560 bool m_viewWasEverInWindow;
1562 bool m_allowsMediaDocumentInlinePlayback { false };
1563 bool m_alwaysRunsAtForegroundPriority;
1564 ProcessThrottler::ForegroundActivityToken m_activityToken;
1567 Ref<WebBackForwardList> m_backForwardList;
1569 bool m_maintainsInactiveSelection;
1573 EditorState m_editorState;
1576 double m_textZoomFactor;
1577 double m_pageZoomFactor;
1578 double m_pageScaleFactor;
1579 double m_pluginZoomFactor;
1580 double m_pluginScaleFactor;
1581 double m_viewScaleFactor { 1 };
1582 float m_intrinsicDeviceScaleFactor;
1583 float m_customDeviceScaleFactor;
1584 float m_topContentInset;
1586 LayerHostingMode m_layerHostingMode;
1588 bool m_drawsBackground;
1590 WebCore::Color m_underlayColor;
1591 WebCore::Color m_pageExtendedBackgroundColor;
1593 bool m_useFixedLayout;
1594 WebCore::IntSize m_fixedLayoutSize;
1596 bool m_suppressScrollbarAnimations;
1598 WebCore::Pagination::Mode m_paginationMode;
1599 bool m_paginationBehavesLikeColumns;
1600 double m_pageLength;
1601 double m_gapBetweenPages;
1603 // If the process backing the web page is alive and kicking.
1606 // Whether WebPageProxy::close() has been called on this page.
1609 // Whether it can run modal child web pages.
1612 bool m_isInPrintingMode;
1613 bool m_isPerformingDOMPrintOperation;
1615 bool m_inDecidePolicyForResponseSync;
1616 const WebCore::ResourceRequest* m_decidePolicyForResponseRequest;
1617 bool m_syncMimeTypePolicyActionIsValid;
1618 WebCore::PolicyAction m_syncMimeTypePolicyAction;
1619 uint64_t m_syncMimeTypePolicyDownloadID;
1621 bool m_inDecidePolicyForNavigationAction;
1622 bool m_syncNavigationActionPolicyActionIsValid;
1623 WebCore::PolicyAction m_syncNavigationActionPolicyAction;
1624 uint64_t m_syncNavigationActionPolicyDownloadID;
1625 bool m_shouldSuppressAppLinksInNextNavigationPolicyDecision { false };
1627 Deque<NativeWebKeyboardEvent> m_keyEventQueue;
1628 Deque<NativeWebWheelEvent> m_wheelEventQueue;
1629 Deque<std::unique_ptr<Vector<NativeWebWheelEvent>>> m_currentlyProcessedWheelEvents;
1630 #if ENABLE(MAC_GESTURE_EVENTS)
1631 Deque<NativeWebGestureEvent> m_gestureEventQueue;
1634 bool m_processingMouseMoveEvent;
1635 std::unique_ptr<NativeWebMouseEvent> m_nextMouseMoveEvent;
1636 std::unique_ptr<NativeWebMouseEvent> m_currentlyProcessedMouseDownEvent;
1638 #if ENABLE(TOUCH_EVENTS)
1639 bool m_isTrackingTouchEvents;
1641 #if ENABLE(TOUCH_EVENTS) && !ENABLE(IOS_TOUCH_EVENTS)
1642 Deque<QueuedTouchEvents> m_touchEventQueue;
1645 #if ENABLE(INPUT_TYPE_COLOR)
1646 RefPtr<WebColorPicker> m_colorPicker;
1649 const uint64_t m_pageID;
1650 WebCore::SessionID m_sessionID;
1652 bool m_isPageSuspended;
1653 bool m_addsVisitedLinks;
1655 #if ENABLE(REMOTE_INSPECTOR)
1656 bool m_allowsRemoteInspection;
1657 String m_remoteInspectionNameOverride;
1661 bool m_isSmartInsertDeleteEnabled;
1665 String m_accessibilityPlugID;
1666 WebCore::Color m_backgroundColor;
1669 int64_t m_spellDocumentTag;
1670 bool m_hasSpellDocumentTag;
1671 unsigned m_pendingLearnOrIgnoreWordMessageCount;
1673 bool m_mainFrameHasCustomContentProvider;
1675 #if ENABLE(DRAG_SUPPORT)
1676 // Current drag destination details are delivered as an asynchronous response,
1677 // so we preserve them to be used when the next dragging delegate call is made.
1678 WebCore::DragOperation m_currentDragOperation;
1679 bool m_currentDragIsOverFileInput;
1680 unsigned m_currentDragNumberOfFilesToBeAccepted;
1683 PageLoadState m_pageLoadState;
1685 bool m_delegatesScrolling;
1687 bool m_mainFrameHasHorizontalScrollbar;
1688 bool m_mainFrameHasVerticalScrollbar;
1690 // Whether horizontal wheel events can be handled directly for swiping purposes.
1691 bool m_canShortCircuitHorizontalWheelEvents;
1693 bool m_mainFrameIsPinnedToLeftSide;
1694 bool m_mainFrameIsPinnedToRightSide;
1695 bool m_mainFrameIsPinnedToTopSide;
1696 bool m_mainFrameIsPinnedToBottomSide;
1698 bool m_shouldUseImplicitRubberBandControl;
1699 bool m_rubberBandsAtLeft;
1700 bool m_rubberBandsAtRight;
1701 bool m_rubberBandsAtTop;
1702 bool m_rubberBandsAtBottom;
1704 bool m_enableVerticalRubberBanding;
1705 bool m_enableHorizontalRubberBanding;
1707 bool m_backgroundExtendsBeyondPage;
1709 bool m_shouldRecordNavigationSnapshots;
1710 bool m_isShowingNavigationGestureSnapshot;
1712 bool m_mainFramePluginHandlesPageScaleGesture { false };
1714 unsigned m_pageCount;
1716 WebCore::IntRect m_visibleScrollerThumbRect;
1718 uint64_t m_renderTreeSize;
1719 uint64_t m_sessionRestorationRenderTreeSize;
1720 bool m_wantsSessionRestorationRenderTreeSizeThresholdEvent;
1721 bool m_hitRenderTreeSizeThreshold;
1723 bool m_suppressVisibilityUpdates;
1724 bool m_autoSizingShouldExpandToViewHeight;
1725 WebCore::IntSize m_minimumLayoutSize;
1727 float m_mediaVolume;
1729 bool m_mayStartMediaWhenInWindow;
1731 bool m_waitingForDidUpdateViewState;
1733 bool m_shouldScaleViewToFitDocument { false };
1734 bool m_suppressNavigationSnapshotting { false };
1737 HashMap<String, String> m_temporaryPDFFiles;
1738 std::unique_ptr<WebCore::RunLoopObserver> m_viewStateChangeDispatcher;
1740 std::unique_ptr<RemoteLayerTreeScrollingPerformanceData> m_scrollingPerformanceData;
1741 bool m_scrollPerformanceDataCollectionEnabled;
1743 UserObservablePageToken m_pageIsUserObservableCount;
1744 ProcessSuppressionDisabledToken m_preventProcessSuppressionCount;
1746 WebCore::ScrollPinningBehavior m_scrollPinningBehavior;
1747 WTF::Optional<WebCore::ScrollbarOverlayStyle> m_scrollbarOverlayStyle;
1749 uint64_t m_navigationID;
1751 WebPreferencesStore::ValueMap m_configurationPreferenceValues;
1752 WebCore::ViewState::Flags m_potentiallyChangedViewStateFlags;
1753 bool m_viewStateChangeWantsSynchronousReply;
1754 Vector<uint64_t> m_nextViewStateChangeCallbacks;
1756 WebCore::MediaProducer::MediaStateFlags m_mediaState { WebCore::MediaProducer::IsNotPlaying };
1758 #if ENABLE(MEDIA_SESSION)
1759 bool m_hasMediaSessionWithActiveMediaElements { false };
1762 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
1763 bool m_requiresTargetMonitoring { false };
1767 bool m_hasDeferredStartAssistingNode { false };
1768 std::unique_ptr<NodeAssistanceArguments> m_deferredNodeAssistanceArguments;
1772 } // namespace WebKit
1774 #endif // WebPageProxy_h