[Qt][WK2] Implement custom URL schemes defined in QML.
[WebKit-https.git] / Source / WebKit2 / UIProcess / WebPageProxy.h
1 /*
2  * Copyright (C) 2010, 2011 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 "Connection.h"
31 #include "ContextMenuState.h"
32 #include "DragControllerAction.h"
33 #include "DrawingAreaProxy.h"
34 #include "EditorState.h"
35 #include "GeolocationPermissionRequestManagerProxy.h"
36 #if ENABLE(TOUCH_EVENTS)
37 #include "NativeWebTouchEvent.h"
38 #endif
39 #if PLATFORM(QT)
40 #include "QtNetworkRequestData.h"
41 #endif
42 #include "NotificationPermissionRequestManagerProxy.h"
43 #include "PlatformProcessIdentifier.h"
44 #include "SandboxExtension.h"
45 #include "ShareableBitmap.h"
46 #include "WKBase.h"
47 #include "WKPagePrivate.h"
48 #include "WebContextMenuItemData.h"
49 #include "WebFindClient.h"
50 #include "WebFormClient.h"
51 #include "WebFrameProxy.h"
52 #include "WebHistoryClient.h"
53 #include "WebHitTestResult.h"
54 #include "WebLoaderClient.h"
55 #include "WebPageContextMenuClient.h"
56 #include "WebPolicyClient.h"
57 #include "WebPopupMenuProxy.h"
58 #include "WebResourceLoadClient.h"
59 #include "WebUIClient.h"
60 #include <WebCore/DragActions.h>
61 #include <WebCore/DragSession.h>
62 #include <WebCore/HitTestResult.h>
63 #include <WebCore/Page.h>
64 #include <WebCore/PlatformScreen.h>
65 #include <WebCore/ScrollTypes.h>
66 #include <WebCore/TextChecking.h>
67 #include <wtf/HashMap.h>
68 #include <wtf/HashSet.h>
69 #include <wtf/OwnPtr.h>
70 #include <wtf/PassOwnPtr.h>
71 #include <wtf/PassRefPtr.h>
72 #include <wtf/RefPtr.h>
73 #include <wtf/Vector.h>
74 #include <wtf/text/WTFString.h>
75 #if PLATFORM(EFL)
76 #include <Evas.h>
77 #endif
78
79 namespace CoreIPC {
80     class ArgumentDecoder;
81     class Connection;
82     class MessageID;
83 }
84
85 namespace WebCore {
86     class AuthenticationChallenge;
87     class Cursor;
88     class DragData;
89     class FloatRect;
90     class IntSize;
91     class ProtectionSpace;
92     struct FileChooserSettings;
93     struct TextCheckingResult;
94     struct ViewportArguments;
95     struct WindowFeatures;
96 }
97
98 #if PLATFORM(QT)
99 class QQuickNetworkReply;
100 #endif
101
102 #if PLATFORM(MAC)
103 #ifdef __OBJC__
104 @class WKView;
105 #else
106 class WKView;
107 #endif
108 #endif
109
110 namespace WebKit {
111
112 class NativeWebKeyboardEvent;
113 class NativeWebMouseEvent;
114 class NativeWebWheelEvent;
115 class PageClient;
116 class PlatformCertificateInfo;
117 class StringPairVector;
118 class WebBackForwardList;
119 class WebBackForwardListItem;
120 class WebContextMenuProxy;
121 class WebData;
122 class WebEditCommandProxy;
123 class WebFullScreenManagerProxy;
124 class WebKeyboardEvent;
125 class WebMouseEvent;
126 class WebOpenPanelResultListenerProxy;
127 class WebPageGroup;
128 class WebProcessProxy;
129 class WebURLRequest;
130 class WebWheelEvent;
131 struct AttributedString;
132 struct DictionaryPopupInfo;
133 struct EditorState;
134 struct PlatformPopupMenuData;
135 struct PrintInfo;
136 struct WebPageCreationParameters;
137 struct WebPopupItem;
138
139 #if PLATFORM(WIN)
140 struct WindowGeometry;
141 #endif
142
143 #if ENABLE(GESTURE_EVENTS)
144 class WebGestureEvent;
145 #endif
146
147 typedef GenericCallback<WKStringRef, StringImpl*> StringCallback;
148 typedef GenericCallback<WKSerializedScriptValueRef, WebSerializedScriptValue*> ScriptValueCallback;
149
150 #if ENABLE(TOUCH_EVENTS)
151 struct QueuedTouchEvents {
152     QueuedTouchEvents(const NativeWebTouchEvent& event)
153         : forwardedEvent(event)
154     {
155     }
156     NativeWebTouchEvent forwardedEvent;
157     Vector<NativeWebTouchEvent> deferredTouchEvents;
158 };
159 #endif
160
161 // FIXME: Make a version of CallbackBase with three arguments, and define ValidateCommandCallback as a specialization.
162 class ValidateCommandCallback : public CallbackBase {
163 public:
164     typedef void (*CallbackFunction)(WKStringRef, bool, int32_t, WKErrorRef, void*);
165
166     static PassRefPtr<ValidateCommandCallback> create(void* context, CallbackFunction callback)
167     {
168         return adoptRef(new ValidateCommandCallback(context, callback));
169     }
170
171     virtual ~ValidateCommandCallback()
172     {
173         ASSERT(!m_callback);
174     }
175
176     void performCallbackWithReturnValue(StringImpl* returnValue1, bool returnValue2, int returnValue3)
177     {
178         ASSERT(m_callback);
179
180         m_callback(toAPI(returnValue1), returnValue2, returnValue3, 0, context());
181
182         m_callback = 0;
183     }
184     
185     void invalidate()
186     {
187         ASSERT(m_callback);
188
189         RefPtr<WebError> error = WebError::create();
190         m_callback(0, 0, 0, toAPI(error.get()), context());
191         
192         m_callback = 0;
193     }
194
195 private:
196
197     ValidateCommandCallback(void* context, CallbackFunction callback)
198         : CallbackBase(context)
199         , m_callback(callback)
200     {
201     }
202
203     CallbackFunction m_callback;
204 };
205
206 class WebPageProxy : public APIObject, public WebPopupMenuProxy::Client {
207 public:
208     static const Type APIType = TypePage;
209
210     static PassRefPtr<WebPageProxy> create(PageClient*, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID);
211     virtual ~WebPageProxy();
212
213     uint64_t pageID() const { return m_pageID; }
214
215     WebFrameProxy* mainFrame() const { return m_mainFrame.get(); }
216     WebFrameProxy* focusedFrame() const { return m_focusedFrame.get(); }
217     WebFrameProxy* frameSetLargestFrame() const { return m_frameSetLargestFrame.get(); }
218
219     DrawingAreaProxy* drawingArea() const { return m_drawingArea.get(); }
220
221     WebBackForwardList* backForwardList() const { return m_backForwardList.get(); }
222
223 #if ENABLE(INSPECTOR)
224     WebInspectorProxy* inspector();
225 #endif
226
227 #if ENABLE(FULLSCREEN_API)
228     WebFullScreenManagerProxy* fullScreenManager();
229 #endif
230
231     void initializeContextMenuClient(const WKPageContextMenuClient*);
232     void initializeFindClient(const WKPageFindClient*);
233     void initializeFormClient(const WKPageFormClient*);
234     void initializeLoaderClient(const WKPageLoaderClient*);
235     void initializePolicyClient(const WKPagePolicyClient*);
236     void initializeResourceLoadClient(const WKPageResourceLoadClient*);
237     void initializeUIClient(const WKPageUIClient*);
238
239     void initializeWebPage();
240
241     void close();
242     bool tryClose();
243     bool isClosed() const { return m_isClosed; }
244
245     void loadURL(const String&);
246     void loadURLRequest(WebURLRequest*);
247     void loadHTMLString(const String& htmlString, const String& baseURL);
248     void loadAlternateHTMLString(const String& htmlString, const String& baseURL, const String& unreachableURL);
249     void loadPlainTextString(const String& string);
250
251     void stopLoading();
252     void reload(bool reloadFromOrigin);
253
254     void goForward();
255     bool canGoForward() const;
256     void goBack();
257     bool canGoBack() const;
258
259     void goToBackForwardItem(WebBackForwardListItem*);
260     void tryRestoreScrollPosition();
261     void didChangeBackForwardList(WebBackForwardListItem* addedItem, Vector<RefPtr<APIObject> >* removedItems);
262     void shouldGoToBackForwardListItem(uint64_t itemID, bool& shouldGoToBackForwardListItem);
263
264     String activeURL() const;
265     String provisionalURL() const;
266     String committedURL() const;
267
268     bool willHandleHorizontalScrollEvents() const;
269
270     bool canShowMIMEType(const String& mimeType) const;
271
272     bool drawsBackground() const { return m_drawsBackground; }
273     void setDrawsBackground(bool);
274
275     bool drawsTransparentBackground() const { return m_drawsTransparentBackground; }
276     void setDrawsTransparentBackground(bool);
277
278     void viewWillStartLiveResize();
279     void viewWillEndLiveResize();
280
281     void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&);
282     void setWindowResizerSize(const WebCore::IntSize&);
283     
284     void clearSelection();
285
286     void setViewNeedsDisplay(const WebCore::IntRect&);
287     void displayView();
288     void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
289
290     enum {
291         ViewWindowIsActive = 1 << 0,
292         ViewIsFocused = 1 << 1,
293         ViewIsVisible = 1 << 2,
294         ViewIsInWindow = 1 << 3,
295     };
296     typedef unsigned ViewStateFlags;
297     void viewStateDidChange(ViewStateFlags flags);
298
299     WebCore::IntSize viewSize() const;
300     bool isViewVisible() const { return m_isVisible; }
301     bool isViewWindowActive() const;
302
303     void executeEditCommand(const String& commandName);
304     void validateCommand(const String& commandName, PassRefPtr<ValidateCommandCallback>);
305
306     const EditorState& editorState() const { return m_editorState; }
307     bool canDelete() const { return hasSelectedRange() && isContentEditable(); }
308     bool hasSelectedRange() const { return m_editorState.selectionIsRange; }
309     bool isContentEditable() const { return m_editorState.isContentEditable; }
310     
311     bool maintainsInactiveSelection() const { return m_maintainsInactiveSelection; }
312     void setMaintainsInactiveSelection(bool);
313 #if PLATFORM(QT)
314     void registerApplicationScheme(const String& scheme);
315     void resolveApplicationSchemeRequest(QtNetworkRequestData);
316     void sendApplicationSchemeReply(const QQuickNetworkReply*);
317 #endif
318
319 #if PLATFORM(QT)
320     void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
321     void confirmComposition(const String& compositionString, int64_t selectionStart, int64_t selectionLength);
322     void cancelComposition();
323 #endif
324 #if PLATFORM(MAC)
325     void updateWindowIsVisible(bool windowIsVisible);
326     void windowAndViewFramesChanged(const WebCore::IntRect& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates, const WebCore::IntPoint& accessibilityViewCoordinates);
327
328     void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
329     void confirmComposition();
330     void cancelComposition();
331     bool insertText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
332     void getMarkedRange(uint64_t& location, uint64_t& length);
333     void getSelectedRange(uint64_t& location, uint64_t& length);
334     void getAttributedSubstringFromRange(uint64_t location, uint64_t length, AttributedString&);
335     uint64_t characterIndexForPoint(const WebCore::IntPoint);
336     WebCore::IntRect firstRectForCharacterRange(uint64_t, uint64_t);
337     bool executeKeypressCommands(const Vector<WebCore::KeypressCommand>&);
338
339     void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
340     CGContextRef containingWindowGraphicsContext();
341     bool shouldDelayWindowOrderingForEvent(const WebMouseEvent&);
342     bool acceptsFirstMouse(int eventNumber, const WebMouseEvent&);
343     
344     WKView* wkView() const;
345 #endif
346 #if PLATFORM(WIN)
347     void didChangeCompositionSelection(bool);
348     void confirmComposition(const String&);
349     void setComposition(const String&, Vector<WebCore::CompositionUnderline>&, int);
350     WebCore::IntRect firstRectForCharacterInSelectedRange(int);
351     String getSelectedText();
352
353     bool gestureWillBegin(const WebCore::IntPoint&);
354     void gestureDidScroll(const WebCore::IntSize&);
355     void gestureDidEnd();
356
357     void setGestureReachedScrollingLimit(bool);
358
359     HWND nativeWindow() const;
360 #endif
361 #if PLATFORM(GTK)
362     GtkWidget* viewWidget();
363 #endif
364 #if PLATFORM(EFL)
365     Evas_Object* viewObject();
366 #endif
367 #if USE(TILED_BACKING_STORE)
368     void setFixedVisibleContentRect(const WebCore::IntRect&);
369     void setViewportSize(const WebCore::IntSize&);
370 #endif
371
372     void handleMouseEvent(const NativeWebMouseEvent&);
373     void handleWheelEvent(const NativeWebWheelEvent&);
374     void handleKeyboardEvent(const NativeWebKeyboardEvent&);
375 #if ENABLE(GESTURE_EVENTS)
376     void handleGestureEvent(const WebGestureEvent&);
377 #endif
378 #if ENABLE(TOUCH_EVENTS)
379     void handleTouchEvent(const NativeWebTouchEvent&);
380 #endif
381
382     void scrollBy(WebCore::ScrollDirection, WebCore::ScrollGranularity);
383     void centerSelectionInVisibleArea();
384
385     String pageTitle() const;
386     const String& toolTip() const { return m_toolTip; }
387
388     void setUserAgent(const String&);
389     const String& userAgent() const { return m_userAgent; }
390     void setApplicationNameForUserAgent(const String&);
391     const String& applicationNameForUserAgent() const { return m_applicationNameForUserAgent; }
392     void setCustomUserAgent(const String&);
393     const String& customUserAgent() const { return m_customUserAgent; }
394     static String standardUserAgent(const String& applicationName = String());
395
396     bool supportsTextEncoding() const;
397     void setCustomTextEncodingName(const String&);
398     String customTextEncodingName() const { return m_customTextEncodingName; }
399
400     double estimatedProgress() const;
401
402     void terminateProcess();
403
404     typedef bool (*WebPageProxySessionStateFilterCallback)(WKPageRef, WKStringRef type, WKTypeRef object, void* context);
405     PassRefPtr<WebData> sessionStateData(WebPageProxySessionStateFilterCallback, void* context) const;
406     void restoreFromSessionStateData(WebData*);
407
408     bool supportsTextZoom() const;
409     double textZoomFactor() const { return m_mainFrameHasCustomRepresentation ? 1 : m_textZoomFactor; }
410     void setTextZoomFactor(double);
411     double pageZoomFactor() const;
412     void setPageZoomFactor(double);
413     void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
414
415     void scalePage(double scale, const WebCore::IntPoint& origin);
416     double pageScaleFactor() const { return m_pageScaleFactor; }
417
418     float deviceScaleFactor() const;
419     void setIntrinsicDeviceScaleFactor(float);
420     void setCustomDeviceScaleFactor(float);
421     void windowScreenDidChange(PlatformDisplayID);
422     
423     void setUseFixedLayout(bool);
424     void setFixedLayoutSize(const WebCore::IntSize&);
425     bool useFixedLayout() const { return m_useFixedLayout; };
426     const WebCore::IntSize& fixedLayoutSize() const { return m_fixedLayoutSize; };
427
428     bool hasHorizontalScrollbar() const { return m_mainFrameHasHorizontalScrollbar; }
429     bool hasVerticalScrollbar() const { return m_mainFrameHasVerticalScrollbar; }
430
431     bool isPinnedToLeftSide() const { return m_mainFrameIsPinnedToLeftSide; }
432     bool isPinnedToRightSide() const { return m_mainFrameIsPinnedToRightSide; }
433
434     void setPaginationMode(WebCore::Page::Pagination::Mode);
435     WebCore::Page::Pagination::Mode paginationMode() const { return m_paginationMode; }
436     void setPageLength(double);
437     double pageLength() const { return m_pageLength; }
438     void setGapBetweenPages(double);
439     double gapBetweenPages() const { return m_gapBetweenPages; }
440     unsigned pageCount() const { return m_pageCount; }
441
442 #if PLATFORM(MAC)
443     // Called by the web process through a message.
444     void registerWebProcessAccessibilityToken(const CoreIPC::DataReference&);
445     // Called by the UI process when it is ready to send its tokens to the web process.
446     void registerUIProcessAccessibilityTokens(const CoreIPC::DataReference& elemenToken, const CoreIPC::DataReference& windowToken);
447     bool writeSelectionToPasteboard(const String& pasteboardName, const Vector<String>& pasteboardTypes);
448     bool readSelectionFromPasteboard(const String& pasteboardName);
449     void makeFirstResponder();
450 #endif
451
452     void pageScaleFactorDidChange(double);
453
454     void setMemoryCacheClientCallsEnabled(bool);
455
456     // Find.
457     void findString(const String&, FindOptions, unsigned maxMatchCount);
458     void hideFindUI();
459     void countStringMatches(const String&, FindOptions, unsigned maxMatchCount);
460     void didCountStringMatches(const String&, uint32_t matchCount);
461     void setFindIndicator(const WebCore::FloatRect& selectionRectInWindowCoordinates, const Vector<WebCore::FloatRect>& textRectsInSelectionRectCoordinates, float contentImageScaleFactor, const ShareableBitmap::Handle& contentImageHandle, bool fadeOut, bool animate);
462     void didFindString(const String&, uint32_t matchCount);
463     void didFailToFindString(const String&);
464 #if PLATFORM(WIN)
465     void didInstallOrUninstallPageOverlay(bool);
466 #endif
467
468     void getContentsAsString(PassRefPtr<StringCallback>);
469     void getMainResourceDataOfFrame(WebFrameProxy*, PassRefPtr<DataCallback>);
470     void getResourceDataFromFrame(WebFrameProxy*, WebURL*, PassRefPtr<DataCallback>);
471     void getRenderTreeExternalRepresentation(PassRefPtr<StringCallback>);
472     void getSelectionOrContentsAsString(PassRefPtr<StringCallback>);
473     void getSourceForFrame(WebFrameProxy*, PassRefPtr<StringCallback>);
474     void getWebArchiveOfFrame(WebFrameProxy*, PassRefPtr<DataCallback>);
475     void runJavaScriptInMainFrame(const String&, PassRefPtr<ScriptValueCallback>);
476     void forceRepaint(PassRefPtr<VoidCallback>);
477
478     float headerHeight(WebFrameProxy*);
479     float footerHeight(WebFrameProxy*);
480     void drawHeader(WebFrameProxy*, const WebCore::FloatRect&);
481     void drawFooter(WebFrameProxy*, const WebCore::FloatRect&);
482
483 #if PLATFORM(MAC)
484     // Dictionary.
485     void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
486 #endif
487
488     void receivedPolicyDecision(WebCore::PolicyAction, WebFrameProxy*, uint64_t listenerID);
489
490     void backForwardRemovedItem(uint64_t itemID);
491
492     // Drag and drop support.
493     void dragEntered(WebCore::DragData*, const String& dragStorageName = String());
494     void dragUpdated(WebCore::DragData*, const String& dragStorageName = String());
495     void dragExited(WebCore::DragData*, const String& dragStorageName = String());
496     void performDrag(WebCore::DragData*, const String& dragStorageName, const SandboxExtension::Handle&);
497
498     void didPerformDragControllerAction(WebCore::DragSession);
499     void dragEnded(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t operation);
500 #if PLATFORM(MAC)
501     void setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, bool isLinkDrag);
502 #endif
503 #if PLATFORM(WIN)
504     void startDragDrop(const WebCore::IntPoint& imagePoint, const WebCore::IntPoint& dragPoint, uint64_t okEffect, const HashMap<UINT, Vector<String> >& dataMap, uint64_t fileSize, const String& pathname, const SharedMemory::Handle& fileContentHandle, const WebCore::IntSize& dragImageSize, const SharedMemory::Handle& dragImageHandle, bool isLinkDrag);
505 #endif
506 #if PLATFORM(QT) || PLATFORM(GTK)
507     void startDrag(const WebCore::DragData&, const ShareableBitmap::Handle& dragImage);
508 #endif
509     void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
510     void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&);
511
512     void processDidBecomeUnresponsive();
513     void processDidBecomeResponsive();
514     void processDidCrash();
515
516 #if USE(ACCELERATED_COMPOSITING)
517     virtual void enterAcceleratedCompositingMode(const LayerTreeContext&);
518     virtual void exitAcceleratedCompositingMode();
519 #endif
520     
521     void didDraw();
522
523     enum UndoOrRedo { Undo, Redo };
524     void addEditCommand(WebEditCommandProxy*);
525     void removeEditCommand(WebEditCommandProxy*);
526     bool isValidEditCommand(WebEditCommandProxy*);
527     void registerEditCommand(PassRefPtr<WebEditCommandProxy>, UndoOrRedo);
528
529     WebProcessProxy* process() const;
530     PlatformProcessIdentifier processIdentifier() const;
531
532     WebPageGroup* pageGroup() const { return m_pageGroup.get(); }
533
534     bool isValid();
535
536     const String& urlAtProcessExit() const { return m_urlAtProcessExit; }
537     WebFrameProxy::LoadState loadStateAtProcessExit() const { return m_loadStateAtProcessExit; }
538
539     WebCore::DragSession dragSession() const { return m_currentDragSession; }
540     void resetDragOperation() { m_currentDragSession = WebCore::DragSession(); }
541
542     void preferencesDidChange();
543
544     // Called by the WebContextMenuProxy.
545     void contextMenuItemSelected(const WebContextMenuItemData&);
546
547     // Called by the WebOpenPanelResultListenerProxy.
548     void didChooseFilesForOpenPanel(const Vector<String>&);
549     void didCancelForOpenPanel();
550
551     WebPageCreationParameters creationParameters() const;
552
553 #if PLATFORM(QT)
554     void findZoomableAreaForPoint(const WebCore::IntPoint&);
555     void didReceiveMessageFromNavigatorQtObject(const String&);
556     void handleDownloadRequest(DownloadProxy*);
557 #endif
558
559     void advanceToNextMisspelling(bool startBeforeSelection) const;
560     void changeSpellingToWord(const String& word) const;
561 #if PLATFORM(MAC)
562     void uppercaseWord();
563     void lowercaseWord();
564     void capitalizeWord();
565
566     bool isSmartInsertDeleteEnabled() const { return m_isSmartInsertDeleteEnabled; }
567     void setSmartInsertDeleteEnabled(bool);
568 #endif
569
570     void beginPrinting(WebFrameProxy*, const PrintInfo&);
571     void endPrinting();
572     void computePagesForPrinting(WebFrameProxy*, const PrintInfo&, PassRefPtr<ComputedPagesCallback>);
573 #if PLATFORM(MAC) || PLATFORM(WIN)
574     void drawRectToPDF(WebFrameProxy*, const PrintInfo&, const WebCore::IntRect&, PassRefPtr<DataCallback>);
575     void drawPagesToPDF(WebFrameProxy*, const PrintInfo&, uint32_t first, uint32_t count, PassRefPtr<DataCallback>);
576 #endif
577
578     const String& pendingAPIRequestURL() const { return m_pendingAPIRequestURL; }
579
580     void flashBackingStoreUpdates(const Vector<WebCore::IntRect>& updateRects);
581
582 #if PLATFORM(MAC)
583     void handleCorrectionPanelResult(const String& result);
584 #endif
585
586     static void setDebugPaintFlags(WKPageDebugPaintFlags flags) { s_debugPaintFlags = flags; }
587     static WKPageDebugPaintFlags debugPaintFlags() { return s_debugPaintFlags; }
588
589     // Color to be used with kWKDebugFlashViewUpdates.
590     static WebCore::Color viewUpdatesFlashColor();
591
592     // Color to be used with kWKDebugFlashBackingStoreUpdates.
593     static WebCore::Color backingStoreUpdatesFlashColor();
594
595     void saveDataToFileInDownloadsFolder(const String& suggestedFilename, const String& mimeType, const String& originatingURLString, WebData*);
596
597     void linkClicked(const String&, const WebMouseEvent&);
598
599     WebCore::IntRect visibleScrollerThumbRect() const { return m_visibleScrollerThumbRect; }
600
601     uint64_t renderTreeSize() const { return m_renderTreeSize; }
602
603     void setShouldSendEventsSynchronously(bool sync) { m_shouldSendEventsSynchronously = sync; };
604
605     void printMainFrame();
606
607     // WebPopupMenuProxy::Client
608     virtual NativeWebMouseEvent* currentlyProcessedMouseDownEvent();
609
610 private:
611     WebPageProxy(PageClient*, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID);
612
613     virtual Type type() const { return APIType; }
614
615     // WebPopupMenuProxy::Client
616     virtual void valueChangedForPopupMenu(WebPopupMenuProxy*, int32_t newSelectedIndex);
617     virtual void setTextFromItemForPopupMenu(WebPopupMenuProxy*, int32_t index);
618 #if PLATFORM(GTK)
619     virtual void failedToShowPopupMenu();
620 #endif    
621
622     // Implemented in generated WebPageProxyMessageReceiver.cpp
623     void didReceiveWebPageProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
624     void didReceiveSyncWebPageProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&);
625
626     void didCreateMainFrame(uint64_t frameID);
627     void didCreateSubframe(uint64_t frameID, uint64_t parentFrameID);
628     void didSaveFrameToPageCache(uint64_t frameID);
629     void didRestoreFrameFromPageCache(uint64_t frameID, uint64_t parentFrameID);
630
631     void didStartProvisionalLoadForFrame(uint64_t frameID, const String& url, const String& unreachableURL, CoreIPC::ArgumentDecoder*);
632     void didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, const String&, CoreIPC::ArgumentDecoder*);
633     void didFailProvisionalLoadForFrame(uint64_t frameID, const WebCore::ResourceError&, CoreIPC::ArgumentDecoder*);
634     void didCommitLoadForFrame(uint64_t frameID, const String& mimeType, bool frameHasCustomRepresentation, const PlatformCertificateInfo&, CoreIPC::ArgumentDecoder*);
635     void didFinishDocumentLoadForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
636     void didFinishLoadForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
637     void didFailLoadForFrame(uint64_t frameID, const WebCore::ResourceError&, CoreIPC::ArgumentDecoder*);
638     void didSameDocumentNavigationForFrame(uint64_t frameID, uint32_t sameDocumentNavigationType, const String&, CoreIPC::ArgumentDecoder*);
639     void didReceiveTitleForFrame(uint64_t frameID, const String&, CoreIPC::ArgumentDecoder*);
640     void didFirstLayoutForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
641     void didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
642     void didRemoveFrameFromHierarchy(uint64_t frameID, CoreIPC::ArgumentDecoder*);
643     void didDisplayInsecureContentForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
644     void didRunInsecureContentForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
645     void didDetectXSSForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
646     void frameDidBecomeFrameSet(uint64_t frameID, bool);
647     void didStartProgress();
648     void didChangeProgress(double);
649     void didFinishProgress();
650     
651     void decidePolicyForNavigationAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, const WebCore::ResourceRequest&, uint64_t listenerID, CoreIPC::ArgumentDecoder*, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID);
652     void decidePolicyForNewWindowAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, const WebCore::ResourceRequest&, const String& frameName, uint64_t listenerID, CoreIPC::ArgumentDecoder*);
653     void decidePolicyForResponse(uint64_t frameID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, uint64_t listenerID, CoreIPC::ArgumentDecoder* arguments, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID);
654     void unableToImplementPolicy(uint64_t frameID, const WebCore::ResourceError&, CoreIPC::ArgumentDecoder* arguments);
655
656     void willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const StringPairVector& textFieldValues, uint64_t listenerID, CoreIPC::ArgumentDecoder*);
657
658     // Resource load client
659     void didInitiateLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, const WebCore::ResourceRequest&, bool pageIsProvisionallyLoading);
660     void didSendRequestForResource(uint64_t frameID, uint64_t resourceIdentifier, const WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirectResponse);
661     void didReceiveResponseForResource(uint64_t frameID, uint64_t resourceIdentifier, const WebCore::ResourceResponse&);
662     void didReceiveContentLengthForResource(uint64_t frameID, uint64_t resourceIdentifier, uint64_t contentLength);
663     void didFinishLoadForResource(uint64_t frameID, uint64_t resourceIdentifier);
664     void didFailLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, const WebCore::ResourceError&);
665
666     // UI client
667     void createNewPage(const WebCore::ResourceRequest&, const WebCore::WindowFeatures&, uint32_t modifiers, int32_t mouseButton, uint64_t& newPageID, WebPageCreationParameters&);
668     void showPage();
669     void closePage(bool stopResponsivenessTimer);
670     void runJavaScriptAlert(uint64_t frameID, const String&);
671     void runJavaScriptConfirm(uint64_t frameID, const String&, bool& result);
672     void runJavaScriptPrompt(uint64_t frameID, const String&, const String&, String& result);
673     void shouldInterruptJavaScript(bool& result);
674     void setStatusText(const String&);
675     void mouseDidMoveOverElement(const WebHitTestResult::Data& hitTestResultData, uint32_t modifiers, CoreIPC::ArgumentDecoder*);
676     void missingPluginButtonClicked(const String& mimeType, const String& url, const String& pluginsPageURL);
677     void setToolbarsAreVisible(bool toolbarsAreVisible);
678     void getToolbarsAreVisible(bool& toolbarsAreVisible);
679     void setMenuBarIsVisible(bool menuBarIsVisible);
680     void getMenuBarIsVisible(bool& menuBarIsVisible);
681     void setStatusBarIsVisible(bool statusBarIsVisible);
682     void getStatusBarIsVisible(bool& statusBarIsVisible);
683     void setIsResizable(bool isResizable);
684     void getIsResizable(bool& isResizable);
685     void setWindowFrame(const WebCore::FloatRect&);
686     void getWindowFrame(WebCore::FloatRect&);
687     void screenToWindow(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint);
688     void windowToScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);
689     void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, bool& shouldClose);
690     void didChangeViewportProperties(const WebCore::ViewportArguments&);
691     void pageDidScroll();
692     void runOpenPanel(uint64_t frameID, const WebCore::FileChooserSettings&);
693     void printFrame(uint64_t frameID);
694     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, uint64_t& newQuota);
695     void requestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_t frameID, String originIdentifier);
696     void runModal();
697     void notifyScrollerThumbIsVisibleInRect(const WebCore::IntRect&);
698     void recommendedScrollbarStyleDidChange(int32_t newStyle);
699     void didChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar);
700     void didChangeScrollOffsetPinningForMainFrame(bool pinnedToLeftSide, bool pinnedToRightSide);
701     void didChangePageCount(unsigned);
702     void didFailToInitializePlugin(const String& mimeType);
703     void numWheelEventHandlersChanged(unsigned count) { m_wheelEventHandlerCount = count; }
704
705     void reattachToWebProcess();
706     void reattachToWebProcessWithItem(WebBackForwardListItem*);
707
708     void requestNotificationPermission(uint64_t notificationID, const String& originIdentifier);
709     void showNotification(const String& title, const String& body, const String& originIdentifier, uint64_t notificationID);
710     
711 #if USE(TILED_BACKING_STORE)
712     void pageDidRequestScroll(const WebCore::IntPoint&);
713 #endif
714
715 #if PLATFORM(QT)
716     void didChangeContentsSize(const WebCore::IntSize&);
717     void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&);
718     void focusEditableArea(const WebCore::IntRect& caret, const WebCore::IntRect&);
719 #endif
720 #if ENABLE(TOUCH_EVENTS)
721     void needTouchEvents(bool);
722 #endif
723
724     void editorStateChanged(const EditorState&);
725
726     // Back/Forward list management
727     void backForwardAddItem(uint64_t itemID);
728     void backForwardGoToItem(uint64_t itemID);
729     void backForwardItemAtIndex(int32_t index, uint64_t& itemID);
730     void backForwardBackListCount(int32_t& count);
731     void backForwardForwardListCount(int32_t& count);
732     void backForwardClear();
733
734     // Undo management
735     void registerEditCommandForUndo(uint64_t commandID, uint32_t editAction);
736     void clearAllEditCommands();
737     void canUndoRedo(uint32_t action, bool& result);
738     void executeUndoRedo(uint32_t action, bool& result);
739
740     // Keyboard handling
741 #if PLATFORM(MAC)
742     void interpretQueuedKeyEvent(const EditorState&, bool& handled, Vector<WebCore::KeypressCommand>&);
743     void executeSavedCommandBySelector(const String& selector, bool& handled);
744 #endif
745
746 #if PLATFORM(GTK)
747     void getEditorCommandsForKeyEvent(const AtomicString&, Vector<String>&);
748 #endif
749 #if PLATFORM(EFL)
750     void getEditorCommandsForKeyEvent(Vector<String>&);
751 #endif
752
753     // Popup Menu.
754     void showPopupMenu(const WebCore::IntRect& rect, uint64_t textDirection, const Vector<WebPopupItem>& items, int32_t selectedIndex, const PlatformPopupMenuData&);
755     void hidePopupMenu();
756 #if PLATFORM(WIN)
757     void setPopupMenuSelectedIndex(int32_t);
758 #endif
759
760     // Context Menu.
761     void showContextMenu(const WebCore::IntPoint& menuLocation, const ContextMenuState&, const Vector<WebContextMenuItemData>&, CoreIPC::ArgumentDecoder*);
762     void internalShowContextMenu(const WebCore::IntPoint& menuLocation, const ContextMenuState&, const Vector<WebContextMenuItemData>&, CoreIPC::ArgumentDecoder*);
763
764     // Search popup results
765     void saveRecentSearches(const String&, const Vector<String>&);
766     void loadRecentSearches(const String&, Vector<String>&);
767
768 #if PLATFORM(MAC)
769     // Speech.
770     void getIsSpeaking(bool&);
771     void speak(const String&);
772     void stopSpeaking();
773
774     // Spotlight.
775     void searchWithSpotlight(const String&);
776
777     // Dictionary.
778     void didPerformDictionaryLookup(const String&, const DictionaryPopupInfo&);
779 #endif
780
781     // Spelling and grammar.
782     int64_t spellDocumentTag();
783 #if USE(UNIFIED_TEXT_CHECKING)
784     void checkTextOfParagraph(const String& text, uint64_t checkingTypes, Vector<WebCore::TextCheckingResult>& results);
785 #endif
786     void checkSpellingOfString(const String& text, int32_t& misspellingLocation, int32_t& misspellingLength);
787     void checkGrammarOfString(const String& text, Vector<WebCore::GrammarDetail>&, int32_t& badGrammarLocation, int32_t& badGrammarLength);
788     void spellingUIIsShowing(bool&);
789     void updateSpellingUIWithMisspelledWord(const String& misspelledWord);
790     void updateSpellingUIWithGrammarString(const String& badGrammarPhrase, const WebCore::GrammarDetail&);
791     void getGuessesForWord(const String& word, const String& context, Vector<String>& guesses);
792     void learnWord(const String& word);
793     void ignoreWord(const String& word);
794
795     void setFocus(bool focused);
796     void takeFocus(uint32_t direction);
797     void setToolTip(const String&);
798     void setCursor(const WebCore::Cursor&);
799     void setCursorHiddenUntilMouseMoves(bool);
800
801     void didReceiveEvent(uint32_t opaqueType, bool handled);
802     void stopResponsivenessTimer();
803
804     void voidCallback(uint64_t);
805     void dataCallback(const CoreIPC::DataReference&, uint64_t);
806     void stringCallback(const String&, uint64_t);
807     void scriptValueCallback(const CoreIPC::DataReference&, uint64_t);
808     void computedPagesCallback(const Vector<WebCore::IntRect>&, double totalScaleFactorForPrinting, uint64_t);
809     void validateCommandCallback(const String&, bool, int, uint64_t);
810
811     void focusedFrameChanged(uint64_t frameID);
812     void frameSetLargestFrameChanged(uint64_t frameID);
813
814     void canAuthenticateAgainstProtectionSpaceInFrame(uint64_t frameID, const WebCore::ProtectionSpace&, bool& canAuthenticate);
815     void didReceiveAuthenticationChallenge(uint64_t frameID, const WebCore::AuthenticationChallenge&, uint64_t challengeID);
816
817     void didFinishLoadingDataForCustomRepresentation(const String& suggestedFilename, const CoreIPC::DataReference&);
818
819 #if PLATFORM(MAC)
820     void pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus);
821     void setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t complexTextInputState);
822 #endif
823
824     void clearPendingAPIRequestURL() { m_pendingAPIRequestURL = String(); }
825     void setPendingAPIRequestURL(const String& pendingAPIRequestURL) { m_pendingAPIRequestURL = pendingAPIRequestURL; }
826
827     bool maybeInitializeSandboxExtensionHandle(const WebCore::KURL&, SandboxExtension::Handle&);
828
829 #if PLATFORM(MAC)
830     void substitutionsPanelIsShowing(bool&);
831 #if !defined(BUILDING_ON_SNOW_LEOPARD)
832     void showCorrectionPanel(int32_t panelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
833     void dismissCorrectionPanel(int32_t reason);
834     void dismissCorrectionPanelSoon(int32_t reason, String& result);
835     void recordAutocorrectionResponse(int32_t responseType, const String& replacedString, const String& replacementString);
836 #endif // !defined(BUILDING_ON_SNOW_LEOPARD)
837 #endif // PLATFORM(MAC)
838
839     void clearLoadDependentCallbacks();
840
841     void performDragControllerAction(DragControllerAction, WebCore::DragData*, const String& dragStorageName, const SandboxExtension::Handle&);
842
843     void updateBackingStoreDiscardableState();
844
845 #if PLATFORM(WIN)
846     void scheduleChildWindowGeometryUpdate(const WindowGeometry&);
847 #endif
848
849     void setRenderTreeSize(uint64_t treeSize) { m_renderTreeSize = treeSize; }
850
851     PageClient* m_pageClient;
852     WebLoaderClient m_loaderClient;
853     WebPolicyClient m_policyClient;
854     WebFormClient m_formClient;
855     WebResourceLoadClient m_resourceLoadClient;
856     WebUIClient m_uiClient;
857     WebFindClient m_findClient;
858     WebPageContextMenuClient m_contextMenuClient;
859
860     OwnPtr<DrawingAreaProxy> m_drawingArea;
861     RefPtr<WebProcessProxy> m_process;
862     RefPtr<WebPageGroup> m_pageGroup;
863     RefPtr<WebFrameProxy> m_mainFrame;
864     RefPtr<WebFrameProxy> m_focusedFrame;
865     RefPtr<WebFrameProxy> m_frameSetLargestFrame;
866
867     String m_userAgent;
868     String m_applicationNameForUserAgent;
869     String m_customUserAgent;
870     String m_customTextEncodingName;
871
872 #if ENABLE(INSPECTOR)
873     RefPtr<WebInspectorProxy> m_inspector;
874 #endif
875
876 #if ENABLE(FULLSCREEN_API)
877     RefPtr<WebFullScreenManagerProxy> m_fullScreenManager;
878 #endif
879
880     HashMap<uint64_t, RefPtr<VoidCallback> > m_voidCallbacks;
881     HashMap<uint64_t, RefPtr<DataCallback> > m_dataCallbacks;
882     HashMap<uint64_t, RefPtr<StringCallback> > m_stringCallbacks;
883     HashSet<uint64_t> m_loadDependentStringCallbackIDs;
884     HashMap<uint64_t, RefPtr<ScriptValueCallback> > m_scriptValueCallbacks;
885     HashMap<uint64_t, RefPtr<ComputedPagesCallback> > m_computedPagesCallbacks;
886     HashMap<uint64_t, RefPtr<ValidateCommandCallback> > m_validateCommandCallbacks;
887
888     HashSet<WebEditCommandProxy*> m_editCommandSet;
889
890     RefPtr<WebPopupMenuProxy> m_activePopupMenu;
891     RefPtr<WebContextMenuProxy> m_activeContextMenu;
892     ContextMenuState m_activeContextMenuState;
893     RefPtr<WebOpenPanelResultListenerProxy> m_openPanelResultListener;
894     GeolocationPermissionRequestManagerProxy m_geolocationPermissionRequestManager;
895     NotificationPermissionRequestManagerProxy m_notificationPermissionRequestManager;
896
897     double m_estimatedProgress;
898
899     // Whether the web page is contained in a top-level window.
900     bool m_isInWindow;
901
902     // Whether the page is visible; if the backing view is visible and inserted into a window.
903     bool m_isVisible;
904
905     bool m_canGoBack;
906     bool m_canGoForward;
907     RefPtr<WebBackForwardList> m_backForwardList;
908     
909     bool m_maintainsInactiveSelection;
910
911     String m_toolTip;
912
913     String m_urlAtProcessExit;
914     WebFrameProxy::LoadState m_loadStateAtProcessExit;
915
916     EditorState m_editorState;
917
918     double m_textZoomFactor;
919     double m_pageZoomFactor;
920     double m_pageScaleFactor;
921     float m_intrinsicDeviceScaleFactor;
922     float m_customDeviceScaleFactor;
923
924     bool m_drawsBackground;
925     bool m_drawsTransparentBackground;
926
927     bool m_areMemoryCacheClientCallsEnabled;
928
929     bool m_useFixedLayout;
930     WebCore::IntSize m_fixedLayoutSize;
931
932     WebCore::Page::Pagination::Mode m_paginationMode;
933     double m_pageLength;
934     double m_gapBetweenPages;
935
936     // If the process backing the web page is alive and kicking.
937     bool m_isValid;
938
939     // Whether WebPageProxy::close() has been called on this page.
940     bool m_isClosed;
941
942     bool m_isInPrintingMode;
943     bool m_isPerformingDOMPrintOperation;
944
945     bool m_inDecidePolicyForResponse;
946     bool m_syncMimeTypePolicyActionIsValid;
947     WebCore::PolicyAction m_syncMimeTypePolicyAction;
948     uint64_t m_syncMimeTypePolicyDownloadID;
949
950     bool m_inDecidePolicyForNavigationAction;
951     bool m_syncNavigationActionPolicyActionIsValid;
952     WebCore::PolicyAction m_syncNavigationActionPolicyAction;
953     uint64_t m_syncNavigationActionPolicyDownloadID;
954
955     Deque<NativeWebKeyboardEvent> m_keyEventQueue;
956     Deque<NativeWebWheelEvent> m_wheelEventQueue;
957     Vector<NativeWebWheelEvent> m_currentlyProcessedWheelEvents;
958
959     bool m_processingMouseMoveEvent;
960     OwnPtr<NativeWebMouseEvent> m_nextMouseMoveEvent;
961     OwnPtr<NativeWebMouseEvent> m_currentlyProcessedMouseDownEvent;
962
963 #if ENABLE(TOUCH_EVENTS)
964     bool m_needTouchEvents;
965     Deque<QueuedTouchEvents> m_touchEventQueue;
966 #endif
967
968     uint64_t m_pageID;
969
970 #if PLATFORM(MAC)
971     bool m_isSmartInsertDeleteEnabled;
972 #endif
973
974     int64_t m_spellDocumentTag;
975     bool m_hasSpellDocumentTag;
976     unsigned m_pendingLearnOrIgnoreWordMessageCount;
977
978     bool m_mainFrameHasCustomRepresentation;
979     WebCore::DragSession m_currentDragSession;
980
981     String m_pendingAPIRequestURL;
982
983     bool m_mainFrameHasHorizontalScrollbar;
984     bool m_mainFrameHasVerticalScrollbar;
985     int m_wheelEventHandlerCount;
986
987     bool m_mainFrameIsPinnedToLeftSide;
988     bool m_mainFrameIsPinnedToRightSide;
989
990     unsigned m_pageCount;
991
992     WebCore::IntRect m_visibleScrollerThumbRect;
993
994     uint64_t m_renderTreeSize;
995
996     static WKPageDebugPaintFlags s_debugPaintFlags;
997
998     bool m_shouldSendEventsSynchronously;
999
1000 #if PLATFORM(QT)
1001     WTF::HashSet<RefPtr<QtNetworkRequestData> > m_applicationSchemeRequests;
1002 #endif
1003 };
1004
1005 } // namespace WebKit
1006
1007 #endif // WebPageProxy_h