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