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