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