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