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