73299276693b9af46dd69972529c5f734769932c
[framework/web/webkit-efl.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 "ImmutableArray.h"
35 #if ENABLE(CONTEXT_MENUS)
36 #include "InjectedBundlePageContextMenuClient.h"
37 #endif
38 #include "InjectedBundlePageDiagnosticLoggingClient.h"
39 #include "InjectedBundlePageEditorClient.h"
40 #include "InjectedBundlePageFormClient.h"
41 #include "InjectedBundlePageFullScreenClient.h"
42 #include "InjectedBundlePageLoaderClient.h"
43 #include "InjectedBundlePagePolicyClient.h"
44 #include "InjectedBundlePageResourceLoadClient.h"
45 #include "InjectedBundlePageUIClient.h"
46 #include "MessageSender.h"
47 #include "TapHighlightController.h"
48 #include "Plugin.h"
49 #include "SandboxExtension.h"
50 #include "ShareableBitmap.h"
51 #include "WebHitTestResult.h"
52 #include "WebUndoStep.h"
53 #include <WebCore/DictationAlternative.h>
54 #include <WebCore/DragData.h>
55 #include <WebCore/Editor.h>
56 #include <WebCore/FrameLoaderTypes.h>
57 #include <WebCore/IntRect.h>
58 #include <WebCore/Page.h>
59 #if ENABLE(PAGE_VISIBILITY_API)
60 #include <WebCore/PageVisibilityState.h>
61 #endif
62 #include <WebCore/PlatformScreen.h>
63 #include <WebCore/ScrollTypes.h>
64 #include <WebCore/WebCoreKeyboardUIMode.h>
65 #include <wtf/HashMap.h>
66 #include <wtf/OwnPtr.h>
67 #include <wtf/PassRefPtr.h>
68 #include <wtf/RefPtr.h>
69 #include <wtf/text/WTFString.h>
70
71 #if PLATFORM(QT)
72 #include "ArgumentCodersQt.h"
73 #include "QtNetworkAccessManager.h"
74 #include "QtNetworkReply.h"
75 #include "QtNetworkReplyData.h"
76 #include "QtNetworkRequestData.h"
77 #include <QNetworkReply>
78 #include <QNetworkRequest>
79 #endif
80
81 #if PLATFORM(GTK)
82 #include "ArgumentCodersGtk.h"
83 #include "WebPageAccessibilityObject.h"
84 #include "WebPrintOperationGtk.h"
85 #endif
86
87 #if ENABLE(TOUCH_EVENTS)
88 #include <WebCore/PlatformTouchEvent.h>
89 #endif
90
91 #if PLATFORM(MAC)
92 #include "DictionaryPopupInfo.h"
93 #include "LayerHostingContext.h"
94 #include <wtf/RetainPtr.h>
95 OBJC_CLASS NSDictionary;
96 OBJC_CLASS NSObject;
97 OBJC_CLASS WKAccessibilityWebPageObject;
98 #endif
99
100 #if ENABLE(TIZEN_PAGE_VISIBILITY_API)
101 #include <WebCore/PageVisibilityState.h>
102 #endif
103
104 #if ENABLE(TIZEN_CUSTOM_HEADERS)
105 #include <WebCore/HTTPHeaderMap.h>
106 #endif
107
108 #if ENABLE(TIZEN_DATALIST_ELEMENT)
109 #include "HTMLDataListElement.h"
110 #endif
111
112 #if ENABLE(TIZEN_DRAG_SUPPORT)
113 #include "ArgumentCodersTizen.h"
114 #endif
115
116 #if ENABLE(TIZEN_SCREEN_READER)
117 #include "ScreenReader.h"
118 #endif
119
120 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
121 #include "EditorState.h"
122 #endif
123
124 namespace CoreIPC {
125     class ArgumentDecoder;
126     class Connection;
127     class MessageID;
128 }
129
130 namespace WebCore {
131     class GraphicsContext;
132     class Frame;
133     class FrameView;
134     class HTMLPlugInElement;
135     class KeyboardEvent;
136     class Page;
137     class PrintContext;
138     class Range;
139     class ResourceRequest;
140     class SharedBuffer;
141     class VisibleSelection;
142     struct KeypressCommand;
143
144 #if ENABLE(TIZEN_DATALIST_ELEMENT)
145     class HTMLDataListElement;
146 #endif
147 }
148
149 namespace WebKit {
150
151 class DrawingArea;
152 class InjectedBundleBackForwardList;
153 class NotificationPermissionRequestManager;
154 class PageOverlay;
155 class PluginView;
156 class SessionState;
157 class WebColorChooser;
158 class WebContextMenu;
159 class WebContextMenuItemData;
160 class WebEvent;
161 class WebFrame;
162 class WebFullScreenManager;
163 class WebImage;
164 class WebInspector;
165 class WebInspectorClient;
166 class WebKeyboardEvent;
167 class WebMouseEvent;
168 class WebNotificationClient;
169 class WebOpenPanelResultListener;
170 class WebPageGroupProxy;
171 class WebPopupMenu;
172 class WebWheelEvent;
173 struct AttributedString;
174 struct EditorState;
175 struct PrintInfo;
176 struct WebPageCreationParameters;
177 struct WebPreferencesStore;
178
179 #if ENABLE(WEB_INTENTS)
180 struct IntentData;
181 #endif
182
183 #if ENABLE(GESTURE_EVENTS)
184 class WebGestureEvent;
185 #endif
186
187 #if ENABLE(TOUCH_EVENTS)
188 class WebTouchEvent;
189 #endif
190
191 #if ENABLE(TIZEN_MEDIA_STREAM)
192 class UserMediaPermissionRequestManager;
193 class WebUserMediaClient;
194 #endif
195
196 #if ENABLE(TIZEN_ISF_PORT)
197 class NativeWebKeyboardEvent;
198 #endif
199
200 class WebPage : public APIObject, public CoreIPC::MessageSender<WebPage> {
201 public:
202     static const Type APIType = TypeBundlePage;
203
204     static PassRefPtr<WebPage> create(uint64_t pageID, const WebPageCreationParameters&);
205     virtual ~WebPage();
206
207     // Used by MessageSender.
208     CoreIPC::Connection* connection() const;
209     uint64_t destinationID() const { return pageID(); }
210
211     void close();
212
213     WebCore::Page* corePage() const { return m_page.get(); }
214     uint64_t pageID() const { return m_pageID; }
215
216     void setSize(const WebCore::IntSize&);
217     const WebCore::IntSize& size() const { return m_viewSize; }
218     WebCore::IntRect bounds() const { return WebCore::IntRect(WebCore::IntPoint(), size()); }
219     
220     InjectedBundleBackForwardList* backForwardList();
221     DrawingArea* drawingArea() const { return m_drawingArea.get(); }
222
223     WebPageGroupProxy* pageGroup() const { return m_pageGroup.get(); }
224
225     void scrollMainFrameIfNotAtMaxScrollPosition(const WebCore::IntSize& scrollOffset);
226
227     void scrollBy(uint32_t scrollDirection, uint32_t scrollGranularity);
228
229     void centerSelectionInVisibleArea();
230
231 #if PLATFORM(EFL)
232     void confirmComposition(const String& compositionString);
233     void setComposition(const WTF::String& compositionString, const WTF::Vector<WebCore::CompositionUnderline>& underlines, uint64_t cursorPosition);
234 #if ENABLE(TIZEN_TEXT_CARET_HANDLING_WK2)
235     bool setCaretPosition(const WebCore::IntPoint&);
236     void getCaretPosition(WebCore::IntRect&);
237 #endif
238 #if ENABLE(TIZEN_ISF_PORT)
239     void updateCursorOffset();
240     void didCancelComposition(WebCore::Node*);
241
242     void getCursorOffset(int&);
243     void getSurroundingTextAndCursorOffset(String&, int&);
244     void getSelectionRect(bool, WebCore::IntRect&);
245     void deleteSurroundingText(int, int);
246 #endif
247     void scrollMainFrameBy(const WebCore::IntSize&);
248     void scrollMainFrameTo(const WebCore::IntPoint&);
249     void createSnapshot(const WebCore::IntRect, float, ShareableBitmap::Handle&);
250     void requestUpdateFormNavigation();
251     void moveFocus(int newIndex);
252 #if ENABLE(TIZEN_MOBILE_WEB_PRINT)
253         void createPagesToPDF(const WebCore::IntSize&, const WebCore::IntSize&, const String&);
254 #endif
255 #if ENABLE(TIZEN_WEBKIT2_HIT_TEST)
256     void hitTestResultAtPoint(const WebCore::IntPoint&, int hitTestMode, WebHitTestResult::Data&);
257 #endif
258
259 #if ENABLE(TIZEN_WEB_STORAGE)
260     void getStorageQuotaBytes(uint64_t callbackID);
261     void setStorageQuotaBytes(uint32_t quota);
262 #endif
263
264 #if ENABLE(TIZEN_CLIPBOARD) || ENABLE(TIZEN_PASTEBOARD)
265     void setClipboardDataForPaste(const String& data, const String& type);
266 #endif
267
268     void suspendJavaScriptAndResources();
269     void resumeJavaScriptAndResources();
270 #if ENABLE(TIZEN_SYNC_REQUEST_ANIMATION_FRAME)
271     void suspendAnimationController();
272     void resumeAnimationController();
273 #endif
274 #if ENABLE(TIZEN_PLUGIN_SUSPEND_RESUME)
275     void suspendPlugin();
276     void resumePlugin();
277 #endif
278 #endif
279 #if ENABLE(TIZEN_WEBKIT2_REMOTE_WEB_INSPECTOR)
280     void startInspectorServer(uint32_t port,  uint32_t& assignedPort);
281     void stopInspectorServer(bool& result);
282 #endif
283 #if ENABLE(TIZEN_ORIENTATION_EVENTS)
284     void sendOrientationChangeEvent(int orientation);
285 #endif
286
287 #if ENABLE(INSPECTOR)
288     WebInspector* inspector();
289 #endif
290
291 #if ENABLE(FULLSCREEN_API)
292     WebFullScreenManager* fullScreenManager();
293 #endif
294
295     // -- Called by the DrawingArea.
296     // FIXME: We could genericize these into a DrawingArea client interface. Would that be beneficial?
297     void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect&);
298 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
299     void selectClosestWord(const WebCore::IntPoint&, bool isStartedTextSelectionFromOutside, bool& result);
300     void setLeftSelection(const WebCore::IntPoint&, bool& result);
301     void setRightSelection(const WebCore::IntPoint&, bool& result);
302     void getSelectionHandlers(WebCore::IntRect& leftRect, WebCore::IntRect& rightRect);
303     void getSelectionText(String& result);
304     void selectionRangeClear(bool& result);
305     void selectionClearAllSelection(WebCore::Frame* frame);
306 #endif
307
308 #if ENABLE(TIZEN_OFFLINE_PAGE_SAVE)
309     void startOfflinePageSave(String subresourceFolderName);
310 #endif
311
312 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_TEXT_SELECTION_MODE)
313     void selectLink(WebCore::IntPoint positionForSelection, bool& result);
314 #endif
315
316     void drawPageOverlay(WebCore::GraphicsContext&, const WebCore::IntRect&);
317     void layoutIfNeeded();
318 #if ENABLE(TIZEN_RECORDING_SURFACE_SET)
319     void recordingSurfaceSetEnableSet(bool enable);
320     void recordingSurfaceSetEnableURL(const String&);
321
322     bool recordingSurfaceEnabled() { return m_recordingSurfaceSetEnable; }
323
324     void setRecordingSurfaceLoadStart(bool enable) { m_recordingSurfaceSetLoadStart = enable; }
325     bool recordingSurfaceLoadStart() { return m_recordingSurfaceSetLoadStart; }
326
327     void setRecordingSurfaceLoadFinish(bool enable) { m_recordingSurfaceSetLoadFinished = enable; }
328     bool recordingSurfaceLoadFinish() { return m_recordingSurfaceSetLoadFinished; }
329 #endif
330
331     // -- Called from WebCore clients.
332 #if PLATFORM(MAC)
333     bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*, bool saveCommands);
334 #elif !PLATFORM(GTK)
335     bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*);
336 #endif
337
338     void show();
339     String userAgent() const { return m_userAgent; }
340     WebCore::IntRect windowResizerRect() const;
341     WebCore::KeyboardUIMode keyboardUIMode();
342
343     WebUndoStep* webUndoStep(uint64_t);
344     void addWebUndoStep(uint64_t, WebUndoStep*);
345     void removeWebEditCommand(uint64_t);
346     bool isInRedo() const { return m_isInRedo; }
347
348     void setActivePopupMenu(WebPopupMenu*);
349
350 #if ENABLE(INPUT_TYPE_COLOR)
351     WebColorChooser* activeColorChooser() const { return m_activeColorChooser; }
352     void setActiveColorChooser(WebColorChooser*);
353     void didChooseColor(const WebCore::Color&);
354     void didEndColorChooser();
355 #endif
356
357     WebOpenPanelResultListener* activeOpenPanelResultListener() const { return m_activeOpenPanelResultListener.get(); }
358     void setActiveOpenPanelResultListener(PassRefPtr<WebOpenPanelResultListener>);
359
360     // -- Called from WebProcess.
361     void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
362     void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&);
363
364     // -- InjectedBundle methods
365 #if ENABLE(CONTEXT_MENUS)
366     void initializeInjectedBundleContextMenuClient(WKBundlePageContextMenuClient*);
367 #endif
368     void initializeInjectedBundleEditorClient(WKBundlePageEditorClient*);
369     void initializeInjectedBundleFormClient(WKBundlePageFormClient*);
370     void initializeInjectedBundleLoaderClient(WKBundlePageLoaderClient*);
371     void initializeInjectedBundlePolicyClient(WKBundlePagePolicyClient*);
372     void initializeInjectedBundleResourceLoadClient(WKBundlePageResourceLoadClient*);
373     void initializeInjectedBundleUIClient(WKBundlePageUIClient*);
374 #if ENABLE(FULLSCREEN_API)
375     void initializeInjectedBundleFullScreenClient(WKBundlePageFullScreenClient*);
376 #endif
377     void initializeInjectedBundleDiagnosticLoggingClient(WKBundlePageDiagnosticLoggingClient*);
378
379 #if ENABLE(CONTEXT_MENUS)
380     InjectedBundlePageContextMenuClient& injectedBundleContextMenuClient() { return m_contextMenuClient; }
381 #endif
382     InjectedBundlePageEditorClient& injectedBundleEditorClient() { return m_editorClient; }
383     InjectedBundlePageFormClient& injectedBundleFormClient() { return m_formClient; }
384     InjectedBundlePageLoaderClient& injectedBundleLoaderClient() { return m_loaderClient; }
385     InjectedBundlePagePolicyClient& injectedBundlePolicyClient() { return m_policyClient; }
386     InjectedBundlePageResourceLoadClient& injectedBundleResourceLoadClient() { return m_resourceLoadClient; }
387     InjectedBundlePageUIClient& injectedBundleUIClient() { return m_uiClient; }
388     InjectedBundlePageDiagnosticLoggingClient& injectedBundleDiagnosticLoggingClient() { return m_logDiagnosticMessageClient; }
389 #if ENABLE(FULLSCREEN_API)
390     InjectedBundlePageFullScreenClient& injectedBundleFullScreenClient() { return m_fullScreenClient; }
391 #endif
392
393     void setUnderlayPage(PassRefPtr<WebPage> underlayPage) { m_underlayPage = underlayPage; }
394
395     bool findStringFromInjectedBundle(const String&, FindOptions);
396
397     WebFrame* mainWebFrame() const { return m_mainFrame.get(); }
398
399     WebCore::Frame* mainFrame() const; // May return 0.
400     WebCore::FrameView* mainFrameView() const; // May return 0.
401
402     PassRefPtr<Plugin> createPlugin(WebFrame*, WebCore::HTMLPlugInElement*, const Plugin::Parameters&);
403
404     EditorState editorState() const;
405 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
406     void setEditorState(const EditorState& editorState) { m_editorState = editorState;}
407 #endif
408
409     String renderTreeExternalRepresentation() const;
410     uint64_t renderTreeSize() const;
411     void setPaintedObjectsCounterThreshold(uint64_t);
412
413     void setTracksRepaints(bool);
414     bool isTrackingRepaints() const;
415     void resetTrackedRepaints();
416     PassRefPtr<ImmutableArray> trackedRepaintRects();
417
418     void executeEditingCommand(const String& commandName, const String& argument);
419     bool isEditingCommandEnabled(const String& commandName);
420     void clearMainFrameName();
421     void sendClose();
422
423     double textZoomFactor() const;
424     void setTextZoomFactor(double);
425     double pageZoomFactor() const;
426     void setPageZoomFactor(double);
427     void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
428     void windowScreenDidChange(uint64_t);
429     void setViewMode(WebCore::Page::ViewMode);
430
431     void scalePage(double scale, const WebCore::IntPoint& origin);
432     double pageScaleFactor() const;
433
434     void setUseFixedLayout(bool);
435     bool useFixedLayout() const { return m_useFixedLayout; }
436     void setFixedLayoutSize(const WebCore::IntSize&);
437
438     void setPaginationMode(uint32_t /* WebCore::Page::Pagination::Mode */);
439     void setPaginationBehavesLikeColumns(bool);
440     void setPageLength(double);
441     void setGapBetweenPages(double);
442
443     bool drawsBackground() const { return m_drawsBackground; }
444     bool drawsTransparentBackground() const { return m_drawsTransparentBackground; }
445
446     void stopLoading();
447     void stopLoadingFrame(uint64_t frameID);
448     void setDefersLoading(bool deferLoading);
449
450 #if USE(ACCELERATED_COMPOSITING)
451     void enterAcceleratedCompositingMode(WebCore::GraphicsLayer*);
452     void exitAcceleratedCompositingMode();
453 #endif
454
455     void addPluginView(PluginView*);
456     void removePluginView(PluginView*);
457
458 #if PLATFORM(MAC)
459     LayerHostingMode layerHostingMode() const { return m_layerHostingMode; }
460     void setLayerHostingMode(LayerHostingMode);
461
462     bool windowIsVisible() const { return m_windowIsVisible; }
463     void updatePluginsActiveAndFocusedState();
464     const WebCore::IntRect& windowFrameInScreenCoordinates() const { return m_windowFrameInScreenCoordinates; }
465     const WebCore::IntRect& viewFrameInWindowCoordinates() const { return m_viewFrameInWindowCoordinates; }
466 #elif PLATFORM(WIN)
467     HWND nativeWindow() const { return m_nativeWindow; }
468 #endif
469
470     bool windowIsFocused() const;
471     bool windowAndWebPageAreFocused() const;
472     void installPageOverlay(PassRefPtr<PageOverlay>);
473     void uninstallPageOverlay(PageOverlay*, bool fadeOut);
474     bool hasPageOverlay() const { return m_pageOverlay; }
475     WebCore::IntPoint screenToWindow(const WebCore::IntPoint&);
476     WebCore::IntRect windowToScreen(const WebCore::IntRect&);
477
478     PassRefPtr<WebImage> snapshotInViewCoordinates(const WebCore::IntRect&, ImageOptions);
479     PassRefPtr<WebImage> scaledSnapshotInViewCoordinates(const WebCore::IntRect&, double scaleFactor, ImageOptions);
480     PassRefPtr<WebImage> snapshotInDocumentCoordinates(const WebCore::IntRect&, ImageOptions);
481     PassRefPtr<WebImage> scaledSnapshotInDocumentCoordinates(const WebCore::IntRect&, double scaleFactor, ImageOptions);
482
483     static const WebEvent* currentEvent();
484
485     FindController& findController() { return m_findController; }
486 #if ENABLE(TOUCH_EVENTS) && PLATFORM(QT)
487     TapHighlightController& tapHighlightController() { return m_tapHighlightController; }
488 #endif
489
490 #if ENABLE(GEOLOCATION)
491     GeolocationPermissionRequestManager& geolocationPermissionRequestManager() { return m_geolocationPermissionRequestManager; }
492 #endif
493
494     NotificationPermissionRequestManager* notificationPermissionRequestManager();
495 #if ENABLE(TIZEN_MEDIA_STREAM)
496     UserMediaPermissionRequestManager* userMediaPermissionRequestManager();
497 #endif
498     void pageDidScroll();
499 #if USE(TILED_BACKING_STORE)
500     void pageDidRequestScroll(const WebCore::IntPoint&);
501
502 #if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
503     void pageDidRequestRestoreVisibleContentRect(const WebCore::IntPoint&, float);
504 #endif
505
506     void setFixedVisibleContentRect(const WebCore::IntRect&);
507     void setResizesToContentsUsingLayoutSize(const WebCore::IntSize&);
508     void resizeToContentsIfNeeded();
509     void sendViewportAttributesChanged();
510     void setViewportSize(const WebCore::IntSize&);
511     WebCore::IntSize viewportSize() const { return m_viewportSize; }
512
513 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
514     WebCore::IntSize contentsSize() const;
515 #endif
516
517 #endif
518
519 #if ENABLE(CONTEXT_MENUS)
520     WebContextMenu* contextMenu();
521 #endif
522     
523     bool hasLocalDataForURL(const WebCore::KURL&);
524     String cachedResponseMIMETypeForURL(const WebCore::KURL&);
525     String cachedSuggestedFilenameForURL(const WebCore::KURL&);
526     PassRefPtr<WebCore::SharedBuffer> cachedResponseDataForURL(const WebCore::KURL&);
527
528     static bool canHandleRequest(const WebCore::ResourceRequest&);
529
530     class SandboxExtensionTracker {
531     public:
532         ~SandboxExtensionTracker();
533
534         void invalidate();
535
536         void beginLoad(WebFrame*, const SandboxExtension::Handle& handle);
537         void willPerformLoadDragDestinationAction(PassRefPtr<SandboxExtension> pendingDropSandboxExtension);
538         void didStartProvisionalLoad(WebFrame*);
539         void didCommitProvisionalLoad(WebFrame*);
540         void didFailProvisionalLoad(WebFrame*);
541
542     private:
543         void setPendingProvisionalSandboxExtension(PassRefPtr<SandboxExtension>);
544
545         RefPtr<SandboxExtension> m_pendingProvisionalSandboxExtension;
546         RefPtr<SandboxExtension> m_provisionalSandboxExtension;
547         RefPtr<SandboxExtension> m_committedSandboxExtension;
548     };
549
550     SandboxExtensionTracker& sandboxExtensionTracker() { return m_sandboxExtensionTracker; }
551
552 #if PLATFORM(EFL)
553     void setThemePath(const String&);
554 #endif
555
556 #if PLATFORM(QT)
557     void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
558     void confirmComposition(const String& text, int64_t selectionStart, int64_t selectionLength);
559     void cancelComposition();
560 #endif
561
562 #if PLATFORM(MAC)
563     void registerUIProcessAccessibilityTokens(const CoreIPC::DataReference& elemenToken, const CoreIPC::DataReference& windowToken);
564     WKAccessibilityWebPageObject* accessibilityRemoteObject();
565     WebCore::IntPoint accessibilityPosition() const { return m_accessibilityPosition; }    
566     
567     void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
568
569     void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, EditorState& newState);
570     void confirmComposition(EditorState& newState);
571     void cancelComposition(EditorState& newState);
572     void insertText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, bool& handled, EditorState& newState);
573     void getMarkedRange(uint64_t& location, uint64_t& length);
574     void getSelectedRange(uint64_t& location, uint64_t& length);
575     void getAttributedSubstringFromRange(uint64_t location, uint64_t length, AttributedString&);
576     void characterIndexForPoint(const WebCore::IntPoint point, uint64_t& result);
577     void firstRectForCharacterRange(uint64_t location, uint64_t length, WebCore::IntRect& resultRect);
578     void executeKeypressCommands(const Vector<WebCore::KeypressCommand>&, bool& handled, EditorState& newState);
579     void readSelectionFromPasteboard(const WTF::String& pasteboardName, bool& result);
580     void getStringSelectionForPasteboard(WTF::String& stringValue);
581     void getDataSelectionForPasteboard(const WTF::String pasteboardType, SharedMemory::Handle& handle, uint64_t& size);
582     void shouldDelayWindowOrderingEvent(const WebKit::WebMouseEvent&, bool& result);
583     void acceptsFirstMouse(int eventNumber, const WebKit::WebMouseEvent&, bool& result);
584     bool performNonEditingBehaviorForSelector(const String&);
585     void insertDictatedText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, const Vector<WebCore::DictationAlternative>& dictationAlternativeLocations, bool& handled, EditorState& newState);
586 #elif PLATFORM(WIN)
587     void confirmComposition(const String& compositionString);
588     void setComposition(const WTF::String& compositionString, const WTF::Vector<WebCore::CompositionUnderline>& underlines, uint64_t cursorPosition);
589     void firstRectForCharacterInSelectedRange(const uint64_t characterPosition, WebCore::IntRect& resultRect);
590     void getSelectedText(WTF::String&);
591
592     void gestureWillBegin(const WebCore::IntPoint&, bool& canBeginPanning);
593     void gestureDidScroll(const WebCore::IntSize&);
594     void gestureDidEnd();
595
596 #elif PLATFORM(GTK)
597     void updateAccessibilityTree();
598     bool handleMousePressedEvent(const WebCore::PlatformMouseEvent&);
599 #if USE(TEXTURE_MAPPER_GL)
600     void widgetMapped(int64_t nativeWindowHandle);
601 #endif
602 #endif
603
604     void setCompositionForTesting(const String& compositionString, uint64_t from, uint64_t length);
605     bool hasCompositionForTesting();
606     void confirmCompositionForTesting(const String& compositionString);
607
608     // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
609     // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
610     void dummy(bool&);
611
612 #if PLATFORM(MAC)
613     void performDictionaryLookupForSelection(DictionaryPopupInfo::Type, WebCore::Frame*, const WebCore::VisibleSelection&);
614
615     bool isSpeaking();
616     void speak(const String&);
617     void stopSpeaking();
618
619     bool isSmartInsertDeleteEnabled() const { return m_isSmartInsertDeleteEnabled; }
620 #endif
621
622 #if ENABLE(WEB_INTENTS)
623     void deliverIntentToFrame(uint64_t frameID, const IntentData&);
624 #endif
625
626     void replaceSelectionWithText(WebCore::Frame*, const String&);
627     void clearSelection();
628
629 #if ENABLE(DRAG_SUPPORT)
630 #if PLATFORM(WIN)
631     void performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const WebCore::DragDataMap&, uint32_t flags);
632 #elif PLATFORM(QT) || PLATFORM(GTK)
633     void performDragControllerAction(uint64_t action, WebCore::DragData);
634 #else
635 #if ENABLE(TIZEN_DRAG_SUPPORT)
636     void performDragControllerAction(uint64_t action, WebCore::DragData);
637 #else
638     void performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const WTF::String& dragStorageName, uint32_t flags, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
639 #endif
640 #endif
641     void dragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation);
642
643     void willPerformLoadDragDestinationAction();
644     void mayPerformUploadDragDestinationAction();
645 #endif // ENABLE(DRAG_SUPPORT)
646
647     void beginPrinting(uint64_t frameID, const PrintInfo&);
648     void endPrinting();
649     void computePagesForPrinting(uint64_t frameID, const PrintInfo&, uint64_t callbackID);
650 #if PLATFORM(MAC) || PLATFORM(WIN)
651     void drawRectToPDF(uint64_t frameID, const PrintInfo&, const WebCore::IntRect&, uint64_t callbackID);
652     void drawPagesToPDF(uint64_t frameID, const PrintInfo&, uint32_t first, uint32_t count, uint64_t callbackID);
653 #elif PLATFORM(GTK)
654     void drawPagesForPrinting(uint64_t frameID, const PrintInfo&, uint64_t callbackID);
655 #endif
656
657 #if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
658     void getWebAppCapable(uint64_t callbackID);
659     void getWebAppIconURL(uint64_t callbackID);
660     void getWebAppIconURLs(uint64_t callbackID);
661 #endif
662
663     void setMediaVolume(float);
664
665     bool mainFrameHasCustomRepresentation() const;
666
667     void didChangeScrollOffsetForMainFrame();
668
669     void mainFrameDidLayout();
670
671     bool canRunBeforeUnloadConfirmPanel() const { return m_canRunBeforeUnloadConfirmPanel; }
672     void setCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel) { m_canRunBeforeUnloadConfirmPanel = canRunBeforeUnloadConfirmPanel; }
673
674     bool canRunModal() const { return m_canRunModal; }
675     void setCanRunModal(bool canRunModal) { m_canRunModal = canRunModal; }
676
677     void runModal();
678
679     void setDeviceScaleFactor(float);
680     float deviceScaleFactor() const;
681
682     void setMemoryCacheMessagesEnabled(bool);
683
684     void forceRepaintWithoutCallback();
685
686     void unmarkAllMisspellings();
687     void unmarkAllBadGrammar();
688 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
689     void handleAlternativeTextUIResult(const String&);
690 #endif
691
692     // For testing purpose.
693     void simulateMouseDown(int button, WebCore::IntPoint, int clickCount, WKEventModifiers, double time);
694     void simulateMouseUp(int button, WebCore::IntPoint, int clickCount, WKEventModifiers, double time);
695     void simulateMouseMotion(WebCore::IntPoint, double time);
696
697 #if ENABLE(CONTEXT_MENUS)
698     void contextMenuShowing() { m_isShowingContextMenu = true; }
699 #endif
700
701 #if PLATFORM(QT)
702     void registerApplicationScheme(const String& scheme);
703     void applicationSchemeReply(const QtNetworkReplyData&);
704     void receivedApplicationSchemeRequest(const QNetworkRequest&, QtNetworkReply*);
705     void setUserScripts(const Vector<String>&);
706 #endif
707     void wheelEvent(const WebWheelEvent&);
708 #if ENABLE(GESTURE_EVENTS)
709     void gestureEvent(const WebGestureEvent&);
710 #endif
711
712     void numWheelEventHandlersChanged(unsigned);
713     void recomputeShortCircuitHorizontalWheelEventsState();
714
715     bool willGoToBackForwardItemCallbackEnabled() const { return m_willGoToBackForwardItemCallbackEnabled; }
716
717 #if ENABLE(PAGE_VISIBILITY_API)
718     void setVisibilityState(int visibilityState, bool isInitialState);
719 #endif
720
721 #if ENABLE(TIZEN_INPUT_TAG_EXTENSION) || ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
722     void setFocusedInputElementValue(const String& inputValue);
723     void getFocusedInputElementValue(String& inputValue);
724 #endif
725
726 #if ENABLE(TIZEN_DATALIST_ELEMENT)
727     void getFocusedInputElementDataList(Vector<String>&);
728 #endif
729
730 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
731     void scrollOverflow(const WebCore::FloatPoint&, bool& scrolled);
732     void setPressedNodeAtPoint(const WebCore::IntPoint&, bool checkOverflowLayer, bool& pressed, uint32_t& id);
733 #endif
734
735 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION_ON_UI_SIDE)
736     void scrollOverflowWithTrajectoryVector(const WebCore::FloatPoint&);
737 #endif
738
739 #if ENABLE(TIZEN_CUSTOM_HEADERS)
740     void addCustomHeader(const String& name, const String& value);
741     void removeCustomHeader(const String& name);
742     void clearCustomHeaders();
743     WebCore::HTTPHeaderMap customHeaders();
744 #endif
745
746 #if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
747     void getTextStyleStateForSelection();
748 #endif
749
750 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
751     uint64_t nativeWindowHandle() { return m_nativeWindowHandle; }
752 #endif
753
754 #if ENABLE(TIZEN_MULTIPLE_SELECT)
755     void didChangeSelectedIndexForActivePopupMenuMultiple(Vector<int32_t>);
756 #endif
757
758 #if ENABLE(TIZEN_LINK_MAGNIFIER)
759     void getLinkMagnifierRect(const WebCore::IntPoint&, const WebCore::IntSize&);
760 #endif
761
762 #if ENABLE(TIZEN_SCREEN_READER)
763     void raiseTapEvent(const WebCore::IntPoint&, const WebCore::IntPoint&);
764     void moveScreenReaderFocus(bool, bool&);
765     void moveScreenReaderFocusByPoint(const WebCore::IntPoint&);
766     void recalcScreenReaderFocusRect();
767     void updateScreenReaderFocus(WebCore::RenderObject*);
768     void clearScreenReader();
769 #endif
770
771 #if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
772     void notifyTransitionToCommitted(bool);
773 #endif
774
775 #if ENABLE(TIZEN_CSP)
776     void setContentSecurityPolicy(const String& policy, uint32_t headerType);
777 #endif
778
779 #if ENABLE(TIZEN_INDEXED_DATABASE)
780     void setIndexedDatabaseDirectory(const String& path);
781 #endif
782
783 #if ENABLE(TIZEN_WEB_STORAGE)
784     void setLocalStorageDirectory(const String& path);
785 #endif
786
787 private:
788     WebPage(uint64_t pageID, const WebPageCreationParameters&);
789
790     virtual Type type() const { return APIType; }
791
792     void platformInitialize();
793
794     void didReceiveWebPageMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
795     void didReceiveSyncWebPageMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&);
796
797 #if !PLATFORM(MAC)
798     static const char* interpretKeyEvent(const WebCore::KeyboardEvent*);
799 #endif
800     bool performDefaultBehaviorForKeyEvent(const WebKeyboardEvent&);
801
802 #if PLATFORM(MAC)
803     bool executeKeypressCommandsInternal(const Vector<WebCore::KeypressCommand>&, WebCore::KeyboardEvent*);
804 #endif
805
806     String sourceForFrame(WebFrame*);
807
808     void loadData(PassRefPtr<WebCore::SharedBuffer>, const String& MIMEType, const String& encodingName, const WebCore::KURL& baseURL, const WebCore::KURL& failingURL);
809
810     bool platformHasLocalDataForURL(const WebCore::KURL&);
811
812     // Actions
813     void tryClose();
814     void loadURL(const String&, const SandboxExtension::Handle&);
815     void loadURLRequest(const WebCore::ResourceRequest&, const SandboxExtension::Handle&);
816     void loadHTMLString(const String& htmlString, const String& baseURL);
817     void loadAlternateHTMLString(const String& htmlString, const String& baseURL, const String& unreachableURL);
818     void loadPlainTextString(const String&);
819     void loadWebArchiveData(const CoreIPC::DataReference&);
820 #if OS(TIZEN)
821     void loadContentsbyMimeType(const CoreIPC::DataReference&, const String& mimeType, const String& encoding, const String& baseURL);
822 #endif
823     void linkClicked(const String& url, const WebMouseEvent&);
824     void reload(bool reloadFromOrigin, const SandboxExtension::Handle&);
825     void goForward(uint64_t);
826     void goBack(uint64_t);
827     void goToBackForwardItem(uint64_t);
828     void tryRestoreScrollPosition();
829     void setActive(bool);
830     void setFocused(bool);
831     void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&);
832     void setWindowResizerSize(const WebCore::IntSize&);
833     void setIsInWindow(bool);
834     void validateCommand(const String&, uint64_t);
835     void executeEditCommand(const String&);
836 #if OS(TIZEN)
837     void executeEditCommandWithArgument(const String& command, const String& argument);
838 #endif
839
840     void mouseEvent(const WebMouseEvent&);
841     void mouseEventSyncForTesting(const WebMouseEvent&, bool&);
842     void wheelEventSyncForTesting(const WebWheelEvent&, bool&);
843 #if ENABLE(TIZEN_ISF_PORT)
844     void keyEvent(const NativeWebKeyboardEvent&);
845 #else
846     void keyEvent(const WebKeyboardEvent&);
847 #endif
848     void keyEventSyncForTesting(const WebKeyboardEvent&, bool&);
849 #if ENABLE(TOUCH_EVENTS)
850     void touchEvent(const WebTouchEvent&);
851     void touchEventSyncForTesting(const WebTouchEvent&, bool& handled);
852 #if PLATFORM(QT)
853     void highlightPotentialActivation(const WebCore::IntPoint&, const WebCore::IntSize& area);
854 #endif
855 #endif
856 #if ENABLE(CONTEXT_MENUS)
857     void contextMenuHidden() { m_isShowingContextMenu = false; }
858 #endif
859
860     static void scroll(WebCore::Page*, WebCore::ScrollDirection, WebCore::ScrollGranularity);
861     static void logicalScroll(WebCore::Page*, WebCore::ScrollLogicalDirection, WebCore::ScrollGranularity);
862
863     uint64_t restoreSession(const SessionState&);
864     void restoreSessionAndNavigateToCurrentItem(const SessionState&);
865
866     void didRemoveBackForwardItem(uint64_t);
867
868     void setWillGoToBackForwardItemCallbackEnabled(bool enabled) { m_willGoToBackForwardItemCallbackEnabled = enabled; }
869     
870     void setDrawsBackground(bool);
871     void setDrawsTransparentBackground(bool);
872
873     void viewWillStartLiveResize();
874     void viewWillEndLiveResize();
875
876     void getContentsAsString(uint64_t callbackID);
877 #if ENABLE(MHTML)
878     void getContentsAsMHTMLData(uint64_t callbackID, bool useBinaryEncoding);
879 #endif
880     void getMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID);
881     void getResourceDataFromFrame(uint64_t frameID, const String& resourceURL, uint64_t callbackID);
882     void getRenderTreeExternalRepresentation(uint64_t callbackID);
883     void getSelectionOrContentsAsString(uint64_t callbackID);
884     void getSourceForFrame(uint64_t frameID, uint64_t callbackID);
885     void getWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID);
886     void runJavaScriptInMainFrame(const String&, uint64_t callbackID);
887     void forceRepaint(uint64_t callbackID);
888
889     void preferencesDidChange(const WebPreferencesStore&);
890     void platformPreferencesDidChange(const WebPreferencesStore&);
891     void updatePreferences(const WebPreferencesStore&);
892
893     void didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID);
894     void setUserAgent(const String&);
895     void setCustomTextEncodingName(const String&);
896     void suspendActiveDOMObjectsAndAnimations();
897     void resumeActiveDOMObjectsAndAnimations();
898
899 #if PLATFORM(MAC)
900     void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
901     void performDictionaryLookupForRange(DictionaryPopupInfo::Type, WebCore::Frame*, WebCore::Range*, NSDictionary *options);
902
903     void setWindowIsVisible(bool windowIsVisible);
904     void windowAndViewFramesChanged(const WebCore::IntRect& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates, const WebCore::IntPoint& accessibilityViewCoordinates);
905
906     RetainPtr<PDFDocument> pdfDocumentForPrintingFrame(WebCore::Frame*);
907     void computePagesForPrintingPDFDocument(uint64_t frameID, const PrintInfo&, Vector<WebCore::IntRect>& resultPageRects);
908     void drawRectToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, const WebCore::IntRect&);
909     void drawPagesToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, uint32_t first, uint32_t count);
910 #endif
911
912     void unapplyEditCommand(uint64_t commandID);
913     void reapplyEditCommand(uint64_t commandID);
914     void didRemoveEditCommand(uint64_t commandID);
915
916     void findString(const String&, uint32_t findOptions, uint32_t maxMatchCount);
917     void findStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
918     void getImageForFindMatch(uint32_t matchIndex);
919     void selectFindMatch(uint32_t matchIndex);
920     void hideFindUI();
921     void countStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
922
923 #if PLATFORM(QT) || OS(TIZEN)
924     void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize& area);
925 #endif
926
927     void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
928     void setTextForActivePopupMenu(int32_t index);
929
930 #if PLATFORM(GTK)
931     void failedToShowPopupMenu();
932 #endif
933 #if PLATFORM(QT)
934     void hidePopupMenu();
935     void selectedIndex(int32_t newIndex);
936 #endif
937
938     void didChooseFilesForOpenPanel(const Vector<String>&);
939     void didCancelForOpenPanel();
940 #if ENABLE(WEB_PROCESS_SANDBOX)
941     void extendSandboxForFileFromOpenPanel(const SandboxExtension::Handle&);
942 #endif
943
944     void didReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed);
945
946     void didReceiveNotificationPermissionDecision(uint64_t notificationID, bool allowed);
947 #if ENABLE(TIZEN_MEDIA_STREAM)
948     void didReceiveUserMediaPermissionDecision(uint64_t userMediaID, bool allowed);
949 #endif
950
951     void advanceToNextMisspelling(bool startBeforeSelection);
952     void changeSpellingToWord(const String& word);
953 #if USE(APPKIT)
954     void uppercaseWord();
955     void lowercaseWord();
956     void capitalizeWord();
957 #endif
958
959 #if PLATFORM(MAC)
960     void setSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled) { m_isSmartInsertDeleteEnabled = isSmartInsertDeleteEnabled; }
961 #endif
962
963 #if ENABLE(CONTEXT_MENUS)
964     void didSelectItemFromActiveContextMenu(const WebContextMenuItemData&);
965 #endif
966
967     void changeSelectedIndex(int32_t index);
968     void setCanStartMediaTimerFired();
969
970     static bool platformCanHandleRequest(const WebCore::ResourceRequest&);
971 #if ENABLE(TIZEN_NATIVE_MEMORY_SNAPSHOT)
972     void dumpMemorySnapshot();
973 #endif
974     OwnPtr<WebCore::Page> m_page;
975     RefPtr<WebFrame> m_mainFrame;
976     RefPtr<InjectedBundleBackForwardList> m_backForwardList;
977
978     RefPtr<WebPageGroupProxy> m_pageGroup;
979
980     String m_userAgent;
981
982     WebCore::IntSize m_viewSize;
983     OwnPtr<DrawingArea> m_drawingArea;
984
985     HashSet<PluginView*> m_pluginViews;
986
987     bool m_useFixedLayout;
988
989     bool m_drawsBackground;
990     bool m_drawsTransparentBackground;
991
992     bool m_isInRedo;
993     bool m_isClosed;
994
995     bool m_tabToLinks;
996 #if ENABLE(TIZEN_CUSTOM_HEADERS)
997     WebCore::HTTPHeaderMap m_customHeaders;
998 #endif
999
1000 #if PLATFORM(MAC)
1001     // Whether the containing window is visible or not.
1002     bool m_windowIsVisible;
1003
1004     // Whether smart insert/delete is enabled or not.
1005     bool m_isSmartInsertDeleteEnabled;
1006
1007     // The frame of the containing window in screen coordinates.
1008     WebCore::IntRect m_windowFrameInScreenCoordinates;
1009
1010     // The frame of the view in window coordinates.
1011     WebCore::IntRect m_viewFrameInWindowCoordinates;
1012
1013     // The accessibility position of the view.
1014     WebCore::IntPoint m_accessibilityPosition;
1015     
1016     // The layer hosting mode.
1017     LayerHostingMode m_layerHostingMode;
1018
1019     RetainPtr<WKAccessibilityWebPageObject> m_mockAccessibilityElement;
1020
1021     WebCore::KeyboardEvent* m_keyboardEventBeingInterpreted;
1022
1023 #elif PLATFORM(WIN)
1024     // Our view's window (in the UI process).
1025     HWND m_nativeWindow;
1026
1027     RefPtr<WebCore::Node> m_gestureTargetNode;
1028 #elif PLATFORM(GTK)
1029     WebPageAccessibilityObject* m_accessibilityObject;
1030
1031 #if USE(TEXTURE_MAPPER_GL)
1032     // Our view's window in the UI process.
1033     uint64_t m_nativeWindowHandle;
1034 #endif
1035 #endif
1036     
1037     WebCore::RunLoop::Timer<WebPage> m_setCanStartMediaTimer;
1038
1039     HashMap<uint64_t, RefPtr<WebUndoStep> > m_undoStepMap;
1040
1041     WebCore::IntSize m_windowResizerSize;
1042
1043 #if ENABLE(CONTEXT_MENUS)
1044     InjectedBundlePageContextMenuClient m_contextMenuClient;
1045 #endif
1046     InjectedBundlePageEditorClient m_editorClient;
1047     InjectedBundlePageFormClient m_formClient;
1048     InjectedBundlePageLoaderClient m_loaderClient;
1049     InjectedBundlePagePolicyClient m_policyClient;
1050     InjectedBundlePageResourceLoadClient m_resourceLoadClient;
1051     InjectedBundlePageUIClient m_uiClient;
1052 #if ENABLE(FULLSCREEN_API)
1053     InjectedBundlePageFullScreenClient m_fullScreenClient;
1054 #endif
1055     InjectedBundlePageDiagnosticLoggingClient m_logDiagnosticMessageClient;
1056
1057 #if USE(TILED_BACKING_STORE)
1058     WebCore::IntSize m_viewportSize;
1059 #endif
1060
1061     FindController m_findController;
1062 #if ENABLE(TOUCH_EVENTS) && PLATFORM(QT)
1063     TapHighlightController m_tapHighlightController;
1064 #endif
1065     RefPtr<PageOverlay> m_pageOverlay;
1066
1067     RefPtr<WebPage> m_underlayPage;
1068
1069 #if ENABLE(INSPECTOR)
1070     RefPtr<WebInspector> m_inspector;
1071 #endif
1072 #if ENABLE(FULLSCREEN_API)
1073     RefPtr<WebFullScreenManager> m_fullScreenManager;
1074 #endif
1075     RefPtr<WebPopupMenu> m_activePopupMenu;
1076 #if ENABLE(CONTEXT_MENUS)
1077     RefPtr<WebContextMenu> m_contextMenu;
1078 #endif
1079 #if ENABLE(INPUT_TYPE_COLOR)
1080     WebColorChooser* m_activeColorChooser;
1081 #endif
1082     RefPtr<WebOpenPanelResultListener> m_activeOpenPanelResultListener;
1083     RefPtr<NotificationPermissionRequestManager> m_notificationPermissionRequestManager;
1084 #if ENABLE(TIZEN_MEDIA_STREAM)
1085     RefPtr<UserMediaPermissionRequestManager> m_userMediaPermissionRequestManager;
1086 #endif
1087
1088 #if ENABLE(GEOLOCATION)
1089     GeolocationPermissionRequestManager m_geolocationPermissionRequestManager;
1090 #endif
1091
1092     OwnPtr<WebCore::PrintContext> m_printContext;
1093 #if PLATFORM(GTK)
1094     RefPtr<WebPrintOperationGtk> m_printOperation;
1095 #endif
1096
1097     SandboxExtensionTracker m_sandboxExtensionTracker;
1098     uint64_t m_pageID;
1099
1100     RefPtr<SandboxExtension> m_pendingDropSandboxExtension;
1101     Vector<RefPtr<SandboxExtension> > m_pendingDropExtensionsForFileUpload;
1102
1103     bool m_canRunBeforeUnloadConfirmPanel;
1104
1105     bool m_canRunModal;
1106     bool m_isRunningModal;
1107
1108     bool m_cachedMainFrameIsPinnedToLeftSide;
1109     bool m_cachedMainFrameIsPinnedToRightSide;
1110     bool m_canShortCircuitHorizontalWheelEvents;
1111     unsigned m_numWheelEventHandlers;
1112
1113     unsigned m_cachedPageCount;
1114
1115 #if ENABLE(CONTEXT_MENUS)
1116     bool m_isShowingContextMenu;
1117 #endif
1118     
1119     bool m_willGoToBackForwardItemCallbackEnabled;
1120
1121 #if PLATFORM(WIN)
1122     bool m_gestureReachedScrollingLimit;
1123 #endif
1124
1125 #if PLATFORM(QT)
1126     HashMap<String, QtNetworkReply*> m_applicationSchemeReplies;
1127 #endif
1128 #if ENABLE(PAGE_VISIBILITY_API)
1129     WebCore::PageVisibilityState m_visibilityState;
1130 #endif
1131 #if ENABLE(TIZEN_RECORDING_SURFACE_SET)
1132     bool m_recordingSurfaceSetEnable;
1133     bool m_recordingSurfaceSetLoadStart;
1134     bool m_recordingSurfaceSetLoadFinished;
1135     bool m_recordingSurfaceSetSettings;
1136 #endif
1137 #if ENABLE(TIZEN_SYNC_REQUEST_ANIMATION_FRAME)
1138     bool m_suspendedAnimationController;
1139 #endif
1140
1141     WebInspectorClient* m_inspectorClient;
1142
1143 #if ENABLE(TIZEN_SCREEN_READER)
1144     OwnPtr<ScreenReader> m_screenReader;
1145 #endif
1146
1147 #if ENABLE(TIZEN_ISF_PORT)
1148     bool m_isSettingComposition;
1149 #endif
1150
1151 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
1152     EditorState m_editorState;
1153 #endif
1154 };
1155
1156 #if ENABLE(TIZEN_NATIVE_MEMORY_SNAPSHOT)
1157 void dumpMemorySnapshot();
1158 #endif
1159
1160 } // namespace WebKit
1161
1162 #endif // WebPage_h