f067093e8da093ca177318e6a1d9609af246c2dc
[WebKit-https.git] / Source / WebKit2 / UIProcess / WebPageProxy.h
1 /*
2  * Copyright (C) 2010, 2011, 2014 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 "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 "SandboxExtension.h"
47 #include "ShareableBitmap.h"
48 #include "VisibleContentRectUpdateInfo.h"
49 #include "WKBase.h"
50 #include "WKPagePrivate.h"
51 #include "WebColorPicker.h"
52 #include "WebContextMenuItemData.h"
53 #include "WebCoreArgumentCoders.h"
54 #include "WebFindClient.h"
55 #include "WebFormClient.h"
56 #include "WebFrameProxy.h"
57 #include "WebPageContextMenuClient.h"
58 #include "WebPageCreationParameters.h"
59 #include "WebPreferences.h"
60 #include <WebCore/AlternativeTextClient.h> // FIXME: Needed by WebPageProxyMessages.h for DICTATION_ALTERNATIVES.
61 #include "WebPageProxyMessages.h"
62 #include "WebPopupMenuProxy.h"
63 #include <WebCore/Color.h>
64 #include <WebCore/DragActions.h>
65 #include <WebCore/DragSession.h>
66 #include <WebCore/HitTestResult.h>
67 #include <WebCore/Page.h>
68 #include <WebCore/PlatformScreen.h>
69 #include <WebCore/ScrollTypes.h>
70 #include <WebCore/TextChecking.h>
71 #include <WebCore/TextGranularity.h>
72 #include <WebCore/ViewState.h>
73 #include <wtf/HashMap.h>
74 #include <wtf/HashSet.h>
75 #include <wtf/OwnPtr.h>
76 #include <wtf/PassOwnPtr.h>
77 #include <wtf/PassRefPtr.h>
78 #include <wtf/Ref.h>
79 #include <wtf/RefPtr.h>
80 #include <wtf/Vector.h>
81 #include <wtf/text/WTFString.h>
82
83 #if ENABLE(DRAG_SUPPORT)
84 #include <WebCore/DragActions.h>
85 #include <WebCore/DragSession.h>
86 #endif
87
88 #if ENABLE(TOUCH_EVENTS)
89 #include "NativeWebTouchEvent.h"
90 #endif
91
92 #if PLATFORM(EFL)
93 #include "WKPageEfl.h"
94 #include "WebUIPopupMenuClient.h"
95 #include <Evas.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 namespace API {
107 class LoaderClient;
108 class PolicyClient;
109 class UIClient;
110 class URLRequest;
111 }
112
113 namespace IPC {
114 class ArgumentDecoder;
115 class Connection;
116 }
117
118 namespace WebCore {
119 class AuthenticationChallenge;
120 class Cursor;
121 class DragData;
122 class FloatRect;
123 class GraphicsLayer;
124 class IntSize;
125 class ProtectionSpace;
126 class SharedBuffer;
127 struct FileChooserSettings;
128 struct TextAlternativeWithRange;
129 struct TextCheckingResult;
130 struct ViewportAttributes;
131 struct WindowFeatures;
132 }
133
134 #if USE(APPKIT)
135 OBJC_CLASS WKView;
136 #endif
137
138 #if PLATFORM(GTK)
139 typedef GtkWidget* PlatformWidget;
140 #endif
141
142 namespace WebKit {
143
144 class CertificateInfo;
145 class NativeWebKeyboardEvent;
146 class NativeWebMouseEvent;
147 class NativeWebWheelEvent;
148 class PageClient;
149 class RemoteLayerTreeTransaction;
150 class RemoteScrollingCoordinatorProxy;
151 class StringPairVector;
152 class VisitedLinkProvider;
153 class WebBackForwardList;
154 class WebBackForwardListItem;
155 class WebContextMenuProxy;
156 class WebEditCommandProxy;
157 class WebFullScreenManagerProxy;
158 class WebVideoFullscreenManagerProxy;
159 class WebKeyboardEvent;
160 class WebMouseEvent;
161 class WebOpenPanelResultListenerProxy;
162 class WebPageGroup;
163 class WebProcessProxy;
164 class WebWheelEvent;
165 struct AttributedString;
166 struct ColorSpaceData;
167 struct DictionaryPopupInfo;
168 struct EditingRange;
169 struct EditorState;
170 struct PlatformPopupMenuData;
171 struct PrintInfo;
172 struct WebPopupItem;
173
174 #if ENABLE(VIBRATION)
175 class WebVibrationProxy;
176 #endif
177
178 typedef GenericCallback<uint64_t> UnsignedCallback;
179 typedef GenericCallback<EditingRange> EditingRangeCallback;
180 typedef GenericCallback<StringImpl*> StringCallback;
181 typedef GenericCallback<WebSerializedScriptValue*> ScriptValueCallback;
182
183 #if PLATFORM(GTK)
184 typedef GenericCallback<API::Error*> PrintFinishedCallback;
185 #endif
186
187 #if ENABLE(TOUCH_EVENTS)
188 struct QueuedTouchEvents {
189     QueuedTouchEvents(const NativeWebTouchEvent& event)
190         : forwardedEvent(event)
191     {
192     }
193     NativeWebTouchEvent forwardedEvent;
194     Vector<NativeWebTouchEvent> deferredTouchEvents;
195 };
196 #endif
197
198 // FIXME: Make a version of CallbackBase with three arguments, and define ValidateCommandCallback as a specialization.
199 class ValidateCommandCallback : public CallbackBase {
200 public:
201     typedef std::function<void (bool, StringImpl*, bool, int32_t)> CallbackFunction;
202
203     static PassRefPtr<ValidateCommandCallback> create(CallbackFunction callback)
204     {
205         return adoptRef(new ValidateCommandCallback(callback));
206     }
207
208     virtual ~ValidateCommandCallback()
209     {
210         ASSERT(!m_callback);
211     }
212
213     void performCallbackWithReturnValue(StringImpl* returnValue1, bool returnValue2, int returnValue3)
214     {
215         ASSERT(m_callback);
216
217         m_callback(false, returnValue1, returnValue2, returnValue3);
218
219         m_callback = 0;
220     }
221     
222     void invalidate()
223     {
224         ASSERT(m_callback);
225
226         m_callback(true, 0, 0, 0);
227         
228         m_callback = 0;
229     }
230
231 private:
232
233     ValidateCommandCallback(CallbackFunction callback)
234         : m_callback(callback)
235     {
236     }
237
238     CallbackFunction m_callback;
239 };
240
241 // FIXME: Make a version of CallbackBase with two arguments, and define RectForCharacterRangeCallback as a specialization.
242 class RectForCharacterRangeCallback : public CallbackBase {
243 public:
244     typedef std::function<void (bool, const WebCore::IntRect&, const EditingRange&)> CallbackFunction;
245
246     static PassRefPtr<RectForCharacterRangeCallback> create(CallbackFunction callback)
247     {
248         return adoptRef(new RectForCharacterRangeCallback(callback));
249     }
250
251     virtual ~RectForCharacterRangeCallback()
252     {
253         ASSERT(!m_callback);
254     }
255
256     void performCallbackWithReturnValue(const WebCore::IntRect& rect, const EditingRange& range)
257     {
258         ASSERT(m_callback);
259
260         m_callback(false, rect, range);
261
262         m_callback = 0;
263     }
264     
265     void invalidate()
266     {
267         ASSERT(m_callback);
268
269         m_callback(true, WebCore::IntRect(), EditingRange());
270
271         m_callback = 0;
272     }
273
274 private:
275
276     RectForCharacterRangeCallback(CallbackFunction callback)
277         : m_callback(callback)
278     {
279     }
280
281     CallbackFunction m_callback;
282 };
283
284 #if PLATFORM(MAC)
285
286 // FIXME: Make a version of CallbackBase with two arguments, and define AttributedStringForCharacterRangeCallback as a specialization.
287 class AttributedStringForCharacterRangeCallback : public CallbackBase {
288 public:
289     typedef std::function<void (bool, const AttributedString&, const EditingRange&)> CallbackFunction;
290
291     static PassRefPtr<AttributedStringForCharacterRangeCallback> create(CallbackFunction callback)
292     {
293         return adoptRef(new AttributedStringForCharacterRangeCallback(callback));
294     }
295
296     virtual ~AttributedStringForCharacterRangeCallback()
297     {
298         ASSERT(!m_callback);
299     }
300
301     void performCallbackWithReturnValue(const AttributedString& string, const EditingRange& range)
302     {
303         ASSERT(m_callback);
304
305         m_callback(false, string, range);
306
307         m_callback = 0;
308     }
309     
310     void invalidate()
311     {
312         ASSERT(m_callback);
313
314         m_callback(true, AttributedString(), EditingRange());
315
316         m_callback = 0;
317     }
318
319 private:
320
321     AttributedStringForCharacterRangeCallback(CallbackFunction callback)
322         : m_callback(callback)
323     {
324     }
325
326     CallbackFunction m_callback;
327 };
328
329 #endif
330
331 #if PLATFORM(IOS)
332 class GestureCallback : public CallbackBase {
333 public:
334     typedef std::function<void (bool, const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t)> CallbackFunction;
335
336     static PassRefPtr<GestureCallback> create(CallbackFunction callback)
337     {
338         return adoptRef(new GestureCallback(callback));
339     }
340
341     virtual ~GestureCallback()
342     {
343         ASSERT(!m_callback);
344     }
345
346     void performCallbackWithReturnValue(const WebCore::IntPoint& returnValue1, uint32_t returnValue2, uint32_t returnValue3, uint32_t returnValue4)
347     {
348         ASSERT(m_callback);
349
350         m_callback(false, returnValue1, returnValue2, returnValue3, returnValue4);
351
352         m_callback = 0;
353     }
354
355     void invalidate()
356     {
357         ASSERT(m_callback);
358
359         m_callback(true, WebCore::IntPoint(), 0, 0, 0);
360
361         m_callback = 0;
362     }
363
364 private:
365
366     GestureCallback(CallbackFunction callback)
367         : m_callback(callback)
368     {
369         ASSERT(m_callback);
370     }
371
372     CallbackFunction m_callback;
373 };
374
375 class TouchesCallback : public CallbackBase {
376 public:
377     typedef std::function<void(bool, const WebCore::IntPoint&, uint32_t)> CallbackFunction;
378
379     static PassRefPtr<TouchesCallback> create(CallbackFunction callback)
380     {
381         return adoptRef(new TouchesCallback(callback));
382     }
383
384     virtual ~TouchesCallback()
385     {
386         ASSERT(!m_callback);
387     }
388
389     void performCallbackWithReturnValue(const WebCore::IntPoint& returnValue1, uint32_t returnValue2)
390     {
391         ASSERT(m_callback);
392
393         m_callback(false, returnValue1, returnValue2);
394
395         m_callback = 0;
396     }
397
398     void invalidate()
399     {
400         ASSERT(m_callback);
401
402         RefPtr<API::Error> error = API::Error::create();
403         m_callback(true, WebCore::IntPoint(), 0);
404         
405         m_callback = 0;
406     }
407     
408 private:
409     
410     TouchesCallback(CallbackFunction callback)
411         : m_callback(callback)
412     {
413         ASSERT(m_callback);
414     }
415     
416     CallbackFunction m_callback;
417 };
418 #endif
419
420 struct WebPageConfiguration {
421     WebPageGroup* pageGroup = nullptr;
422     WebPreferences* preferences = nullptr;
423     VisitedLinkProvider* visitedLinkProvider = nullptr;
424     API::Session* session = nullptr;
425     WebPageProxy* relatedPage = nullptr;
426 };
427
428 class WebPageProxy : public API::ObjectImpl<API::Object::Type::Page>
429 #if ENABLE(INPUT_TYPE_COLOR)
430     , public WebColorPicker::Client
431 #endif
432     , public WebPopupMenuProxy::Client
433     , public IPC::MessageReceiver
434     , public IPC::MessageSender {
435 public:
436     static PassRefPtr<WebPageProxy> create(PageClient&, WebProcessProxy&, uint64_t pageID, const WebPageConfiguration&);
437     virtual ~WebPageProxy();
438
439     void setSession(API::Session&);
440
441     uint64_t pageID() const { return m_pageID; }
442     WebCore::SessionID sessionID() const { return m_session->getID(); }
443
444     WebFrameProxy* mainFrame() const { return m_mainFrame.get(); }
445     WebFrameProxy* focusedFrame() const { return m_focusedFrame.get(); }
446     WebFrameProxy* frameSetLargestFrame() const { return m_frameSetLargestFrame.get(); }
447
448     DrawingAreaProxy* drawingArea() const { return m_drawingArea.get(); }
449     
450 #if ENABLE(ASYNC_SCROLLING)
451     RemoteScrollingCoordinatorProxy* scrollingCoordinatorProxy() const { return m_scrollingCoordinatorProxy.get(); }
452 #endif
453
454     WebBackForwardList& backForwardList() { return m_backForwardList.get(); }
455
456 #if ENABLE(INSPECTOR)
457     WebInspectorProxy* inspector();
458 #endif
459
460 #if ENABLE(REMOTE_INSPECTOR)
461     bool allowsRemoteInspection() const { return m_allowsRemoteInspection; }
462     void setAllowsRemoteInspection(bool);
463 #endif
464
465 #if ENABLE(VIBRATION)
466     WebVibrationProxy* vibration() { return m_vibration.get(); }
467 #endif
468
469 #if ENABLE(FULLSCREEN_API)
470     WebFullScreenManagerProxy* fullScreenManager();
471 #endif
472 #if PLATFORM(IOS)
473     RefPtr<WebVideoFullscreenManagerProxy> videoFullscreenManager();
474 #endif
475
476 #if ENABLE(CONTEXT_MENUS)
477     void initializeContextMenuClient(const WKPageContextMenuClientBase*);
478 #endif
479     void initializeFindClient(const WKPageFindClientBase*);
480     void initializeFindMatchesClient(const WKPageFindMatchesClientBase*);
481     void initializeFormClient(const WKPageFormClientBase*);
482     void setLoaderClient(std::unique_ptr<API::LoaderClient>);
483     void setPolicyClient(std::unique_ptr<API::PolicyClient>);
484
485     API::UIClient& uiClient() { return *m_uiClient; }
486     void setUIClient(std::unique_ptr<API::UIClient>);
487 #if PLATFORM(EFL)
488     void initializeUIPopupMenuClient(const WKPageUIPopupMenuClientBase*);
489 #endif
490
491     void initializeWebPage();
492
493     void close();
494     bool tryClose();
495     bool isClosed() const { return m_isClosed; }
496
497     uint64_t loadRequest(const WebCore::ResourceRequest&, API::Object* userData = nullptr);
498     void loadFile(const String& fileURL, const String& resourceDirectoryURL, API::Object* userData = nullptr);
499     void loadData(API::Data*, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData = nullptr);
500     void loadHTMLString(const String& htmlString, const String& baseURL, API::Object* userData = nullptr);
501     void loadAlternateHTMLString(const String& htmlString, const String& baseURL, const String& unreachableURL, API::Object* userData = nullptr);
502     void loadPlainTextString(const String&, API::Object* userData = nullptr);
503     void loadWebArchiveData(API::Data*, API::Object* userData = nullptr);
504
505     void stopLoading();
506     void reload(bool reloadFromOrigin);
507
508     void goForward();
509     void goBack();
510
511     void goToBackForwardItem(WebBackForwardListItem*);
512     void tryRestoreScrollPosition();
513     void didChangeBackForwardList(WebBackForwardListItem* addedItem, Vector<RefPtr<WebBackForwardListItem>> removed);
514     void willGoToBackForwardListItem(uint64_t itemID, IPC::MessageDecoder&);
515
516     bool willHandleHorizontalScrollEvents() const;
517
518     bool canShowMIMEType(const String& mimeType);
519
520     bool drawsBackground() const { return m_drawsBackground; }
521     void setDrawsBackground(bool);
522
523     bool drawsTransparentBackground() const { return m_drawsTransparentBackground; }
524     void setDrawsTransparentBackground(bool);
525
526     WebCore::Color underlayColor() const { return m_underlayColor; }
527     void setUnderlayColor(const WebCore::Color&);
528
529     // At this time, m_pageExtendedBackgroundColor can be set via pageExtendedBackgroundColorDidChange() which is a message
530     // from the UIProcess, or by didCommitLayerTree(). When PLATFORM(MAC) adopts UI side compositing, we should get rid of
531     // the message entirely.
532     WebCore::Color pageExtendedBackgroundColor() const { return m_pageExtendedBackgroundColor; }
533
534     void viewWillStartLiveResize();
535     void viewWillEndLiveResize();
536
537     void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&);
538     void setWindowResizerSize(const WebCore::IntSize&);
539     
540     void clearSelection();
541
542     void setViewNeedsDisplay(const WebCore::IntRect&);
543     void displayView();
544     bool canScrollView();
545     void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
546     
547     void setDelegatesScrolling(bool delegatesScrolling) { m_delegatesScrolling = delegatesScrolling; }
548     bool delegatesScrolling() const { return m_delegatesScrolling; }
549
550     enum class WantsReplyOrNot { DoesNotWantReply, DoesWantReply };
551     void viewStateDidChange(WebCore::ViewState::Flags mayHaveChanged, WantsReplyOrNot = WantsReplyOrNot::DoesNotWantReply);
552     bool isInWindow() const { return m_viewState & WebCore::ViewState::IsInWindow; }
553     void waitForDidUpdateViewState();
554
555     WebCore::IntSize viewSize() const;
556     bool isViewVisible() const { return m_viewState & WebCore::ViewState::IsVisible; }
557     bool isViewWindowActive() const;
558     bool isProcessSuppressible() const;
559
560     void addMIMETypeWithCustomContentProvider(const String& mimeType);
561
562     void executeEditCommand(const String& commandName);
563     void validateCommand(const String& commandName, PassRefPtr<ValidateCommandCallback>);
564 #if PLATFORM(IOS)
565     double displayedContentScale() const { return m_lastVisibleContentRectUpdate.scale(); }
566     const WebCore::FloatRect& exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedRect(); }
567     const WebCore::FloatRect& unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredRect(); }
568
569     bool updateVisibleContentRects(const VisibleContentRectUpdateInfo&);
570     uint64_t nextVisibleContentRectUpdateID() const { return m_lastVisibleContentRectUpdate.updateID() + 1; }
571     uint64_t lastVisibleContentRectUpdateID() const { return m_lastVisibleContentRectUpdate.updateID(); }
572     
573     void setViewportConfigurationMinimumLayoutSize(const WebCore::IntSize&);
574     void didCommitLayerTree(const WebKit::RemoteLayerTreeTransaction&);
575
576     void selectWithGesture(const WebCore::IntPoint, WebCore::TextGranularity, uint32_t gestureType, uint32_t gestureState, PassRefPtr<GestureCallback>);
577     void updateSelectionWithTouches(const WebCore::IntPoint, uint32_t touches, bool baseIsStart, PassRefPtr<TouchesCallback>);
578     void selectWithTwoTouches(const WebCore::IntPoint from, const WebCore::IntPoint to, uint32_t gestureType, uint32_t gestureState, PassRefPtr<GestureCallback>);
579     void updateBlockSelectionWithTouch(const WebCore::IntPoint, uint32_t touch, uint32_t handlePosition);
580     void extendSelection(WebCore::TextGranularity);
581     void requestAutocorrectionData(const String& textForAutocorrection, PassRefPtr<AutocorrectionDataCallback>);
582     void applyAutocorrection(const String& correction, const String& originalText, PassRefPtr<StringCallback>);
583     bool applyAutocorrection(const String& correction, const String& originalText);
584     void requestAutocorrectionContext(PassRefPtr<AutocorrectionContextCallback>);
585     void getAutocorrectionContext(String& contextBefore, String& markedText, String& selectedText, String& contextAfter, uint64_t& location, uint64_t& length);
586     void didReceivePositionInformation(const InteractionInformationAtPosition&);
587     void getPositionInformation(const WebCore::IntPoint&, InteractionInformationAtPosition&);
588     void requestPositionInformation(const WebCore::IntPoint&);
589     void startInteractionWithElementAtPosition(const WebCore::IntPoint&);
590     void stopInteraction();
591     void performActionOnElement(uint32_t action);
592     void saveImageToLibrary(const SharedMemory::Handle& imageHandle, uint64_t imageSize);
593     void didUpdateBlockSelectionWithTouch(uint32_t touch, uint32_t flags, float growThreshold, float shrinkThreshold);
594     void focusNextAssistedNode(bool isForward);
595     void setAssistedNodeValue(const String&);
596     void setAssistedNodeValueAsNumber(double);
597     void setAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection = false);
598     void applicationWillEnterForeground();
599     void applicationWillResignActive();
600     void applicationDidBecomeActive();
601 #endif
602
603     const EditorState& editorState() const { return m_editorState; }
604     bool canDelete() const { return hasSelectedRange() && isContentEditable(); }
605     bool hasSelectedRange() const { return m_editorState.selectionIsRange; }
606     bool isContentEditable() const { return m_editorState.isContentEditable; }
607     
608     bool maintainsInactiveSelection() const { return m_maintainsInactiveSelection; }
609     void setMaintainsInactiveSelection(bool);
610 #if USE(TILED_BACKING_STORE) 
611     void didRenderFrame(const WebCore::IntSize& contentsSize, const WebCore::IntRect& coveredRect);
612 #endif
613 #if PLATFORM(EFL)
614     void setThemePath(const String&);
615 #endif
616
617 #if PLATFORM(GTK)
618     void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
619     void confirmComposition(const String& compositionString, int64_t selectionStart, int64_t selectionLength);
620     void cancelComposition();
621 #endif
622
623 #if PLATFORM(GTK)
624     void setInputMethodState(bool enabled);
625 #endif
626
627 #if PLATFORM(COCOA)
628     void windowAndViewFramesChanged(const WebCore::FloatRect& viewFrameInWindowCoordinates, const WebCore::FloatPoint& accessibilityViewCoordinates);
629     void setMainFrameIsScrollable(bool);
630
631     void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
632     bool shouldDelayWindowOrderingForEvent(const WebMouseEvent&);
633     bool acceptsFirstMouse(int eventNumber, const WebMouseEvent&);
634
635     void setAcceleratedCompositingRootLayer(LayerOrView*);
636     LayerOrView* acceleratedCompositingRootLayer() const;
637
638     void insertTextAsync(const String& text, const EditingRange& replacementRange);
639     void getMarkedRangeAsync(PassRefPtr<EditingRangeCallback>);
640     void getSelectedRangeAsync(PassRefPtr<EditingRangeCallback>);
641     void characterIndexForPointAsync(const WebCore::IntPoint&, PassRefPtr<UnsignedCallback>);
642     void firstRectForCharacterRangeAsync(const EditingRange&, PassRefPtr<RectForCharacterRangeCallback>);
643     void setCompositionAsync(const String& text, Vector<WebCore::CompositionUnderline> underlines, const EditingRange& selectionRange, const EditingRange& replacementRange);
644     void confirmCompositionAsync();
645
646     void cancelComposition();
647
648 #if PLATFORM(MAC)
649     void insertDictatedTextAsync(const String& text, const EditingRange& replacementRange, const Vector<WebCore::TextAlternativeWithRange>& dictationAlternatives);
650     void attributedSubstringForCharacterRangeAsync(const EditingRange&, PassRefPtr<AttributedStringForCharacterRangeCallback>);
651
652 #if !USE(ASYNC_NSTEXTINPUTCLIENT)
653     bool insertText(const String& text, const EditingRange& replacementRange);
654     void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, const EditingRange& selectionRange, const EditingRange& replacementRange);
655     void confirmComposition();
656     bool insertDictatedText(const String& text, const EditingRange& replacementRange, const Vector<WebCore::TextAlternativeWithRange>& dictationAlternatives);
657     void getAttributedSubstringFromRange(const EditingRange&, AttributedString&);
658     void getMarkedRange(EditingRange&);
659     void getSelectedRange(EditingRange&);
660     uint64_t characterIndexForPoint(const WebCore::IntPoint);
661     WebCore::IntRect firstRectForCharacterRange(const EditingRange&);
662     bool executeKeypressCommands(const Vector<WebCore::KeypressCommand>&);
663 #endif
664
665     WKView* wkView() const;
666     void intrinsicContentSizeDidChange(const WebCore::IntSize& intrinsicContentSize);
667 #endif
668 #endif // PLATFORM(COCOA)
669 #if PLATFORM(EFL)
670     void handleInputMethodKeydown(bool& handled);
671     void confirmComposition(const String&);
672     void setComposition(const String&, Vector<WebCore::CompositionUnderline>&, int);
673     void cancelComposition();
674 #endif
675 #if PLATFORM(GTK)
676     PlatformWidget viewWidget();
677 #endif
678 #if USE(TILED_BACKING_STORE)
679     void commitPageTransitionViewport();
680 #endif
681
682     void handleMouseEvent(const NativeWebMouseEvent&);
683     void handleWheelEvent(const NativeWebWheelEvent&);
684     void handleKeyboardEvent(const NativeWebKeyboardEvent&);
685 #if ENABLE(TOUCH_EVENTS)
686     void handleTouchEvent(const NativeWebTouchEvent&);
687 #endif
688
689     void scrollBy(WebCore::ScrollDirection, WebCore::ScrollGranularity);
690     void centerSelectionInVisibleArea();
691
692     const String& toolTip() const { return m_toolTip; }
693
694     const String& userAgent() const { return m_userAgent; }
695     void setApplicationNameForUserAgent(const String&);
696     const String& applicationNameForUserAgent() const { return m_applicationNameForUserAgent; }
697     void setCustomUserAgent(const String&);
698     const String& customUserAgent() const { return m_customUserAgent; }
699     static String standardUserAgent(const String& applicationName = String());
700
701     bool supportsTextEncoding() const;
702     void setCustomTextEncodingName(const String&);
703     String customTextEncodingName() const { return m_customTextEncodingName; }
704
705     bool areActiveDOMObjectsAndAnimationsSuspended() const { return m_isPageSuspended; }
706     void resumeActiveDOMObjectsAndAnimations();
707     void suspendActiveDOMObjectsAndAnimations();
708
709     double estimatedProgress() const;
710
711     void terminateProcess();
712
713     typedef bool (*WebPageProxySessionStateFilterCallback)(WKPageRef, WKStringRef type, WKTypeRef object, void* context);
714     PassRefPtr<API::Data> sessionStateData(WebPageProxySessionStateFilterCallback, void* context) const;
715     void restoreFromSessionStateData(API::Data*);
716
717     bool supportsTextZoom() const;
718     double textZoomFactor() const { return m_textZoomFactor; }
719     void setTextZoomFactor(double);
720     double pageZoomFactor() const { return m_pageZoomFactor; }
721     void setPageZoomFactor(double);
722     void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
723
724     void scalePage(double scale, const WebCore::IntPoint& origin);
725     double pageScaleFactor() const { return m_pageScaleFactor; }
726
727     float deviceScaleFactor() const;
728     void setIntrinsicDeviceScaleFactor(float);
729     void setCustomDeviceScaleFactor(float);
730     void windowScreenDidChange(PlatformDisplayID);
731
732     void setUseFixedLayout(bool);
733     void setFixedLayoutSize(const WebCore::IntSize&);
734     bool useFixedLayout() const { return m_useFixedLayout; };
735     const WebCore::IntSize& fixedLayoutSize() const { return m_fixedLayoutSize; };
736
737     void listenForLayoutMilestones(WebCore::LayoutMilestones);
738
739     void didUpdateViewState() { m_waitingForDidUpdateViewState = false; }
740
741     bool hasHorizontalScrollbar() const { return m_mainFrameHasHorizontalScrollbar; }
742     bool hasVerticalScrollbar() const { return m_mainFrameHasVerticalScrollbar; }
743
744     void setSuppressScrollbarAnimations(bool);
745     bool areScrollbarAnimationsSuppressed() const { return m_suppressScrollbarAnimations; }
746
747     bool isPinnedToLeftSide() const { return m_mainFrameIsPinnedToLeftSide; }
748     bool isPinnedToRightSide() const { return m_mainFrameIsPinnedToRightSide; }
749     bool isPinnedToTopSide() const { return m_mainFrameIsPinnedToTopSide; }
750     bool isPinnedToBottomSide() const { return m_mainFrameIsPinnedToBottomSide; }
751
752     bool rubberBandsAtLeft() const;
753     void setRubberBandsAtLeft(bool);
754     bool rubberBandsAtRight() const;
755     void setRubberBandsAtRight(bool);
756     bool rubberBandsAtTop() const;
757     void setRubberBandsAtTop(bool);
758     bool rubberBandsAtBottom() const;
759     void setRubberBandsAtBottom(bool);
760
761     void setShouldUseImplicitRubberBandControl(bool shouldUseImplicitRubberBandControl) { m_shouldUseImplicitRubberBandControl = shouldUseImplicitRubberBandControl; }
762     bool shouldUseImplicitRubberBandControl() const { return m_shouldUseImplicitRubberBandControl; }
763
764     void setBackgroundExtendsBeyondPage(bool);
765     bool backgroundExtendsBeyondPage() const;
766
767     void setPaginationMode(WebCore::Pagination::Mode);
768     WebCore::Pagination::Mode paginationMode() const { return m_paginationMode; }
769     void setPaginationBehavesLikeColumns(bool);
770     bool paginationBehavesLikeColumns() const { return m_paginationBehavesLikeColumns; }
771     void setPageLength(double);
772     double pageLength() const { return m_pageLength; }
773     void setGapBetweenPages(double);
774     double gapBetweenPages() const { return m_gapBetweenPages; }
775     unsigned pageCount() const { return m_pageCount; }
776
777 #if PLATFORM(COCOA)
778     // Called by the web process through a message.
779     void registerWebProcessAccessibilityToken(const IPC::DataReference&);
780     // Called by the UI process when it is ready to send its tokens to the web process.
781     void registerUIProcessAccessibilityTokens(const IPC::DataReference& elemenToken, const IPC::DataReference& windowToken);
782     bool readSelectionFromPasteboard(const String& pasteboardName);
783     String stringSelectionForPasteboard();
784     PassRefPtr<WebCore::SharedBuffer> dataSelectionForPasteboard(const String& pasteboardType);
785     void makeFirstResponder();
786
787     ColorSpaceData colorSpace();
788 #endif
789
790     void pageScaleFactorDidChange(double);
791     void pageZoomFactorDidChange(double);
792
793     void setMemoryCacheClientCallsEnabled(bool);
794
795     // Find.
796     void findString(const String&, FindOptions, unsigned maxMatchCount);
797     void findStringMatches(const String&, FindOptions, unsigned maxMatchCount);
798     void getImageForFindMatch(int32_t matchIndex);
799     void selectFindMatch(int32_t matchIndex);
800     void didGetImageForFindMatch(const ShareableBitmap::Handle& contentImageHandle, uint32_t matchIndex);
801     void hideFindUI();
802     void countStringMatches(const String&, FindOptions, unsigned maxMatchCount);
803     void didCountStringMatches(const String&, uint32_t matchCount);
804     void setFindIndicator(const WebCore::FloatRect& selectionRectInWindowCoordinates, const Vector<WebCore::FloatRect>& textRectsInSelectionRectCoordinates, float contentImageScaleFactor, const ShareableBitmap::Handle& contentImageHandle, bool fadeOut, bool animate);
805     void didFindString(const String&, uint32_t matchCount);
806     void didFailToFindString(const String&);
807     void didFindStringMatches(const String&, Vector<Vector<WebCore::IntRect>> matchRects, int32_t firstIndexAfterSelection);
808
809     void getContentsAsString(PassRefPtr<StringCallback>);
810     void getBytecodeProfile(PassRefPtr<StringCallback>);
811
812 #if ENABLE(MHTML)
813     void getContentsAsMHTMLData(PassRefPtr<DataCallback>, bool useBinaryEncoding);
814 #endif
815     void getMainResourceDataOfFrame(WebFrameProxy*, PassRefPtr<DataCallback>);
816     void getResourceDataFromFrame(WebFrameProxy*, API::URL*, PassRefPtr<DataCallback>);
817     void getRenderTreeExternalRepresentation(PassRefPtr<StringCallback>);
818     void getSelectionOrContentsAsString(PassRefPtr<StringCallback>);
819     void getSelectionAsWebArchiveData(PassRefPtr<DataCallback>);
820     void getSourceForFrame(WebFrameProxy*, PassRefPtr<StringCallback>);
821     void getWebArchiveOfFrame(WebFrameProxy*, PassRefPtr<DataCallback>);
822     void runJavaScriptInMainFrame(const String&, PassRefPtr<ScriptValueCallback>);
823     void forceRepaint(PassRefPtr<VoidCallback>);
824
825     float headerHeight(WebFrameProxy*);
826     float footerHeight(WebFrameProxy*);
827     void drawHeader(WebFrameProxy*, const WebCore::FloatRect&);
828     void drawFooter(WebFrameProxy*, const WebCore::FloatRect&);
829
830 #if PLATFORM(COCOA)
831     // Dictionary.
832     void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
833 #endif
834
835     void receivedPolicyDecision(WebCore::PolicyAction, WebFrameProxy*, uint64_t listenerID);
836
837     void backForwardRemovedItem(uint64_t itemID);
838
839 #if ENABLE(DRAG_SUPPORT)    
840     // Drag and drop support.
841     void dragEntered(WebCore::DragData&, const String& dragStorageName = String());
842     void dragUpdated(WebCore::DragData&, const String& dragStorageName = String());
843     void dragExited(WebCore::DragData&, const String& dragStorageName = String());
844     void performDrag(WebCore::DragData&, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
845
846     void didPerformDragControllerAction(WebCore::DragSession);
847     void dragEnded(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t operation);
848 #if PLATFORM(COCOA)
849     void setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, bool isLinkDrag);
850     void setPromisedData(const String& pasteboardName, const SharedMemory::Handle& imageHandle, uint64_t imageSize, const String& filename, const String& extension,
851                          const String& title, const String& url, const String& visibleURL, const SharedMemory::Handle& archiveHandle, uint64_t archiveSize);
852 #endif
853 #if PLATFORM(GTK)
854     void startDrag(const WebCore::DragData&, const ShareableBitmap::Handle& dragImage);
855 #endif
856 #endif
857
858     void processDidBecomeUnresponsive();
859     void interactionOccurredWhileProcessUnresponsive();
860     void processDidBecomeResponsive();
861     void processDidCrash();
862
863     virtual void enterAcceleratedCompositingMode(const LayerTreeContext&);
864     virtual void exitAcceleratedCompositingMode();
865     virtual void updateAcceleratedCompositingMode(const LayerTreeContext&);
866     
867     void didDraw();
868
869     enum UndoOrRedo { Undo, Redo };
870     void addEditCommand(WebEditCommandProxy*);
871     void removeEditCommand(WebEditCommandProxy*);
872     bool isValidEditCommand(WebEditCommandProxy*);
873     void registerEditCommand(PassRefPtr<WebEditCommandProxy>, UndoOrRedo);
874
875 #if PLATFORM(COCOA)
876     void registerKeypressCommandName(const String& name) { m_knownKeypressCommandNames.add(name); }
877     bool isValidKeypressCommandName(const String& name) const { return m_knownKeypressCommandNames.contains(name); }
878 #endif
879
880     WebProcessProxy& process() { return m_process.get(); }
881     PlatformProcessIdentifier processIdentifier() const;
882
883     WebPreferences& preferences() { return m_preferences.get(); }
884     void setPreferences(WebPreferences&);
885
886     WebPageGroup& pageGroup() { return m_pageGroup.get(); }
887
888     bool isValid() const;
889
890     PassRefPtr<API::Array> relatedPages() const;
891
892     const String& urlAtProcessExit() const { return m_urlAtProcessExit; }
893     FrameLoadState::State loadStateAtProcessExit() const { return m_loadStateAtProcessExit; }
894
895 #if ENABLE(DRAG_SUPPORT)
896     WebCore::DragSession dragSession() const { return m_currentDragSession; }
897     void resetDragOperation() { m_currentDragSession = WebCore::DragSession(); }
898 #endif
899
900     void preferencesDidChange();
901
902 #if ENABLE(CONTEXT_MENUS)
903     // Called by the WebContextMenuProxy.
904     void contextMenuItemSelected(const WebContextMenuItemData&);
905 #endif
906
907     // Called by the WebOpenPanelResultListenerProxy.
908     void didChooseFilesForOpenPanel(const Vector<String>&);
909     void didCancelForOpenPanel();
910
911     WebPageCreationParameters creationParameters();
912
913 #if USE(COORDINATED_GRAPHICS)
914     void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize&);
915 #endif
916
917 #if PLATFORM(EFL) || PLATFORM(GTK)
918     void handleDownloadRequest(DownloadProxy*);
919 #endif
920
921     void advanceToNextMisspelling(bool startBeforeSelection);
922     void changeSpellingToWord(const String& word);
923 #if USE(APPKIT)
924     void uppercaseWord();
925     void lowercaseWord();
926     void capitalizeWord();
927 #endif
928
929 #if PLATFORM(COCOA)
930     bool isSmartInsertDeleteEnabled() const { return m_isSmartInsertDeleteEnabled; }
931     void setSmartInsertDeleteEnabled(bool);
932 #endif
933
934 #if PLATFORM(GTK)
935     String accessibilityPlugID() const { return m_accessibilityPlugID; }
936 #endif
937
938     void setCanRunModal(bool);
939     bool canRunModal();
940
941     void beginPrinting(WebFrameProxy*, const PrintInfo&);
942     void endPrinting();
943     void computePagesForPrinting(WebFrameProxy*, const PrintInfo&, PassRefPtr<ComputedPagesCallback>);
944 #if PLATFORM(COCOA)
945     void drawRectToImage(WebFrameProxy*, const PrintInfo&, const WebCore::IntRect&, const WebCore::IntSize&, PassRefPtr<ImageCallback>);
946     void drawPagesToPDF(WebFrameProxy*, const PrintInfo&, uint32_t first, uint32_t count, PassRefPtr<DataCallback>);
947 #elif PLATFORM(GTK)
948     void drawPagesForPrinting(WebFrameProxy*, const PrintInfo&, PassRefPtr<PrintFinishedCallback>);
949 #endif
950
951     PageLoadState& pageLoadState() { return m_pageLoadState; }
952
953 #if PLATFORM(COCOA)
954     void handleAlternativeTextUIResult(const String& result);
955 #endif
956
957     void saveDataToFileInDownloadsFolder(const String& suggestedFilename, const String& mimeType, const String& originatingURLString, API::Data*);
958     void savePDFToFileInDownloadsFolder(const String& suggestedFilename, const String& originatingURLString, const IPC::DataReference&);
959 #if PLATFORM(COCOA)
960     void savePDFToTemporaryFolderAndOpenWithNativeApplicationRaw(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size, const String& pdfUUID);
961     void savePDFToTemporaryFolderAndOpenWithNativeApplication(const String& suggestedFilename, const String& originatingURLString, const IPC::DataReference&, const String& pdfUUID);
962     void openPDFFromTemporaryFolderWithNativeApplication(const String& pdfUUID);
963 #endif
964
965     WebCore::IntRect visibleScrollerThumbRect() const { return m_visibleScrollerThumbRect; }
966
967     uint64_t renderTreeSize() const { return m_renderTreeSize; }
968
969     void setShouldSendEventsSynchronously(bool sync) { m_shouldSendEventsSynchronously = sync; };
970
971     void printMainFrame();
972     
973     void setMediaVolume(float);
974     void setMayStartMediaWhenInWindow(bool);
975     bool mayStartMediaWhenInWindow() const { return m_mayStartMediaWhenInWindow; }
976
977     // WebPopupMenuProxy::Client
978     virtual NativeWebMouseEvent* currentlyProcessedMouseDownEvent();
979
980 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
981     void setAcceleratedCompositingWindowId(uint64_t nativeWindowId);
982 #endif
983
984     void setSuppressVisibilityUpdates(bool flag) { m_suppressVisibilityUpdates = flag; }
985     bool suppressVisibilityUpdates() { return m_suppressVisibilityUpdates; }
986
987 #if PLATFORM(IOS)
988     void willStartUserTriggeredZooming();
989
990     void tapHighlightAtPosition(const WebCore::FloatPoint&, uint64_t& requestID);
991
992     void blurAssistedNode();
993 #endif
994
995     void postMessageToInjectedBundle(const String& messageName, API::Object* messageBody);
996
997 #if ENABLE(INPUT_TYPE_COLOR)
998     void setColorPickerColor(const WebCore::Color&);
999     void endColorPicker();
1000 #endif
1001
1002     WebCore::IntSize minimumLayoutSize() const { return m_minimumLayoutSize; }
1003     void setMinimumLayoutSize(const WebCore::IntSize&);
1004
1005     bool autoSizingShouldExpandToViewHeight() const { return m_autoSizingShouldExpandToViewHeight; }
1006     void setAutoSizingShouldExpandToViewHeight(bool);
1007
1008     void didReceiveAuthenticationChallengeProxy(uint64_t frameID, PassRefPtr<AuthenticationChallengeProxy>);
1009
1010     int64_t spellDocumentTag();
1011     void didFinishCheckingText(uint64_t requestID, const Vector<WebCore::TextCheckingResult>&);
1012     void didCancelCheckingText(uint64_t requestID);
1013
1014     void connectionWillOpen(IPC::Connection*);
1015     void connectionWillClose(IPC::Connection*);
1016
1017     void didSaveToPageCache();
1018         
1019     void setScrollPinningBehavior(WebCore::ScrollPinningBehavior);
1020     WebCore::ScrollPinningBehavior scrollPinningBehavior() { return m_scrollPinningBehavior; }
1021
1022     bool shouldRecordNavigationSnapshots() const { return m_shouldRecordNavigationSnapshots; }
1023     void setShouldRecordNavigationSnapshots(bool shouldRecordSnapshots) { m_shouldRecordNavigationSnapshots = shouldRecordSnapshots; }
1024     void recordNavigationSnapshot();
1025
1026 #if PLATFORM(COCOA)
1027     RetainPtr<CGImageRef> takeViewSnapshot();
1028 #endif
1029
1030 #if ENABLE(SUBTLE_CRYPTO)
1031     void wrapCryptoKey(const Vector<uint8_t>&, bool& succeeded, Vector<uint8_t>&);
1032     void unwrapCryptoKey(const Vector<uint8_t>&, bool& succeeded, Vector<uint8_t>&);
1033 #endif
1034
1035     void setThumbnailScale(double);
1036
1037     void takeSnapshot(WebCore::IntRect, WebCore::IntSize bitmapSize, SnapshotOptions, ImageCallback::CallbackFunction);
1038
1039 #if ENABLE(IMAGE_CONTROLS)
1040     void replaceControlledImage(PassRefPtr<ShareableBitmap>);
1041 #endif
1042
1043 private:
1044     WebPageProxy(PageClient&, WebProcessProxy&, uint64_t pageID, const WebPageConfiguration&);
1045     void platformInitialize();
1046
1047     void updateViewState(WebCore::ViewState::Flags flagsToUpdate = WebCore::ViewState::AllFlags);
1048
1049     void resetState();
1050     void resetStateAfterProcessExited();
1051
1052     void setUserAgent(const String&);
1053
1054     // IPC::MessageReceiver
1055     virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&) override;
1056     virtual void didReceiveSyncMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&) override;
1057
1058     // IPC::MessageSender
1059     virtual bool sendMessage(std::unique_ptr<IPC::MessageEncoder>, unsigned messageSendFlags) override;
1060     virtual IPC::Connection* messageSenderConnection() override;
1061     virtual uint64_t messageSenderDestinationID() override;
1062
1063     // WebPopupMenuProxy::Client
1064     virtual void valueChangedForPopupMenu(WebPopupMenuProxy*, int32_t newSelectedIndex);
1065     virtual void setTextFromItemForPopupMenu(WebPopupMenuProxy*, int32_t index);
1066 #if PLATFORM(GTK)
1067     virtual void failedToShowPopupMenu();
1068 #endif
1069
1070     // Implemented in generated WebPageProxyMessageReceiver.cpp
1071     void didReceiveWebPageProxyMessage(IPC::Connection*, IPC::MessageDecoder&);
1072     void didReceiveSyncWebPageProxyMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&);
1073
1074     void didCreateMainFrame(uint64_t frameID);
1075     void didCreateSubframe(uint64_t frameID);
1076
1077     void didStartProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& url, const String& unreachableURL, IPC::MessageDecoder&);
1078     void didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const String&, IPC::MessageDecoder&);
1079     void didFailProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const WebCore::ResourceError&, IPC::MessageDecoder&);
1080     void didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&, IPC::MessageDecoder&);
1081     void didFinishDocumentLoadForFrame(uint64_t frameID, IPC::MessageDecoder&);
1082     void didFinishLoadForFrame(uint64_t frameID, uint64_t navigationID, IPC::MessageDecoder&);
1083     void didFailLoadForFrame(uint64_t frameID, uint64_t navigationID, const WebCore::ResourceError&, IPC::MessageDecoder&);
1084     void didSameDocumentNavigationForFrame(uint64_t frameID, uint32_t sameDocumentNavigationType, const String&, IPC::MessageDecoder&);
1085     void didReceiveTitleForFrame(uint64_t frameID, const String&, IPC::MessageDecoder&);
1086     void didFirstLayoutForFrame(uint64_t frameID, IPC::MessageDecoder&);
1087     void didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, IPC::MessageDecoder&);
1088     void didLayout(uint32_t layoutMilestones, IPC::MessageDecoder&);
1089     void didRemoveFrameFromHierarchy(uint64_t frameID, IPC::MessageDecoder&);
1090     void didDisplayInsecureContentForFrame(uint64_t frameID, IPC::MessageDecoder&);
1091     void didRunInsecureContentForFrame(uint64_t frameID, IPC::MessageDecoder&);
1092     void didDetectXSSForFrame(uint64_t frameID, IPC::MessageDecoder&);
1093     void frameDidBecomeFrameSet(uint64_t frameID, bool);
1094     void didStartProgress();
1095     void didChangeProgress(double);
1096     void didFinishProgress();
1097
1098     void decidePolicyForNavigationAction(uint64_t frameID, const NavigationActionData&, uint64_t originatingFrameID, const WebCore::ResourceRequest& originalRequest, const WebCore::ResourceRequest&, uint64_t listenerID, IPC::MessageDecoder&, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID);
1099     void decidePolicyForNewWindowAction(uint64_t frameID, const NavigationActionData&, const WebCore::ResourceRequest&, const String& frameName, uint64_t listenerID, IPC::MessageDecoder&);
1100     void decidePolicyForResponse(uint64_t frameID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, uint64_t listenerID, IPC::MessageDecoder&);
1101     void decidePolicyForResponseSync(uint64_t frameID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, uint64_t listenerID, IPC::MessageDecoder&, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID);
1102     void unableToImplementPolicy(uint64_t frameID, const WebCore::ResourceError&, IPC::MessageDecoder&);
1103
1104     void willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const Vector<std::pair<String, String>>& textFieldValues, uint64_t listenerID, IPC::MessageDecoder&);
1105
1106     // UI client
1107     void createNewPage(const WebCore::ResourceRequest&, const WebCore::WindowFeatures&, uint32_t modifiers, int32_t mouseButton, uint64_t& newPageID, WebPageCreationParameters&);
1108     void showPage();
1109     void closePage(bool stopResponsivenessTimer);
1110     void runJavaScriptAlert(uint64_t frameID, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply>);
1111     void runJavaScriptConfirm(uint64_t frameID, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply>);
1112     void runJavaScriptPrompt(uint64_t frameID, const String&, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply>);
1113     void shouldInterruptJavaScript(bool& result);
1114     void setStatusText(const String&);
1115     void mouseDidMoveOverElement(const WebHitTestResult::Data& hitTestResultData, uint32_t modifiers, IPC::MessageDecoder&);
1116 #if ENABLE(NETSCAPE_PLUGIN_API)
1117     void unavailablePluginButtonClicked(uint32_t opaquePluginUnavailabilityReason, const String& mimeType, const String& pluginURLString, const String& pluginsPageURLString, const String& frameURLString, const String& pageURLString);
1118 #endif // ENABLE(NETSCAPE_PLUGIN_API)
1119 #if ENABLE(WEBGL)
1120     void webGLPolicyForURL(const String& url, uint32_t& loadPolicy);
1121     void resolveWebGLPolicyForURL(const String& url, uint32_t& loadPolicy);
1122 #endif // ENABLE(WEBGL)
1123     void setToolbarsAreVisible(bool toolbarsAreVisible);
1124     void getToolbarsAreVisible(bool& toolbarsAreVisible);
1125     void setMenuBarIsVisible(bool menuBarIsVisible);
1126     void getMenuBarIsVisible(bool& menuBarIsVisible);
1127     void setStatusBarIsVisible(bool statusBarIsVisible);
1128     void getStatusBarIsVisible(bool& statusBarIsVisible);
1129     void setIsResizable(bool isResizable);
1130     void getIsResizable(bool& isResizable);
1131     void setWindowFrame(const WebCore::FloatRect&);
1132     void getWindowFrame(WebCore::FloatRect&);
1133     void screenToRootView(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint);
1134     void rootViewToScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);
1135     void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, bool& shouldClose);
1136     void didChangeViewportProperties(const WebCore::ViewportAttributes&);
1137     void pageDidScroll();
1138     void runOpenPanel(uint64_t frameID, const WebCore::FileChooserSettings&);
1139     void printFrame(uint64_t frameID);
1140     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>);
1141     void requestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_t frameID, String originIdentifier);
1142     void runModal();
1143     void notifyScrollerThumbIsVisibleInRect(const WebCore::IntRect&);
1144     void recommendedScrollbarStyleDidChange(int32_t newStyle);
1145     void didChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar);
1146     void didChangeScrollOffsetPinningForMainFrame(bool pinnedToLeftSide, bool pinnedToRightSide, bool pinnedToTopSide, bool pinnedToBottomSide);
1147     void didChangePageCount(unsigned);
1148     void pageExtendedBackgroundColorDidChange(WebCore::Color);
1149 #if ENABLE(NETSCAPE_PLUGIN_API)
1150     void didFailToInitializePlugin(const String& mimeType, const String& frameURLString, const String& pageURLString);
1151     void didBlockInsecurePluginVersion(const String& mimeType, const String& pluginURLString, const String& frameURLString, const String& pageURLString, bool replacementObscured);
1152 #endif // ENABLE(NETSCAPE_PLUGIN_API)
1153     void setCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents) { m_canShortCircuitHorizontalWheelEvents = canShortCircuitHorizontalWheelEvents; }
1154
1155     void reattachToWebProcess();
1156     void reattachToWebProcessWithItem(WebBackForwardListItem*);
1157
1158     void requestNotificationPermission(uint64_t notificationID, const String& originString);
1159     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);
1160     void cancelNotification(uint64_t notificationID);
1161     void clearNotifications(const Vector<uint64_t>& notificationIDs);
1162     void didDestroyNotification(uint64_t notificationID);
1163
1164 #if USE(TILED_BACKING_STORE)
1165     void pageDidRequestScroll(const WebCore::IntPoint&);
1166     void pageTransitionViewportReady();
1167 #endif
1168 #if USE(COORDINATED_GRAPHICS)
1169     void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&);
1170 #endif
1171 #if PLATFORM(EFL)
1172     void didChangeContentSize(const WebCore::IntSize&);
1173 #endif
1174
1175 #if ENABLE(INPUT_TYPE_COLOR)
1176     void showColorPicker(const WebCore::Color& initialColor, const WebCore::IntRect&);
1177     void didChooseColor(const WebCore::Color&);
1178     void didEndColorPicker();
1179 #endif
1180
1181     void editorStateChanged(const EditorState&);
1182
1183     // Back/Forward list management
1184     void backForwardAddItem(uint64_t itemID);
1185     void backForwardGoToItem(uint64_t itemID, SandboxExtension::Handle&);
1186     void backForwardItemAtIndex(int32_t index, uint64_t& itemID);
1187     void backForwardBackListCount(int32_t& count);
1188     void backForwardForwardListCount(int32_t& count);
1189     void backForwardClear();
1190
1191     // Undo management
1192     void registerEditCommandForUndo(uint64_t commandID, uint32_t editAction);
1193     void clearAllEditCommands();
1194     void canUndoRedo(uint32_t action, bool& result);
1195     void executeUndoRedo(uint32_t action, bool& result);
1196
1197     // Keyboard handling
1198 #if PLATFORM(COCOA)
1199     void executeSavedCommandBySelector(const String& selector, bool& handled);
1200 #endif
1201
1202 #if PLATFORM(GTK)
1203     void getEditorCommandsForKeyEvent(const AtomicString&, Vector<String>&);
1204     void bindAccessibilityTree(const String&);
1205 #endif
1206 #if PLATFORM(EFL)
1207     void getEditorCommandsForKeyEvent(Vector<String>&);
1208 #endif
1209
1210     // Popup Menu.
1211     void showPopupMenu(const WebCore::IntRect& rect, uint64_t textDirection, const Vector<WebPopupItem>& items, int32_t selectedIndex, const PlatformPopupMenuData&);
1212     void hidePopupMenu();
1213
1214 #if ENABLE(CONTEXT_MENUS)
1215     // Context Menu.
1216     void showContextMenu(const WebCore::IntPoint& menuLocation, const ContextMenuContextData&, const Vector<WebContextMenuItemData>&, IPC::MessageDecoder&);
1217     void internalShowContextMenu(const WebCore::IntPoint& menuLocation, const ContextMenuContextData&, const Vector<WebContextMenuItemData>&, IPC::MessageDecoder&);
1218 #endif
1219
1220     // Search popup results
1221     void saveRecentSearches(const String&, const Vector<String>&);
1222     void loadRecentSearches(const String&, Vector<String>&);
1223
1224 #if PLATFORM(COCOA)
1225     // Speech.
1226     void getIsSpeaking(bool&);
1227     void speak(const String&);
1228     void stopSpeaking();
1229
1230     // Spotlight.
1231     void searchWithSpotlight(const String&);
1232         
1233     void searchTheWeb(const String&);
1234
1235     // Dictionary.
1236     void didPerformDictionaryLookup(const AttributedString&, const DictionaryPopupInfo&);
1237 #endif
1238
1239     // Spelling and grammar.
1240 #if USE(UNIFIED_TEXT_CHECKING)
1241     void checkTextOfParagraph(const String& text, uint64_t checkingTypes, Vector<WebCore::TextCheckingResult>& results);
1242 #endif
1243     void checkSpellingOfString(const String& text, int32_t& misspellingLocation, int32_t& misspellingLength);
1244     void checkGrammarOfString(const String& text, Vector<WebCore::GrammarDetail>&, int32_t& badGrammarLocation, int32_t& badGrammarLength);
1245     void spellingUIIsShowing(bool&);
1246     void updateSpellingUIWithMisspelledWord(const String& misspelledWord);
1247     void updateSpellingUIWithGrammarString(const String& badGrammarPhrase, const WebCore::GrammarDetail&);
1248     void getGuessesForWord(const String& word, const String& context, Vector<String>& guesses);
1249     void learnWord(const String& word);
1250     void ignoreWord(const String& word);
1251     void requestCheckingOfString(uint64_t requestID, const WebCore::TextCheckingRequestData&);
1252
1253     void setFocus(bool focused);
1254     void takeFocus(uint32_t direction);
1255     void setToolTip(const String&);
1256     void setCursor(const WebCore::Cursor&);
1257     void setCursorHiddenUntilMouseMoves(bool);
1258
1259     void didReceiveEvent(uint32_t opaqueType, bool handled);
1260     void stopResponsivenessTimer();
1261
1262     void voidCallback(uint64_t);
1263     void dataCallback(const IPC::DataReference&, uint64_t);
1264     void imageCallback(const ShareableBitmap::Handle&, uint64_t);
1265     void stringCallback(const String&, uint64_t);
1266     void scriptValueCallback(const IPC::DataReference&, uint64_t);
1267     void computedPagesCallback(const Vector<WebCore::IntRect>&, double totalScaleFactorForPrinting, uint64_t);
1268     void validateCommandCallback(const String&, bool, int, uint64_t);
1269     void unsignedCallback(uint64_t, uint64_t);
1270     void editingRangeCallback(const EditingRange&, uint64_t);
1271     void rectForCharacterRangeCallback(const WebCore::IntRect&, const EditingRange&, uint64_t);
1272 #if PLATFORM(MAC)
1273     void attributedStringForCharacterRangeCallback(const AttributedString&, const EditingRange&, uint64_t);
1274 #endif
1275 #if PLATFORM(IOS)
1276     void gestureCallback(const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t, uint64_t);
1277     void touchesCallback(const WebCore::IntPoint&, uint32_t, uint64_t);
1278     void autocorrectionDataCallback(const Vector<WebCore::FloatRect>&, const String&, float, uint64_t, uint64_t);
1279     void autocorrectionContextCallback(const String&, const String&, const String&, const String&, uint64_t, uint64_t, uint64_t);
1280     void interpretKeyEvent(const EditorState&, bool isCharEvent, bool& handled);
1281 #endif
1282 #if PLATFORM(GTK)
1283     void printFinishedCallback(const WebCore::ResourceError&, uint64_t);
1284 #endif
1285
1286     void focusedFrameChanged(uint64_t frameID);
1287     void frameSetLargestFrameChanged(uint64_t frameID);
1288
1289     void canAuthenticateAgainstProtectionSpaceInFrame(uint64_t frameID, const WebCore::ProtectionSpace&, bool& canAuthenticate);
1290     void didReceiveAuthenticationChallenge(uint64_t frameID, const WebCore::AuthenticationChallenge&, uint64_t challengeID);
1291
1292     void didFinishLoadingDataForCustomContentProvider(const String& suggestedFilename, const IPC::DataReference&);
1293
1294 #if PLATFORM(COCOA)
1295     void pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus);
1296     void setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t complexTextInputState);
1297 #endif
1298
1299     bool maybeInitializeSandboxExtensionHandle(const WebCore::URL&, SandboxExtension::Handle&);
1300
1301 #if PLATFORM(MAC)
1302     void substitutionsPanelIsShowing(bool&);
1303     void showCorrectionPanel(int32_t panelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
1304     void dismissCorrectionPanel(int32_t reason);
1305     void dismissCorrectionPanelSoon(int32_t reason, String& result);
1306     void recordAutocorrectionResponse(int32_t responseType, const String& replacedString, const String& replacementString);
1307
1308 #if USE(DICTATION_ALTERNATIVES)
1309     void showDictationAlternativeUI(const WebCore::FloatRect& boundingBoxOfDictatedText, uint64_t dictationContext);
1310     void removeDictationAlternatives(uint64_t dictationContext);
1311     void dictationAlternatives(uint64_t dictationContext, Vector<String>& result);
1312 #endif
1313 #endif // PLATFORM(MAC)
1314
1315 #if PLATFORM(IOS)
1316     WebCore::FloatSize viewportScreenSize();
1317
1318     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);
1319
1320     void startAssistingNode(const AssistedNodeInformation&);
1321     void stopAssistingNode();
1322     void notifyRevealedSelection();
1323 #endif // PLATFORM(IOS)
1324
1325 #if USE(SOUP) && !ENABLE(CUSTOM_PROTOCOLS)
1326     void didReceiveURIRequest(String uriString, uint64_t requestID);
1327 #endif
1328
1329     void clearLoadDependentCallbacks();
1330
1331     void performDragControllerAction(DragControllerAction, WebCore::DragData&, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
1332
1333     void updateBackingStoreDiscardableState();
1334
1335     void setRenderTreeSize(uint64_t treeSize) { m_renderTreeSize = treeSize; }
1336
1337 #if PLUGIN_ARCHITECTURE(X11)
1338     void createPluginContainer(uint64_t& windowID);
1339     void windowedPluginGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect, uint64_t windowID);
1340 #endif
1341
1342     void processNextQueuedWheelEvent();
1343     void sendWheelEvent(const WebWheelEvent&);
1344
1345 #if ENABLE(TOUCH_EVENTS)
1346     bool shouldStartTrackingTouchEvents(const WebTouchEvent&) const;
1347 #endif
1348
1349 #if ENABLE(NETSCAPE_PLUGIN_API)
1350     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);
1351 #endif
1352
1353     uint64_t generateNavigationID();
1354
1355     PageClient& m_pageClient;
1356     std::unique_ptr<API::LoaderClient> m_loaderClient;
1357     std::unique_ptr<API::PolicyClient> m_policyClient;
1358     WebFormClient m_formClient;
1359     std::unique_ptr<API::UIClient> m_uiClient;
1360 #if PLATFORM(EFL)
1361     WebUIPopupMenuClient m_uiPopupMenuClient;
1362 #endif
1363     WebFindClient m_findClient;
1364     WebFindMatchesClient m_findMatchesClient;
1365 #if ENABLE(CONTEXT_MENUS)
1366     WebPageContextMenuClient m_contextMenuClient;
1367 #endif
1368
1369     std::unique_ptr<DrawingAreaProxy> m_drawingArea;
1370 #if ENABLE(ASYNC_SCROLLING)
1371     std::unique_ptr<RemoteScrollingCoordinatorProxy> m_scrollingCoordinatorProxy;
1372 #endif
1373
1374     Ref<WebProcessProxy> m_process;
1375     Ref<WebPageGroup> m_pageGroup;
1376     Ref<WebPreferences> m_preferences;
1377     Ref<VisitedLinkProvider> m_visitedLinkProvider;
1378
1379     RefPtr<WebFrameProxy> m_mainFrame;
1380     RefPtr<WebFrameProxy> m_focusedFrame;
1381     RefPtr<WebFrameProxy> m_frameSetLargestFrame;
1382
1383     String m_userAgent;
1384     String m_applicationNameForUserAgent;
1385     String m_customUserAgent;
1386     String m_customTextEncodingName;
1387
1388 #if ENABLE(INSPECTOR)
1389     RefPtr<WebInspectorProxy> m_inspector;
1390 #endif
1391
1392 #if ENABLE(FULLSCREEN_API)
1393     RefPtr<WebFullScreenManagerProxy> m_fullScreenManager;
1394 #endif
1395 #if PLATFORM(IOS)
1396     RefPtr<WebVideoFullscreenManagerProxy> m_videoFullscreenManager;
1397     VisibleContentRectUpdateInfo m_lastVisibleContentRectUpdate;
1398 #endif
1399
1400 #if ENABLE(VIBRATION)
1401     RefPtr<WebVibrationProxy> m_vibration;
1402 #endif
1403
1404     HashMap<uint64_t, RefPtr<VoidCallback>> m_voidCallbacks;
1405     HashMap<uint64_t, RefPtr<DataCallback>> m_dataCallbacks;
1406     HashMap<uint64_t, RefPtr<ImageCallback>> m_imageCallbacks;
1407     HashMap<uint64_t, RefPtr<StringCallback>> m_stringCallbacks;
1408     HashSet<uint64_t> m_loadDependentStringCallbackIDs;
1409     HashMap<uint64_t, RefPtr<ScriptValueCallback>> m_scriptValueCallbacks;
1410     HashMap<uint64_t, RefPtr<ComputedPagesCallback>> m_computedPagesCallbacks;
1411     HashMap<uint64_t, RefPtr<ValidateCommandCallback>> m_validateCommandCallbacks;
1412     HashMap<uint64_t, RefPtr<UnsignedCallback>> m_unsignedCallbacks;
1413     HashMap<uint64_t, RefPtr<EditingRangeCallback>> m_editingRangeCallbacks;
1414     HashMap<uint64_t, RefPtr<RectForCharacterRangeCallback>> m_rectForCharacterRangeCallbacks;
1415 #if PLATFORM(MAC)
1416     HashMap<uint64_t, RefPtr<AttributedStringForCharacterRangeCallback>> m_attributedStringForCharacterRangeCallbacks;
1417 #endif
1418 #if PLATFORM(IOS)
1419     HashMap<uint64_t, RefPtr<GestureCallback>> m_gestureCallbacks;
1420     HashMap<uint64_t, RefPtr<TouchesCallback>> m_touchesCallbacks;
1421     HashMap<uint64_t, RefPtr<AutocorrectionDataCallback>> m_autocorrectionCallbacks;
1422     HashMap<uint64_t, RefPtr<AutocorrectionContextCallback>> m_autocorrectionContextCallbacks;
1423 #endif
1424 #if PLATFORM(GTK)
1425     HashMap<uint64_t, RefPtr<PrintFinishedCallback>> m_printFinishedCallbacks;
1426 #endif
1427
1428     HashSet<WebEditCommandProxy*> m_editCommandSet;
1429
1430 #if PLATFORM(COCOA)
1431     HashSet<String> m_knownKeypressCommandNames;
1432 #endif
1433
1434     RefPtr<WebPopupMenuProxy> m_activePopupMenu;
1435 #if ENABLE(CONTEXT_MENUS)
1436     RefPtr<WebContextMenuProxy> m_activeContextMenu;
1437     ContextMenuContextData m_activeContextMenuContextData;
1438 #endif
1439     RefPtr<WebOpenPanelResultListenerProxy> m_openPanelResultListener;
1440     GeolocationPermissionRequestManagerProxy m_geolocationPermissionRequestManager;
1441     NotificationPermissionRequestManagerProxy m_notificationPermissionRequestManager;
1442
1443     WebCore::ViewState::Flags m_viewState;
1444
1445     bool m_canGoBack;
1446     bool m_canGoForward;
1447     Ref<WebBackForwardList> m_backForwardList;
1448     
1449     bool m_maintainsInactiveSelection;
1450
1451     String m_toolTip;
1452
1453     String m_urlAtProcessExit;
1454     FrameLoadState::State m_loadStateAtProcessExit;
1455
1456     EditorState m_editorState;
1457     bool m_temporarilyClosedComposition; // Editor state changed from hasComposition to !hasComposition, but that was only with shouldIgnoreCompositionSelectionChange yet.
1458
1459     double m_textZoomFactor;
1460     double m_pageZoomFactor;
1461     double m_pageScaleFactor;
1462     float m_intrinsicDeviceScaleFactor;
1463     float m_customDeviceScaleFactor;
1464
1465     LayerHostingMode m_layerHostingMode;
1466
1467     bool m_drawsBackground;
1468     bool m_drawsTransparentBackground;
1469
1470     WebCore::Color m_underlayColor;
1471     WebCore::Color m_pageExtendedBackgroundColor;
1472
1473     bool m_areMemoryCacheClientCallsEnabled;
1474
1475     bool m_useFixedLayout;
1476     WebCore::IntSize m_fixedLayoutSize;
1477
1478     bool m_suppressScrollbarAnimations;
1479
1480     WebCore::Pagination::Mode m_paginationMode;
1481     bool m_paginationBehavesLikeColumns;
1482     double m_pageLength;
1483     double m_gapBetweenPages;
1484
1485     // If the process backing the web page is alive and kicking.
1486     bool m_isValid;
1487
1488     // Whether WebPageProxy::close() has been called on this page.
1489     bool m_isClosed;
1490
1491     // Whether it can run modal child web pages.
1492     bool m_canRunModal;
1493
1494     bool m_isInPrintingMode;
1495     bool m_isPerformingDOMPrintOperation;
1496
1497     bool m_inDecidePolicyForResponseSync;
1498     const WebCore::ResourceRequest* m_decidePolicyForResponseRequest;
1499     bool m_syncMimeTypePolicyActionIsValid;
1500     WebCore::PolicyAction m_syncMimeTypePolicyAction;
1501     uint64_t m_syncMimeTypePolicyDownloadID;
1502
1503     bool m_inDecidePolicyForNavigationAction;
1504     bool m_syncNavigationActionPolicyActionIsValid;
1505     WebCore::PolicyAction m_syncNavigationActionPolicyAction;
1506     uint64_t m_syncNavigationActionPolicyDownloadID;
1507
1508     Deque<NativeWebKeyboardEvent> m_keyEventQueue;
1509     Deque<NativeWebWheelEvent> m_wheelEventQueue;
1510     Deque<OwnPtr<Vector<NativeWebWheelEvent>>> m_currentlyProcessedWheelEvents;
1511
1512     bool m_processingMouseMoveEvent;
1513     OwnPtr<NativeWebMouseEvent> m_nextMouseMoveEvent;
1514     OwnPtr<NativeWebMouseEvent> m_currentlyProcessedMouseDownEvent;
1515
1516 #if ENABLE(TOUCH_EVENTS)
1517     bool m_isTrackingTouchEvents;
1518     Deque<QueuedTouchEvents> m_touchEventQueue;
1519 #endif
1520 #if ENABLE(INPUT_TYPE_COLOR)
1521     RefPtr<WebColorPicker> m_colorPicker;
1522 #endif
1523
1524     uint64_t m_pageID;
1525     Ref<API::Session> m_session;
1526
1527     bool m_isPageSuspended;
1528
1529 #if ENABLE(REMOTE_INSPECTOR)
1530     bool m_allowsRemoteInspection;
1531 #endif
1532
1533 #if PLATFORM(COCOA)
1534     bool m_isSmartInsertDeleteEnabled;
1535 #endif
1536
1537 #if PLATFORM(GTK)
1538     String m_accessibilityPlugID;
1539 #endif
1540
1541     int64_t m_spellDocumentTag;
1542     bool m_hasSpellDocumentTag;
1543     unsigned m_pendingLearnOrIgnoreWordMessageCount;
1544
1545     bool m_mainFrameHasCustomContentProvider;
1546
1547 #if ENABLE(DRAG_SUPPORT)
1548     WebCore::DragSession m_currentDragSession;
1549 #endif
1550
1551     PageLoadState m_pageLoadState;
1552     
1553     bool m_delegatesScrolling;
1554
1555     bool m_mainFrameHasHorizontalScrollbar;
1556     bool m_mainFrameHasVerticalScrollbar;
1557
1558     // Whether horizontal wheel events can be handled directly for swiping purposes.
1559     bool m_canShortCircuitHorizontalWheelEvents;
1560
1561     bool m_mainFrameIsPinnedToLeftSide;
1562     bool m_mainFrameIsPinnedToRightSide;
1563     bool m_mainFrameIsPinnedToTopSide;
1564     bool m_mainFrameIsPinnedToBottomSide;
1565
1566     bool m_shouldUseImplicitRubberBandControl;
1567     bool m_rubberBandsAtLeft;
1568     bool m_rubberBandsAtRight;
1569     bool m_rubberBandsAtTop;
1570     bool m_rubberBandsAtBottom;
1571
1572     bool m_backgroundExtendsBeyondPage;
1573
1574     bool m_shouldRecordNavigationSnapshots;
1575
1576     unsigned m_pageCount;
1577
1578     WebCore::IntRect m_visibleScrollerThumbRect;
1579
1580     uint64_t m_renderTreeSize;
1581
1582     bool m_shouldSendEventsSynchronously;
1583
1584     bool m_suppressVisibilityUpdates;
1585     bool m_autoSizingShouldExpandToViewHeight;
1586     WebCore::IntSize m_minimumLayoutSize;
1587
1588     float m_mediaVolume;
1589     bool m_mayStartMediaWhenInWindow;
1590
1591     bool m_waitingForDidUpdateViewState;
1592
1593 #if PLATFORM(COCOA)
1594     HashMap<String, String> m_temporaryPDFFiles;
1595 #endif
1596         
1597     WebCore::ScrollPinningBehavior m_scrollPinningBehavior;
1598
1599     uint64_t m_navigationID;
1600 };
1601
1602 } // namespace WebKit
1603
1604 #endif // WebPageProxy_h