Reviewed by Darin Adler.
[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
242     PassRefPtr<WebImage> snapshotInViewCoordinates(const WebCore::IntRect&, ImageOptions);
243     PassRefPtr<WebImage> snapshotInDocumentCoordinates(const WebCore::IntRect&, ImageOptions);
244     PassRefPtr<WebImage> scaledSnapshotInDocumentCoordinates(const WebCore::IntRect&, double scaleFactor, ImageOptions);
245
246     static const WebEvent* currentEvent();
247
248     FindController& findController() { return m_findController; }
249     GeolocationPermissionRequestManager& geolocationPermissionRequestManager() { return m_geolocationPermissionRequestManager; }
250
251     void pageDidScroll();
252 #if ENABLE(TILED_BACKING_STORE)
253     void pageDidRequestScroll(const WebCore::IntSize& delta);
254     void setActualVisibleContentRect(const WebCore::IntRect&);
255
256     bool resizesToContentsEnabled() const { return !m_resizesToContentsLayoutSize.isEmpty(); }
257     WebCore::IntSize resizesToContentsLayoutSize() const { return m_resizesToContentsLayoutSize; }
258     void setResizesToContentsUsingLayoutSize(const WebCore::IntSize& targetLayoutSize);
259     void resizeToContentsIfNeeded();
260 #endif
261
262     WebContextMenu* contextMenu();
263     
264     bool hasLocalDataForURL(const WebCore::KURL&);
265     String cachedResponseMIMETypeForURL(const WebCore::KURL&);
266     
267     static bool canHandleRequest(const WebCore::ResourceRequest&);
268
269     class SandboxExtensionTracker {
270     public:
271         ~SandboxExtensionTracker();
272
273         void invalidate();
274
275         void beginLoad(WebFrame*, const SandboxExtension::Handle& handle);
276         void didStartProvisionalLoad(WebFrame*);
277         void didCommitProvisionalLoad(WebFrame*);
278         void didFailProvisionalLoad(WebFrame*);
279     private:
280         RefPtr<SandboxExtension> m_pendingProvisionalSandboxExtension;
281         RefPtr<SandboxExtension> m_provisionalSandboxExtension;
282         RefPtr<SandboxExtension> m_committedSandboxExtension;
283     };
284
285     SandboxExtensionTracker& sandboxExtensionTracker() { return m_sandboxExtensionTracker; }
286
287     static void getLocationAndLengthFromRange(WebCore::Range*, uint64_t& location, uint64_t& length);
288
289 #if PLATFORM(MAC)
290     void registerUIProcessAccessibilityTokens(const CoreIPC::DataReference& elemenToken, const CoreIPC::DataReference& windowToken);
291     AccessibilityWebPageObject* accessibilityRemoteObject();
292     WebCore::IntPoint accessibilityPosition() const { return m_accessibilityPosition; }    
293     
294     void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
295
296     void getMarkedRange(uint64_t& location, uint64_t& length);
297     void characterIndexForPoint(const WebCore::IntPoint point, uint64_t& result);
298     void firstRectForCharacterRange(uint64_t location, uint64_t length, WebCore::IntRect& resultRect);
299     void writeSelectionToPasteboard(const WTF::String& pasteboardName, const WTF::Vector<WTF::String>& pasteboardTypes, bool& result);
300 #elif PLATFORM(WIN)
301     void confirmComposition(const String& compositionString);
302     void setComposition(const WTF::String& compositionString, const WTF::Vector<WebCore::CompositionUnderline>& underlines, uint64_t cursorPosition);
303     void firstRectForCharacterInSelectedRange(const uint64_t characterPosition, WebCore::IntRect& resultRect);
304     void getSelectedText(WTF::String&);
305 #endif
306
307     // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
308     // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
309     void dummy(bool&);
310
311 #if PLATFORM(MAC)
312     void performDictionaryLookupForRange(DictionaryPopupInfo::Type, WebCore::Frame*, WebCore::Range*);
313
314     bool isSpeaking();
315     void speak(const String&);
316     void stopSpeaking();
317
318     bool isSmartInsertDeleteEnabled() const { return m_isSmartInsertDeleteEnabled; }
319 #endif
320
321     void replaceSelectionWithText(WebCore::Frame*, const String&);
322 #if PLATFORM(WIN)
323     void performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const WebCore::DragDataMap&, uint32_t flags);
324 #else
325     void performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const WTF::String& dragStorageName, uint32_t flags);
326 #endif
327     void dragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation);
328
329     void beginPrinting(uint64_t frameID, const PrintInfo&);
330     void endPrinting();
331     void computePagesForPrinting(uint64_t frameID, const PrintInfo&, uint64_t callbackID);
332 #if PLATFORM(MAC)
333     void drawRectToPDF(uint64_t frameID, const WebCore::IntRect&, uint64_t callbackID);
334     void drawPagesToPDF(uint64_t frameID, uint32_t first, uint32_t count, uint64_t callbackID);
335 #endif
336
337     bool mainFrameHasCustomRepresentation() const;
338
339     void didChangeScrollOffsetForMainFrame();
340
341     bool canRunBeforeUnloadConfirmPanel() const { return m_canRunBeforeUnloadConfirmPanel; }
342     void setCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel) { m_canRunBeforeUnloadConfirmPanel = canRunBeforeUnloadConfirmPanel; }
343
344     bool canRunModal() const { return m_canRunModal; }
345     void setCanRunModal(bool canRunModal) { m_canRunModal = canRunModal; }
346
347     void runModal();
348
349     void setMemoryCacheMessagesEnabled(bool);
350
351     void forceRepaintWithoutCallback();
352
353 private:
354     WebPage(uint64_t pageID, const WebPageCreationParameters&);
355
356     virtual Type type() const { return APIType; }
357
358     void platformInitialize();
359
360     void didReceiveWebPageMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
361     CoreIPC::SyncReplyMode didReceiveSyncWebPageMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*);
362
363     static const char* interpretKeyEvent(const WebCore::KeyboardEvent*);
364     bool performDefaultBehaviorForKeyEvent(const WebKeyboardEvent&);
365
366     String sourceForFrame(WebFrame*);
367
368     void loadData(PassRefPtr<WebCore::SharedBuffer>, const String& MIMEType, const String& encodingName, const WebCore::KURL& baseURL, const WebCore::KURL& failingURL);
369
370     bool platformHasLocalDataForURL(const WebCore::KURL&);
371
372     // Actions
373     void tryClose();
374     void loadURL(const String&, const SandboxExtension::Handle&);
375     void loadURLRequest(const WebCore::ResourceRequest&, const SandboxExtension::Handle&);
376     void loadHTMLString(const String& htmlString, const String& baseURL);
377     void loadAlternateHTMLString(const String& htmlString, const String& baseURL, const String& unreachableURL);
378     void loadPlainTextString(const String&);
379     void reload(bool reloadFromOrigin);
380     void goForward(uint64_t, const SandboxExtension::Handle&);
381     void goBack(uint64_t, const SandboxExtension::Handle&);
382     void goToBackForwardItem(uint64_t, const SandboxExtension::Handle&);
383     void setActive(bool);
384     void setFocused(bool);
385     void setInitialFocus(bool);
386     void setWindowResizerSize(const WebCore::IntSize&);
387     void setIsInWindow(bool);
388     void validateCommand(const String&);
389     void executeEditCommand(const String&);
390
391     void mouseEvent(const WebMouseEvent&);
392     void wheelEvent(const WebWheelEvent&);
393     void keyEvent(const WebKeyboardEvent&);
394 #if ENABLE(GESTURE_EVENTS)
395     void gestureEvent(const WebGestureEvent&);
396 #endif
397 #if ENABLE(TOUCH_EVENTS)
398     void touchEvent(const WebTouchEvent&);
399 #endif
400
401     uint64_t restoreSession(const SessionState&);
402     void restoreSessionAndNavigateToCurrentItem(const SessionState&, const SandboxExtension::Handle&);
403
404     void didRemoveBackForwardItem(uint64_t);
405
406     void setDrawsBackground(bool);
407     void setDrawsTransparentBackground(bool);
408
409     void viewWillStartLiveResize();
410     void viewWillEndLiveResize();
411
412     void getContentsAsString(uint64_t callbackID);
413     void getMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID);
414     void getResourceDataFromFrame(uint64_t frameID, const String& resourceURL, uint64_t callbackID);
415     void getRenderTreeExternalRepresentation(uint64_t callbackID);
416     void getSelectionOrContentsAsString(uint64_t callbackID);
417     void getSourceForFrame(uint64_t frameID, uint64_t callbackID);
418     void getWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID);
419     void runJavaScriptInMainFrame(const String&, uint64_t callbackID);
420     void forceRepaint(uint64_t callbackID);
421
422     void preferencesDidChange(const WebPreferencesStore&);
423     void platformPreferencesDidChange(const WebPreferencesStore&);
424     void updatePreferences(const WebPreferencesStore&);
425
426     void didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID);
427     void setUserAgent(const String&);
428     void setCustomTextEncodingName(const String&);
429
430 #if PLATFORM(MAC)
431     void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
432
433     void setWindowIsVisible(bool windowIsVisible);
434     void windowAndViewFramesChanged(const WebCore::IntRect& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates, const WebCore::IntPoint& accessibilityViewCoordinates);
435 #endif
436
437     void unapplyEditCommand(uint64_t commandID);
438     void reapplyEditCommand(uint64_t commandID);
439     void didRemoveEditCommand(uint64_t commandID);
440
441     void findString(const String&, uint32_t findOptions, uint32_t maxMatchCount);
442     void hideFindUI();
443     void countStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
444
445 #if PLATFORM(QT)
446     void findZoomableAreaForPoint(const WebCore::IntPoint&);
447 #endif
448
449     void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
450     void setTextForActivePopupMenu(int32_t index);
451
452     void didChooseFilesForOpenPanel(const Vector<String>&);
453     void didCancelForOpenPanel();
454 #if ENABLE(WEB_PROCESS_SANDBOX)
455     void extendSandboxForFileFromOpenPanel(const SandboxExtension::Handle&);
456 #endif
457
458     void didReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed);
459
460     void advanceToNextMisspelling(bool startBeforeSelection);
461     void changeSpellingToWord(const String& word);
462     void unmarkAllMisspellings();
463     void unmarkAllBadGrammar();
464 #if PLATFORM(MAC)
465     void uppercaseWord();
466     void lowercaseWord();
467     void capitalizeWord();
468
469     void setSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled) { m_isSmartInsertDeleteEnabled = isSmartInsertDeleteEnabled; }
470 #endif
471
472 #if ENABLE(CONTEXT_MENUS)
473     void didSelectItemFromActiveContextMenu(const WebContextMenuItemData&);
474 #endif
475
476     OwnPtr<WebCore::Page> m_page;
477     RefPtr<WebFrame> m_mainFrame;
478     RefPtr<InjectedBundleBackForwardList> m_backForwardList;
479
480     RefPtr<WebPageGroupProxy> m_pageGroup;
481
482     String m_userAgent;
483
484     WebCore::IntSize m_viewSize;
485     OwnPtr<DrawingArea> m_drawingArea;
486
487     bool m_drawsBackground;
488     bool m_drawsTransparentBackground;
489
490     bool m_isInRedo;
491     bool m_isClosed;
492
493     bool m_tabToLinks;
494
495 #if PLATFORM(MAC)
496     // Whether the containing window is visible or not.
497     bool m_windowIsVisible;
498
499     // Whether smart insert/delete is enabled or not.
500     bool m_isSmartInsertDeleteEnabled;
501
502     // The frame of the containing window in screen coordinates.
503     WebCore::IntRect m_windowFrameInScreenCoordinates;
504
505     // The frame of the view in window coordinates.
506     WebCore::IntRect m_viewFrameInWindowCoordinates;
507
508     // The accessibility position of the view.
509     WebCore::IntPoint m_accessibilityPosition;
510     
511     // All plug-in views on this web page.
512     HashSet<PluginView*> m_pluginViews;
513     
514     RetainPtr<AccessibilityWebPageObject> m_mockAccessibilityElement;
515 #elif PLATFORM(WIN)
516     // Our view's window (in the UI process).
517     HWND m_nativeWindow;
518 #endif
519     
520     HashMap<uint64_t, RefPtr<WebEditCommand> > m_editCommandMap;
521
522     WebCore::IntSize m_windowResizerSize;
523
524     InjectedBundlePageContextMenuClient m_contextMenuClient;
525     InjectedBundlePageEditorClient m_editorClient;
526     InjectedBundlePageFormClient m_formClient;
527     InjectedBundlePageLoaderClient m_loaderClient;
528     InjectedBundlePagePolicyClient m_policyClient;
529     InjectedBundlePageResourceLoadClient m_resourceLoadClient;
530     InjectedBundlePageUIClient m_uiClient;
531
532 #if ENABLE(TILED_BACKING_STORE)
533     WebCore::IntSize m_resizesToContentsLayoutSize;
534 #endif
535
536     FindController m_findController;
537     RefPtr<PageOverlay> m_pageOverlay;
538
539 #if ENABLE(INSPECTOR)
540     RefPtr<WebInspector> m_inspector;
541 #endif
542     RefPtr<WebPopupMenu> m_activePopupMenu;
543     RefPtr<WebContextMenu> m_contextMenu;
544     RefPtr<WebOpenPanelResultListener> m_activeOpenPanelResultListener;
545     GeolocationPermissionRequestManager m_geolocationPermissionRequestManager;
546
547     OwnPtr<WebCore::PrintContext> m_printContext;
548
549     SandboxExtensionTracker m_sandboxExtensionTracker;
550     uint64_t m_pageID;
551
552     bool m_canRunBeforeUnloadConfirmPanel;
553
554     bool m_canRunModal;
555     bool m_isRunningModal;
556
557     bool m_cachedMainFrameIsPinnedToLeftSide;
558     bool m_cachedMainFrameIsPinnedToRightSide;
559 };
560
561 } // namespace WebKit
562
563 #endif // WebPage_h