AX: Webkit2 not sending UAZoomFocusChanged notifications
[WebKit-https.git] / Source / WebKit2 / WebProcess / WebPage / WebPage.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 WebPage_h
27 #define WebPage_h
28
29 #include "APIObject.h"
30 #include "DrawingArea.h"
31 #include "FindController.h"
32 #include "GeolocationPermissionRequestManager.h"
33 #include "ImageOptions.h"
34 #include "InjectedBundlePageContextMenuClient.h"
35 #include "InjectedBundlePageEditorClient.h"
36 #include "InjectedBundlePageFormClient.h"
37 #include "InjectedBundlePageLoaderClient.h"
38 #include "InjectedBundlePagePolicyClient.h"
39 #include "InjectedBundlePageResourceLoadClient.h"
40 #include "InjectedBundlePageUIClient.h"
41 #include "MessageSender.h"
42 #include "Plugin.h"
43 #include "SandboxExtension.h"
44 #include "WebEditCommand.h"
45 #include <WebCore/DragData.h>
46 #include <WebCore/Editor.h>
47 #include <WebCore/FrameLoaderTypes.h>
48 #include <WebCore/IntRect.h>
49 #include <WebCore/WebCoreKeyboardUIMode.h>
50 #include <wtf/HashMap.h>
51 #include <wtf/OwnPtr.h>
52 #include <wtf/PassRefPtr.h>
53 #include <wtf/RefPtr.h>
54 #include <wtf/text/WTFString.h>
55
56 #if ENABLE(TOUCH_EVENTS)
57 #include <WebCore/PlatformTouchEvent.h>
58 #endif
59
60 #if PLATFORM(MAC)
61 #include "DictionaryPopupInfo.h"
62 #include <wtf/RetainPtr.h>
63 OBJC_CLASS AccessibilityWebPageObject;
64 #endif
65
66 namespace CoreIPC {
67     class ArgumentDecoder;
68     class Connection;
69     class MessageID;
70 }
71
72 namespace WebCore {
73     class GraphicsContext;
74     class KeyboardEvent;
75     class Page;
76     class PrintContext;
77     class Range;
78     class ResourceRequest;
79     class SharedBuffer;
80 }
81
82 namespace WebKit {
83
84 class DrawingArea;
85 class InjectedBundleBackForwardList;
86 class PageOverlay;
87 class PluginView;
88 class SessionState;
89 class WebContextMenu;
90 class WebContextMenuItemData;
91 class WebEvent;
92 class WebFrame;
93 class WebImage;
94 class WebInspector;
95 class WebKeyboardEvent;
96 class WebMouseEvent;
97 class WebOpenPanelResultListener;
98 class WebPageGroupProxy;
99 class WebPopupMenu;
100 class WebWheelEvent;
101 struct PrintInfo;
102 struct WebPageCreationParameters;
103 struct WebPreferencesStore;
104
105 #if ENABLE(GESTURE_EVENTS)
106 class WebGestureEvent;
107 #endif
108
109 #if ENABLE(TOUCH_EVENTS)
110 class WebTouchEvent;
111 #endif
112
113 class WebPage : public APIObject, public CoreIPC::MessageSender<WebPage> {
114 public:
115     static const Type APIType = TypeBundlePage;
116
117     static PassRefPtr<WebPage> create(uint64_t pageID, const WebPageCreationParameters&);
118     virtual ~WebPage();
119
120     // Used by MessageSender.
121     CoreIPC::Connection* connection() const;
122     uint64_t destinationID() const { return pageID(); }
123
124     void close();
125
126     WebCore::Page* corePage() const { return m_page.get(); }
127     uint64_t pageID() const { return m_pageID; }
128
129     void setSize(const WebCore::IntSize&);
130     const WebCore::IntSize& size() const { return m_viewSize; }
131     WebCore::IntRect bounds() const { return WebCore::IntRect(WebCore::IntPoint(), size()); }
132     
133     InjectedBundleBackForwardList* backForwardList();
134     DrawingArea* drawingArea() const { return m_drawingArea.get(); }
135
136     WebPageGroupProxy* pageGroup() const { return m_pageGroup.get(); }
137
138     void scrollMainFrameIfNotAtMaxScrollPosition(const WebCore::IntSize& scrollOffset);
139
140 #if ENABLE(INSPECTOR)
141     WebInspector* inspector();
142 #endif
143
144     // -- Called by the DrawingArea.
145     // FIXME: We could genericize these into a DrawingArea client interface. Would that be beneficial?
146     void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect&);
147     void drawPageOverlay(WebCore::GraphicsContext&, const WebCore::IntRect&);
148     void layoutIfNeeded();
149
150     // -- Called from WebCore clients.
151 #if !PLATFORM(MAC)
152     bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*);
153 #endif
154     void show();
155     String userAgent() const { return m_userAgent; }
156     WebCore::IntRect windowResizerRect() const;
157     WebCore::KeyboardUIMode keyboardUIMode();
158
159     WebEditCommand* webEditCommand(uint64_t);
160     void addWebEditCommand(uint64_t, WebEditCommand*);
161     void removeWebEditCommand(uint64_t);
162     bool isInRedo() const { return m_isInRedo; }
163
164     void setActivePopupMenu(WebPopupMenu*);
165     
166     WebOpenPanelResultListener* activeOpenPanelResultListener() const { return m_activeOpenPanelResultListener.get(); }
167     void setActiveOpenPanelResultListener(PassRefPtr<WebOpenPanelResultListener>);
168
169     // -- Called from WebProcess.
170     void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
171     CoreIPC::SyncReplyMode didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);
172
173     // -- InjectedBundle methods
174     void initializeInjectedBundleContextMenuClient(WKBundlePageContextMenuClient*);
175     void initializeInjectedBundleEditorClient(WKBundlePageEditorClient*);
176     void initializeInjectedBundleFormClient(WKBundlePageFormClient*);
177     void initializeInjectedBundleLoaderClient(WKBundlePageLoaderClient*);
178     void initializeInjectedBundlePolicyClient(WKBundlePagePolicyClient*);
179     void initializeInjectedBundleResourceLoadClient(WKBundlePageResourceLoadClient*);
180     void initializeInjectedBundleUIClient(WKBundlePageUIClient*);
181
182     InjectedBundlePageContextMenuClient& injectedBundleContextMenuClient() { return m_contextMenuClient; }
183     InjectedBundlePageEditorClient& injectedBundleEditorClient() { return m_editorClient; }
184     InjectedBundlePageFormClient& injectedBundleFormClient() { return m_formClient; }
185     InjectedBundlePageLoaderClient& injectedBundleLoaderClient() { return m_loaderClient; }
186     InjectedBundlePagePolicyClient& injectedBundlePolicyClient() { return m_policyClient; }
187     InjectedBundlePageResourceLoadClient& injectedBundleResourceLoadClient() { return m_resourceLoadClient; }
188     InjectedBundlePageUIClient& injectedBundleUIClient() { return m_uiClient; }
189
190     bool findStringFromInjectedBundle(const String&, FindOptions);
191
192     WebFrame* mainFrame() const { return m_mainFrame.get(); }
193     PassRefPtr<Plugin> createPlugin(const Plugin::Parameters&);
194
195     String renderTreeExternalRepresentation() const;
196     void executeEditingCommand(const String& commandName, const String& argument);
197     bool isEditingCommandEnabled(const String& commandName);
198     void clearMainFrameName();
199     void sendClose();
200
201     double textZoomFactor() const;
202     void setTextZoomFactor(double);
203     double pageZoomFactor() const;
204     void setPageZoomFactor(double);
205     void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
206
207     void scaleWebView(double scale, const WebCore::IntPoint& origin);
208     double viewScaleFactor() const;
209
210     void setUseFixedLayout(bool);
211     void setFixedLayoutSize(const WebCore::IntSize&);
212
213     bool drawsBackground() const { return m_drawsBackground; }
214     bool drawsTransparentBackground() const { return m_drawsTransparentBackground; }
215
216     void stopLoading();
217     void stopLoadingFrame(uint64_t frameID);
218     void setDefersLoading(bool deferLoading);
219
220 #if USE(ACCELERATED_COMPOSITING)
221     void enterAcceleratedCompositingMode(WebCore::GraphicsLayer*);
222     void exitAcceleratedCompositingMode();
223 #endif
224
225 #if PLATFORM(MAC)
226     void addPluginView(PluginView*);
227     void removePluginView(PluginView*);
228
229     bool windowIsVisible() const { return m_windowIsVisible; }
230     const WebCore::IntRect& windowFrameInScreenCoordinates() const { return m_windowFrameInScreenCoordinates; }
231     const WebCore::IntRect& viewFrameInWindowCoordinates() const { return m_viewFrameInWindowCoordinates; }
232     bool windowIsFocused() const;
233     bool interceptEditingKeyboardEvent(WebCore::KeyboardEvent*, bool);
234 #elif PLATFORM(WIN)
235     HWND nativeWindow() const { return m_nativeWindow; }
236 #endif
237
238     void installPageOverlay(PassRefPtr<PageOverlay>);
239     void uninstallPageOverlay(PageOverlay*);
240     bool hasPageOverlay() const { return m_pageOverlay; }
241     WebCore::IntRect windowToScreen(const WebCore::IntRect&);
242
243     PassRefPtr<WebImage> snapshotInViewCoordinates(const WebCore::IntRect&, ImageOptions);
244     PassRefPtr<WebImage> snapshotInDocumentCoordinates(const WebCore::IntRect&, ImageOptions);
245     PassRefPtr<WebImage> scaledSnapshotInDocumentCoordinates(const WebCore::IntRect&, double scaleFactor, ImageOptions);
246
247     static const WebEvent* currentEvent();
248
249     FindController& findController() { return m_findController; }
250     GeolocationPermissionRequestManager& geolocationPermissionRequestManager() { return m_geolocationPermissionRequestManager; }
251
252     void pageDidScroll();
253 #if ENABLE(TILED_BACKING_STORE)
254     void pageDidRequestScroll(const WebCore::IntSize& delta);
255     void setActualVisibleContentRect(const WebCore::IntRect&);
256
257     bool resizesToContentsEnabled() const { return !m_resizesToContentsLayoutSize.isEmpty(); }
258     WebCore::IntSize resizesToContentsLayoutSize() const { return m_resizesToContentsLayoutSize; }
259     void setResizesToContentsUsingLayoutSize(const WebCore::IntSize& targetLayoutSize);
260     void resizeToContentsIfNeeded();
261 #endif
262
263     WebContextMenu* contextMenu();
264     
265     bool hasLocalDataForURL(const WebCore::KURL&);
266     String cachedResponseMIMETypeForURL(const WebCore::KURL&);
267     
268     static bool canHandleRequest(const WebCore::ResourceRequest&);
269
270     class SandboxExtensionTracker {
271     public:
272         ~SandboxExtensionTracker();
273
274         void invalidate();
275
276         void beginLoad(WebFrame*, const SandboxExtension::Handle& handle);
277         void didStartProvisionalLoad(WebFrame*);
278         void didCommitProvisionalLoad(WebFrame*);
279         void didFailProvisionalLoad(WebFrame*);
280     private:
281         RefPtr<SandboxExtension> m_pendingProvisionalSandboxExtension;
282         RefPtr<SandboxExtension> m_provisionalSandboxExtension;
283         RefPtr<SandboxExtension> m_committedSandboxExtension;
284     };
285
286     SandboxExtensionTracker& sandboxExtensionTracker() { return m_sandboxExtensionTracker; }
287
288     static void getLocationAndLengthFromRange(WebCore::Range*, uint64_t& location, uint64_t& length);
289
290 #if PLATFORM(MAC)
291     void registerUIProcessAccessibilityTokens(const CoreIPC::DataReference& elemenToken, const CoreIPC::DataReference& windowToken);
292     AccessibilityWebPageObject* accessibilityRemoteObject();
293     WebCore::IntPoint accessibilityPosition() const { return m_accessibilityPosition; }    
294     
295     void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
296
297     void getMarkedRange(uint64_t& location, uint64_t& length);
298     void characterIndexForPoint(const WebCore::IntPoint point, uint64_t& result);
299     void firstRectForCharacterRange(uint64_t location, uint64_t length, WebCore::IntRect& resultRect);
300     void writeSelectionToPasteboard(const WTF::String& pasteboardName, const WTF::Vector<WTF::String>& pasteboardTypes, bool& result);
301 #elif PLATFORM(WIN)
302     void confirmComposition(const String& compositionString);
303     void setComposition(const WTF::String& compositionString, const WTF::Vector<WebCore::CompositionUnderline>& underlines, uint64_t cursorPosition);
304     void firstRectForCharacterInSelectedRange(const uint64_t characterPosition, WebCore::IntRect& resultRect);
305     void getSelectedText(WTF::String&);
306 #endif
307
308     // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
309     // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
310     void dummy(bool&);
311
312 #if PLATFORM(MAC)
313     void performDictionaryLookupForRange(DictionaryPopupInfo::Type, WebCore::Frame*, WebCore::Range*);
314
315     bool isSpeaking();
316     void speak(const String&);
317     void stopSpeaking();
318
319     bool isSmartInsertDeleteEnabled() const { return m_isSmartInsertDeleteEnabled; }
320 #endif
321
322     void replaceSelectionWithText(WebCore::Frame*, const String&);
323 #if PLATFORM(WIN)
324     void performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const WebCore::DragDataMap&, uint32_t flags);
325 #else
326     void performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const WTF::String& dragStorageName, uint32_t flags);
327 #endif
328     void dragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation);
329
330     void beginPrinting(uint64_t frameID, const PrintInfo&);
331     void endPrinting();
332     void computePagesForPrinting(uint64_t frameID, const PrintInfo&, uint64_t callbackID);
333 #if PLATFORM(MAC) || PLATFORM(WIN)
334     void drawRectToPDF(uint64_t frameID, const WebCore::IntRect&, uint64_t callbackID);
335     void drawPagesToPDF(uint64_t frameID, uint32_t first, uint32_t count, uint64_t callbackID);
336 #endif
337
338     bool mainFrameHasCustomRepresentation() const;
339
340     void didChangeScrollOffsetForMainFrame();
341
342     bool canRunBeforeUnloadConfirmPanel() const { return m_canRunBeforeUnloadConfirmPanel; }
343     void setCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel) { m_canRunBeforeUnloadConfirmPanel = canRunBeforeUnloadConfirmPanel; }
344
345     bool canRunModal() const { return m_canRunModal; }
346     void setCanRunModal(bool canRunModal) { m_canRunModal = canRunModal; }
347
348     void runModal();
349
350     void setMemoryCacheMessagesEnabled(bool);
351
352     void forceRepaintWithoutCallback();
353
354 private:
355     WebPage(uint64_t pageID, const WebPageCreationParameters&);
356
357     virtual Type type() const { return APIType; }
358
359     void platformInitialize();
360
361     void didReceiveWebPageMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
362     CoreIPC::SyncReplyMode didReceiveSyncWebPageMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);
363
364     static const char* interpretKeyEvent(const WebCore::KeyboardEvent*);
365     bool performDefaultBehaviorForKeyEvent(const WebKeyboardEvent&);
366
367     String sourceForFrame(WebFrame*);
368
369     void loadData(PassRefPtr<WebCore::SharedBuffer>, const String& MIMEType, const String& encodingName, const WebCore::KURL& baseURL, const WebCore::KURL& failingURL);
370
371     bool platformHasLocalDataForURL(const WebCore::KURL&);
372
373     // Actions
374     void tryClose();
375     void loadURL(const String&, const SandboxExtension::Handle&);
376     void loadURLRequest(const WebCore::ResourceRequest&, const SandboxExtension::Handle&);
377     void loadHTMLString(const String& htmlString, const String& baseURL);
378     void loadAlternateHTMLString(const String& htmlString, const String& baseURL, const String& unreachableURL);
379     void loadPlainTextString(const String&);
380     void reload(bool reloadFromOrigin);
381     void goForward(uint64_t, const SandboxExtension::Handle&);
382     void goBack(uint64_t, const SandboxExtension::Handle&);
383     void goToBackForwardItem(uint64_t, const SandboxExtension::Handle&);
384     void setActive(bool);
385     void setFocused(bool);
386     void setInitialFocus(bool);
387     void setWindowResizerSize(const WebCore::IntSize&);
388     void setIsInWindow(bool);
389     void validateCommand(const String&, uint64_t);
390     void executeEditCommand(const String&);
391
392     void mouseEvent(const WebMouseEvent&);
393     void wheelEvent(const WebWheelEvent&);
394     void keyEvent(const WebKeyboardEvent&);
395 #if ENABLE(GESTURE_EVENTS)
396     void gestureEvent(const WebGestureEvent&);
397 #endif
398 #if ENABLE(TOUCH_EVENTS)
399     void touchEvent(const WebTouchEvent&);
400 #endif
401
402     uint64_t restoreSession(const SessionState&);
403     void restoreSessionAndNavigateToCurrentItem(const SessionState&, const SandboxExtension::Handle&);
404
405     void didRemoveBackForwardItem(uint64_t);
406
407     void setDrawsBackground(bool);
408     void setDrawsTransparentBackground(bool);
409
410     void viewWillStartLiveResize();
411     void viewWillEndLiveResize();
412
413     void getContentsAsString(uint64_t callbackID);
414     void getMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID);
415     void getResourceDataFromFrame(uint64_t frameID, const String& resourceURL, uint64_t callbackID);
416     void getRenderTreeExternalRepresentation(uint64_t callbackID);
417     void getSelectionOrContentsAsString(uint64_t callbackID);
418     void getSourceForFrame(uint64_t frameID, uint64_t callbackID);
419     void getWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID);
420     void runJavaScriptInMainFrame(const String&, uint64_t callbackID);
421     void forceRepaint(uint64_t callbackID);
422
423     void preferencesDidChange(const WebPreferencesStore&);
424     void platformPreferencesDidChange(const WebPreferencesStore&);
425     void updatePreferences(const WebPreferencesStore&);
426
427     void didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID);
428     void setUserAgent(const String&);
429     void setCustomTextEncodingName(const String&);
430
431 #if PLATFORM(MAC)
432     void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
433
434     void setWindowIsVisible(bool windowIsVisible);
435     void windowAndViewFramesChanged(const WebCore::IntRect& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates, const WebCore::IntPoint& accessibilityViewCoordinates);
436 #endif
437
438     void unapplyEditCommand(uint64_t commandID);
439     void reapplyEditCommand(uint64_t commandID);
440     void didRemoveEditCommand(uint64_t commandID);
441
442     void findString(const String&, uint32_t findOptions, uint32_t maxMatchCount);
443     void hideFindUI();
444     void countStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
445
446 #if PLATFORM(QT)
447     void findZoomableAreaForPoint(const WebCore::IntPoint&);
448 #endif
449
450     void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
451     void setTextForActivePopupMenu(int32_t index);
452
453     void didChooseFilesForOpenPanel(const Vector<String>&);
454     void didCancelForOpenPanel();
455 #if ENABLE(WEB_PROCESS_SANDBOX)
456     void extendSandboxForFileFromOpenPanel(const SandboxExtension::Handle&);
457 #endif
458
459     void didReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed);
460
461     void advanceToNextMisspelling(bool startBeforeSelection);
462     void changeSpellingToWord(const String& word);
463     void unmarkAllMisspellings();
464     void unmarkAllBadGrammar();
465 #if PLATFORM(MAC)
466     void uppercaseWord();
467     void lowercaseWord();
468     void capitalizeWord();
469
470     void setSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled) { m_isSmartInsertDeleteEnabled = isSmartInsertDeleteEnabled; }
471 #endif
472
473 #if ENABLE(CONTEXT_MENUS)
474     void didSelectItemFromActiveContextMenu(const WebContextMenuItemData&);
475 #endif
476
477     OwnPtr<WebCore::Page> m_page;
478     RefPtr<WebFrame> m_mainFrame;
479     RefPtr<InjectedBundleBackForwardList> m_backForwardList;
480
481     RefPtr<WebPageGroupProxy> m_pageGroup;
482
483     String m_userAgent;
484
485     WebCore::IntSize m_viewSize;
486     OwnPtr<DrawingArea> m_drawingArea;
487
488     bool m_drawsBackground;
489     bool m_drawsTransparentBackground;
490
491     bool m_isInRedo;
492     bool m_isClosed;
493
494     bool m_tabToLinks;
495
496 #if PLATFORM(MAC)
497     // Whether the containing window is visible or not.
498     bool m_windowIsVisible;
499
500     // Whether smart insert/delete is enabled or not.
501     bool m_isSmartInsertDeleteEnabled;
502
503     // The frame of the containing window in screen coordinates.
504     WebCore::IntRect m_windowFrameInScreenCoordinates;
505
506     // The frame of the view in window coordinates.
507     WebCore::IntRect m_viewFrameInWindowCoordinates;
508
509     // The accessibility position of the view.
510     WebCore::IntPoint m_accessibilityPosition;
511     
512     // All plug-in views on this web page.
513     HashSet<PluginView*> m_pluginViews;
514     
515     RetainPtr<AccessibilityWebPageObject> m_mockAccessibilityElement;
516 #elif PLATFORM(WIN)
517     // Our view's window (in the UI process).
518     HWND m_nativeWindow;
519 #endif
520     
521     HashMap<uint64_t, RefPtr<WebEditCommand> > m_editCommandMap;
522
523     WebCore::IntSize m_windowResizerSize;
524
525     InjectedBundlePageContextMenuClient m_contextMenuClient;
526     InjectedBundlePageEditorClient m_editorClient;
527     InjectedBundlePageFormClient m_formClient;
528     InjectedBundlePageLoaderClient m_loaderClient;
529     InjectedBundlePagePolicyClient m_policyClient;
530     InjectedBundlePageResourceLoadClient m_resourceLoadClient;
531     InjectedBundlePageUIClient m_uiClient;
532
533 #if ENABLE(TILED_BACKING_STORE)
534     WebCore::IntSize m_resizesToContentsLayoutSize;
535 #endif
536
537     FindController m_findController;
538     RefPtr<PageOverlay> m_pageOverlay;
539
540 #if ENABLE(INSPECTOR)
541     RefPtr<WebInspector> m_inspector;
542 #endif
543     RefPtr<WebPopupMenu> m_activePopupMenu;
544     RefPtr<WebContextMenu> m_contextMenu;
545     RefPtr<WebOpenPanelResultListener> m_activeOpenPanelResultListener;
546     GeolocationPermissionRequestManager m_geolocationPermissionRequestManager;
547
548     OwnPtr<WebCore::PrintContext> m_printContext;
549
550     SandboxExtensionTracker m_sandboxExtensionTracker;
551     uint64_t m_pageID;
552
553     bool m_canRunBeforeUnloadConfirmPanel;
554
555     bool m_canRunModal;
556     bool m_isRunningModal;
557
558     bool m_cachedMainFrameIsPinnedToLeftSide;
559     bool m_cachedMainFrameIsPinnedToRightSide;
560 };
561
562 } // namespace WebKit
563
564 #endif // WebPage_h