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