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