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