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