upload tizen_2.1 source
[framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / WebPageProxy.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 WebPageProxy_h
27 #define WebPageProxy_h
28
29 #include "APIObject.h"
30 #include "Connection.h"
31 #include "DragControllerAction.h"
32 #include "DrawingAreaProxy.h"
33 #include "EditorState.h"
34 #include "GeolocationPermissionRequestManagerProxy.h"
35 #if ENABLE(TOUCH_EVENTS)
36 #include "NativeWebTouchEvent.h"
37 #endif
38 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
39 #include "NativeWebKeyboardEvent.h"
40 #endif
41 #if PLATFORM(QT)
42 #include "QtNetworkRequestData.h"
43 #endif
44 #include "LayerTreeContext.h"
45 #include "NotificationPermissionRequestManagerProxy.h"
46 #include "PlatformProcessIdentifier.h"
47 #include "SandboxExtension.h"
48 #include "ShareableBitmap.h"
49 #include "WKBase.h"
50 #include "WKPagePrivate.h"
51 #include "WebColorChooserProxy.h"
52 #include "WebContextMenuItemData.h"
53 #include "WebCoreArgumentCoders.h"
54 #include "WebFindClient.h"
55 #include "WebFormClient.h"
56 #include "WebFrameProxy.h"
57 #include "WebFullScreenManagerProxy.h"
58 #include "WebHistoryClient.h"
59 #include "WebHitTestResult.h"
60 #include "WebLoaderClient.h"
61 #include "WebPageContextMenuClient.h"
62 #include "WebPolicyClient.h"
63 #include "WebPopupMenuProxy.h"
64 #include "WebResourceLoadClient.h"
65 #include "WebUIClient.h"
66 #include <WebCore/AlternativeTextClient.h>
67 #include <WebCore/Color.h>
68 #include <WebCore/DragActions.h>
69 #include <WebCore/DragSession.h>
70 #include <WebCore/HitTestResult.h>
71 #include <WebCore/Page.h>
72 #include <WebCore/PlatformScreen.h>
73 #include <WebCore/ScrollTypes.h>
74 #include <WebCore/TextChecking.h>
75 #include <wtf/HashMap.h>
76 #include <wtf/HashSet.h>
77 #include <wtf/OwnPtr.h>
78 #include <wtf/PassOwnPtr.h>
79 #include <wtf/PassRefPtr.h>
80 #include <wtf/RefPtr.h>
81 #include <wtf/Vector.h>
82 #include <wtf/text/WTFString.h>
83
84 #if ENABLE(DRAG_SUPPORT)
85 #include <WebCore/DragActions.h>
86 #include <WebCore/DragSession.h>
87 #endif
88
89 #if PLATFORM(EFL)
90 #include <Evas.h>
91 #include <Ecore_IMF_Evas.h>
92 #endif
93
94 #if OS(TIZEN)
95 #include "WebPageProxyMessages.h"
96 #include "WebTizenClient.h"
97 #include <WebCore/Color.h>
98 #endif
99
100 #if ENABLE(TIZEN_MEDIA_STREAM)
101 #include "UserMediaPermissionRequestManagerProxy.h"
102 #endif
103
104 #if ENABLE(TIZEN_OFFLINE_PAGE_SAVE)
105 #include "WebSubresourceTizen.h"
106 #endif
107
108 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
109 #include "WebLayerTreeInfo.h"
110 #endif
111
112 #if ENABLE(TIZEN_CSP)
113 #include <WebCore/ContentSecurityPolicy.h>
114 #endif
115
116 namespace CoreIPC {
117     class ArgumentDecoder;
118     class Connection;
119     class MessageID;
120 }
121
122 namespace WebCore {
123     class AuthenticationChallenge;
124     class Cursor;
125     class DragData;
126     class FloatRect;
127     class IntSize;
128     class ProtectionSpace;
129     struct FileChooserSettings;
130     struct TextAlternativeWithRange;
131     struct TextCheckingResult;
132     struct ViewportAttributes;
133     struct WindowFeatures;
134 }
135
136 #if PLATFORM(QT)
137 class QQuickNetworkReply;
138 #endif
139
140 #if USE(APPKIT)
141 #ifdef __OBJC__
142 @class WKView;
143 #else
144 class WKView;
145 #endif
146 #endif
147
148 #if ENABLE(WEB_INTENTS)
149 class WebIntentData;
150 #endif
151
152 namespace WebKit {
153
154 #if !ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
155 class NativeWebKeyboardEvent;
156 #endif
157 class NativeWebMouseEvent;
158 class NativeWebWheelEvent;
159 class PageClient;
160 class PlatformCertificateInfo;
161 class StringPairVector;
162 class WebBackForwardList;
163 class WebBackForwardListItem;
164 #if ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
165 class WebColorPickerResultListenerProxy;
166 #endif
167 class WebContextMenuProxy;
168 class WebData;
169 class WebEditCommandProxy;
170 class WebKeyboardEvent;
171 class WebMouseEvent;
172 class WebOpenPanelResultListenerProxy;
173 class WebPageGroup;
174 class WebProcessProxy;
175 #if ENABLE(TIZEN_OFFLINE_PAGE_SAVE)
176 class WebSubresourceTizen;
177 #endif
178 class WebURLRequest;
179 class WebWheelEvent;
180 struct AttributedString;
181 struct ColorSpaceData;
182 struct DictionaryPopupInfo;
183 struct EditorState;
184 struct PlatformPopupMenuData;
185 struct PrintInfo;
186 struct WebPageCreationParameters;
187 struct WebPopupItem;
188
189 #if PLATFORM(WIN)
190 struct WindowGeometry;
191 #endif
192
193 #if ENABLE(GESTURE_EVENTS)
194 class WebGestureEvent;
195 #endif
196
197 #if ENABLE(WEB_INTENTS)
198 struct IntentData;
199 #endif
200
201 #if ENABLE(WEB_INTENTS_TAG)
202 struct IntentServiceInfo;
203 #endif
204
205 typedef GenericCallback<WKStringRef, StringImpl*> StringCallback;
206 typedef GenericCallback<WKSerializedScriptValueRef, WebSerializedScriptValue*> ScriptValueCallback;
207 #if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
208 typedef GenericCallback<WKBooleanRef> BooleanCallback;
209 #endif
210 #if ENABLE(TIZEN_WEB_STORAGE)
211 #if ENABLE(TIZEN_WEBKIT2_NUMBER_TYPE_SUPPORT)
212 typedef GenericCallback<WKUInt32Ref> WebStorageQuotaCallback;
213 #endif
214 #endif
215
216 #if PLATFORM(GTK)
217 typedef GenericCallback<WKErrorRef> PrintFinishedCallback;
218 #endif
219
220 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
221 template<typename T>
222 struct QueuedUIEvents {
223     QueuedUIEvents(const T& event)
224         : forwardedEvent(event)
225     {
226     }
227     T forwardedEvent;
228     Vector<T> deferredEvents;
229 };
230 #else
231 #if ENABLE(TOUCH_EVENTS)
232 struct QueuedTouchEvents {
233     QueuedTouchEvents(const NativeWebTouchEvent& event)
234         : forwardedEvent(event)
235     {
236     }
237     NativeWebTouchEvent forwardedEvent;
238     Vector<NativeWebTouchEvent> deferredTouchEvents;
239 };
240 #endif
241 #endif
242
243 // FIXME: Make a version of CallbackBase with three arguments, and define ValidateCommandCallback as a specialization.
244 class ValidateCommandCallback : public CallbackBase {
245 public:
246     typedef void (*CallbackFunction)(WKStringRef, bool, int32_t, WKErrorRef, void*);
247
248     static PassRefPtr<ValidateCommandCallback> create(void* context, CallbackFunction callback)
249     {
250         return adoptRef(new ValidateCommandCallback(context, callback));
251     }
252
253     virtual ~ValidateCommandCallback()
254     {
255         ASSERT(!m_callback);
256     }
257
258     void performCallbackWithReturnValue(StringImpl* returnValue1, bool returnValue2, int returnValue3)
259     {
260         ASSERT(m_callback);
261
262         m_callback(toAPI(returnValue1), returnValue2, returnValue3, 0, context());
263
264         m_callback = 0;
265     }
266     
267     void invalidate()
268     {
269         ASSERT(m_callback);
270
271         RefPtr<WebError> error = WebError::create();
272         m_callback(0, 0, 0, toAPI(error.get()), context());
273         
274         m_callback = 0;
275     }
276
277 private:
278
279     ValidateCommandCallback(void* context, CallbackFunction callback)
280         : CallbackBase(context)
281         , m_callback(callback)
282     {
283     }
284
285     CallbackFunction m_callback;
286 };
287
288 class WebPageProxy
289     : public APIObject
290 #if ENABLE(INPUT_TYPE_COLOR)
291     , public WebColorChooserProxy::Client
292 #endif
293     , public WebPopupMenuProxy::Client {
294 public:
295     static const Type APIType = TypePage;
296
297     static PassRefPtr<WebPageProxy> create(PageClient*, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID);
298     virtual ~WebPageProxy();
299
300     uint64_t pageID() const { return m_pageID; }
301
302     WebFrameProxy* mainFrame() const { return m_mainFrame.get(); }
303     WebFrameProxy* focusedFrame() const { return m_focusedFrame.get(); }
304     WebFrameProxy* frameSetLargestFrame() const { return m_frameSetLargestFrame.get(); }
305
306     DrawingAreaProxy* drawingArea() const { return m_drawingArea.get(); }
307
308     WebBackForwardList* backForwardList() const { return m_backForwardList.get(); }
309
310 #if ENABLE(INSPECTOR)
311     WebInspectorProxy* inspector();
312 #endif
313
314 #if ENABLE(FULLSCREEN_API)
315     WebFullScreenManagerProxy* fullScreenManager();
316 #endif
317
318 #if ENABLE(CONTEXT_MENUS)
319     void initializeContextMenuClient(const WKPageContextMenuClient*);
320 #endif
321     void initializeFindClient(const WKPageFindClient*);
322     void initializeFormClient(const WKPageFormClient*);
323     void initializeLoaderClient(const WKPageLoaderClient*);
324     void initializePolicyClient(const WKPagePolicyClient*);
325     void initializeResourceLoadClient(const WKPageResourceLoadClient*);
326     void initializeUIClient(const WKPageUIClient*);
327 #if OS(TIZEN)
328     void initializeTizenClient(const WKPageTizenClient*);
329 #endif
330
331     void initializeWebPage();
332
333     void close();
334     bool tryClose();
335     bool isClosed() const { return m_isClosed; }
336
337     void loadURL(const String&);
338     void loadURLRequest(WebURLRequest*);
339     void loadHTMLString(const String& htmlString, const String& baseURL);
340     void loadAlternateHTMLString(const String& htmlString, const String& baseURL, const String& unreachableURL);
341     void loadPlainTextString(const String& string);
342     void loadWebArchiveData(const WebData*);
343 #if OS(TIZEN)
344     void loadContentsbyMimeType(const WebData*, const String& mimeType, const String& encoding, const String& baseURL);
345 #endif
346
347     void stopLoading();
348     void reload(bool reloadFromOrigin);
349
350     void goForward();
351     bool canGoForward() const;
352     void goBack();
353     bool canGoBack() const;
354
355     void goToBackForwardItem(WebBackForwardListItem*);
356     void tryRestoreScrollPosition();
357     void didChangeBackForwardList(WebBackForwardListItem* addedItem, Vector<RefPtr<APIObject> >* removedItems);
358     void shouldGoToBackForwardListItem(uint64_t itemID, bool& shouldGoToBackForwardListItem);
359     void willGoToBackForwardListItem(uint64_t itemID, CoreIPC::ArgumentDecoder* arguments);
360
361     String activeURL() const;
362     String provisionalURL() const;
363     String committedURL() const;
364
365     bool willHandleHorizontalScrollEvents() const;
366
367     bool canShowMIMEType(const String& mimeType) const;
368
369     bool drawsBackground() const { return m_drawsBackground; }
370     void setDrawsBackground(bool);
371
372     bool drawsTransparentBackground() const { return m_drawsTransparentBackground; }
373     void setDrawsTransparentBackground(bool);
374
375     void viewWillStartLiveResize();
376     void viewWillEndLiveResize();
377
378     void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&);
379     void setWindowResizerSize(const WebCore::IntSize&);
380     
381     void clearSelection();
382
383     void setViewNeedsDisplay(const WebCore::IntRect&);
384     void displayView();
385     void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
386
387     enum {
388         ViewWindowIsActive = 1 << 0,
389         ViewIsFocused = 1 << 1,
390         ViewIsVisible = 1 << 2,
391         ViewIsInWindow = 1 << 3,
392     };
393     typedef unsigned ViewStateFlags;
394     void viewStateDidChange(ViewStateFlags flags);
395
396     WebCore::IntSize viewSize() const;
397     bool isViewVisible() const { return m_isVisible; }
398     bool isViewWindowActive() const;
399
400     void executeEditCommand(const String& commandName);
401 #if OS(TIZEN)
402     void executeEditCommandWithArgument(const String& commandName, const String& argument);
403 #endif
404     void validateCommand(const String& commandName, PassRefPtr<ValidateCommandCallback>);
405
406     const EditorState& editorState() const { return m_editorState; }
407     bool canDelete() const { return hasSelectedRange() && isContentEditable(); }
408     bool hasSelectedRange() const { return m_editorState.selectionIsRange; }
409     bool isContentEditable() const { return m_editorState.isContentEditable; }
410     
411     bool maintainsInactiveSelection() const { return m_maintainsInactiveSelection; }
412     void setMaintainsInactiveSelection(bool);
413 #if PLATFORM(QT)
414     void registerApplicationScheme(const String& scheme);
415     void resolveApplicationSchemeRequest(QtNetworkRequestData);
416     void sendApplicationSchemeReply(const QQuickNetworkReply*);
417     void authenticationRequiredRequest(const String& hostname, const String& realm, const String& prefilledUsername, String& username, String& password);
418     void certificateVerificationRequest(const String& hostname, bool& ignoreErrors);
419     void proxyAuthenticationRequiredRequest(const String& hostname, uint16_t port, const String& prefilledUsername, String& username, String& password);
420     void setUserScripts(const Vector<String>&);
421 #endif // PLATFORM(QT).
422 #if PLATFORM(EFL)
423     void setThemePath(const String&);
424 #endif
425
426 #if PLATFORM(QT)
427     void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
428     void confirmComposition(const String& compositionString, int64_t selectionStart, int64_t selectionLength);
429     void cancelComposition();
430 #endif
431 #if PLATFORM(MAC)
432     void updateWindowIsVisible(bool windowIsVisible);
433     void windowAndViewFramesChanged(const WebCore::IntRect& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates, const WebCore::IntPoint& accessibilityViewCoordinates);
434
435     void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
436     void confirmComposition();
437     void cancelComposition();
438     bool insertText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
439     bool insertDictatedText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, const Vector<WebCore::TextAlternativeWithRange>& dictationAlternatives);
440     void getMarkedRange(uint64_t& location, uint64_t& length);
441     void getSelectedRange(uint64_t& location, uint64_t& length);
442     void getAttributedSubstringFromRange(uint64_t location, uint64_t length, AttributedString&);
443     uint64_t characterIndexForPoint(const WebCore::IntPoint);
444     WebCore::IntRect firstRectForCharacterRange(uint64_t, uint64_t);
445     bool executeKeypressCommands(const Vector<WebCore::KeypressCommand>&);
446
447     void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
448     CGContextRef containingWindowGraphicsContext();
449     bool shouldDelayWindowOrderingForEvent(const WebMouseEvent&);
450     bool acceptsFirstMouse(int eventNumber, const WebMouseEvent&);
451     
452 #if USE(APPKIT)
453     WKView* wkView() const;
454 #endif
455 #endif
456 #if PLATFORM(WIN)
457     void didChangeCompositionSelection(bool);
458     void confirmComposition(const String&);
459     void setComposition(const String&, Vector<WebCore::CompositionUnderline>&, int);
460     WebCore::IntRect firstRectForCharacterInSelectedRange(int);
461     String getSelectedText();
462
463     bool gestureWillBegin(const WebCore::IntPoint&);
464     void gestureDidScroll(const WebCore::IntSize&);
465     void gestureDidEnd();
466
467     void setGestureReachedScrollingLimit(bool);
468
469     HWND nativeWindow() const;
470 #endif
471 #if PLATFORM(GTK)
472     GtkWidget* viewWidget();
473 #endif
474 #if PLATFORM(EFL)
475     Evas_Object* viewWidget();
476 #endif
477
478 #if OS(TIZEN)
479     void confirmComposition(const String&);
480 #if ENABLE(TIZEN_REDUCE_KEY_LAGGING)
481     static Eina_Bool pageContentResumeTimerFired(void* data);
482 #endif
483     void setComposition(const String&, Vector<WebCore::CompositionUnderline>&, int);
484     void handleInputMethodKeydown(bool&);
485 #if ENABLE(TIZEN_TEXT_CARET_HANDLING_WK2)
486     void setCaretPosition(const WebCore::IntPoint&);
487     void getCaretPosition(WebCore::IntRect&);
488 #endif
489     bool scrollMainFrameBy(const WebCore::IntSize&);
490     void scrollMainFrameTo(const WebCore::IntPoint&);
491     WebCore::IntPoint& scrollPosition() { return m_scrollPosition; }
492     WebCore::IntSize& contentsSize() { return m_contentsSize; }
493     PassRefPtr<WebImage> createSnapshot(const WebCore::IntRect&, float);
494
495     void requestUpdateFormNavigation();
496     void moveFocus(int);
497     void updateFormNavigation(int length, int offset);
498     void focusedNodeChanged(const WebCore::IntRect&);
499
500 #if ENABLE(TIZEN_WEB_STORAGE)
501 #if ENABLE(TIZEN_WEBKIT2_NUMBER_TYPE_SUPPORT)
502     void getWebStorageQuotaBytes(PassRefPtr<WebStorageQuotaCallback>);
503     void didGetWebStorageQuotaBytes(const uint32_t quota, uint64_t callbackID);
504 #endif
505     void setWebStorageQuotaBytes(uint32_t quota);
506 #endif
507
508 #if ENABLE(TIZEN_WEBKIT2_HIT_TEST)
509     WebHitTestResult::Data hitTestResultAtPoint(const WebCore::IntPoint&, int hitTestMode = WebHitTestResult::HitTestModeDefault);
510 #endif
511 #if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
512     void hideContextMenu();
513     String contextMenuAbsoluteLinkURLString();
514     String contextMenuAbsoluteImageURLString();
515 #endif
516 #if ENABLE(TIZEN_CLIPBOARD) || ENABLE(TIZEN_PASTEBOARD)
517     void setClipboardData(const String& data, const String& type);
518     void clearClipboardData();
519 #endif
520 #if ENABLE(TIZEN_WEBKIT2_CLIPBOARD_HELPER)
521     void didSelectPasteMenuFromContextMenu(const String& data, const String& type);
522     void pasteContextMenuSelected();
523 #endif
524 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
525     void clipboardContextMenuSelected();
526     void executePasteFromClipboardItem(const String& data, const String& type);
527 #endif
528 #if ENABLE(TIZEN_WEBKIT2_REMOTE_WEB_INSPECTOR)
529     uint32_t startInspectorServer(uint32_t port);
530     bool stopInspectorServer();
531 #endif
532 #if ENABLE(TIZEN_MOBILE_WEB_PRINT)
533     void createPagesToPDF(const WebCore::IntSize&, const WebCore::IntSize&, const String&);
534 #endif
535
536     void scale(double, const WebCore::IntPoint&);
537     void scaleImage(double, const WebCore::IntPoint&);
538     double scaleFactor();
539
540 #if ENABLE(TIZEN_ORIENTATION_EVENTS)
541     void sendOrientationChangeEvent(int orientation);
542 #endif
543
544     void suspendPainting();
545 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
546     void suspendPaintingOfInactiveView();
547 #endif
548     void resumePainting();
549
550     void suspendJavaScriptAndResource();
551     void resumeJavaScriptAndResource();
552
553 #if ENABLE(TIZEN_PLUGIN_SUSPEND_RESUME)
554     void suspendPlugin();
555     void resumePlugin();
556 #endif
557
558 #endif // #if OS(TIZEN)
559
560 #if USE(TILED_BACKING_STORE)
561     void setViewportSize(const WebCore::IntSize&);
562 #endif
563
564     void handleMouseEvent(const NativeWebMouseEvent&);
565     void handleWheelEvent(const NativeWebWheelEvent&);
566     void handleKeyboardEvent(const NativeWebKeyboardEvent&);
567 #if ENABLE(GESTURE_EVENTS)
568     void handleGestureEvent(const WebGestureEvent&);
569 #endif
570 #if ENABLE(TOUCH_EVENTS)
571     void handleTouchEvent(const NativeWebTouchEvent&);
572 #if PLATFORM(QT)
573     void handlePotentialActivation(const WebCore::IntPoint& touchPoint, const WebCore::IntSize& touchArea);
574 #endif
575 #endif
576
577     void scrollBy(WebCore::ScrollDirection, WebCore::ScrollGranularity);
578     void centerSelectionInVisibleArea();
579
580     String pageTitle() const;
581     const String& toolTip() const { return m_toolTip; }
582
583     void setUserAgent(const String&);
584     const String& userAgent() const { return m_userAgent; }
585     void setApplicationNameForUserAgent(const String&);
586     const String& applicationNameForUserAgent() const { return m_applicationNameForUserAgent; }
587     void setCustomUserAgent(const String&);
588     const String& customUserAgent() const { return m_customUserAgent; }
589     static String standardUserAgent(const String& applicationName = String());
590 #if ENABLE(TIZEN_CUSTOM_HEADERS)
591     void addCustomHeader(const String&, const String&);
592     void removeCustomHeader(const String&);
593     void clearCustomHeaders();
594 #endif
595
596     bool supportsTextEncoding() const;
597     void setCustomTextEncodingName(const String&);
598     String customTextEncodingName() const { return m_customTextEncodingName; }
599
600     void resumeActiveDOMObjectsAndAnimations();
601     void suspendActiveDOMObjectsAndAnimations();
602
603     double estimatedProgress() const;
604
605     void terminateProcess();
606
607     typedef bool (*WebPageProxySessionStateFilterCallback)(WKPageRef, WKStringRef type, WKTypeRef object, void* context);
608     PassRefPtr<WebData> sessionStateData(WebPageProxySessionStateFilterCallback, void* context) const;
609     void restoreFromSessionStateData(WebData*);
610
611     bool supportsTextZoom() const;
612     double textZoomFactor() const { return m_mainFrameHasCustomRepresentation ? 1 : m_textZoomFactor; }
613     void setTextZoomFactor(double);
614     double pageZoomFactor() const;
615     void setPageZoomFactor(double);
616     void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
617
618     void scalePage(double scale, const WebCore::IntPoint& origin);
619     double pageScaleFactor() const { return m_pageScaleFactor; }
620
621     float deviceScaleFactor() const;
622     void setIntrinsicDeviceScaleFactor(float);
623     void setCustomDeviceScaleFactor(float);
624     void windowScreenDidChange(PlatformDisplayID);
625
626     LayerHostingMode layerHostingMode() const { return m_layerHostingMode; }
627
628     void setUseFixedLayout(bool);
629     void setFixedLayoutSize(const WebCore::IntSize&);
630     bool useFixedLayout() const { return m_useFixedLayout; };
631     const WebCore::IntSize& fixedLayoutSize() const { return m_fixedLayoutSize; };
632
633     bool hasHorizontalScrollbar() const { return m_mainFrameHasHorizontalScrollbar; }
634     bool hasVerticalScrollbar() const { return m_mainFrameHasVerticalScrollbar; }
635
636     bool isPinnedToLeftSide() const { return m_mainFrameIsPinnedToLeftSide; }
637     bool isPinnedToRightSide() const { return m_mainFrameIsPinnedToRightSide; }
638
639     void setPaginationMode(WebCore::Page::Pagination::Mode);
640     WebCore::Page::Pagination::Mode paginationMode() const { return m_paginationMode; }
641     void setPaginationBehavesLikeColumns(bool);
642     bool paginationBehavesLikeColumns() const { return m_paginationBehavesLikeColumns; }
643     void setPageLength(double);
644     double pageLength() const { return m_pageLength; }
645     void setGapBetweenPages(double);
646     double gapBetweenPages() const { return m_gapBetweenPages; }
647     unsigned pageCount() const { return m_pageCount; }
648
649 #if PLATFORM(MAC)
650     // Called by the web process through a message.
651     void registerWebProcessAccessibilityToken(const CoreIPC::DataReference&);
652     // Called by the UI process when it is ready to send its tokens to the web process.
653     void registerUIProcessAccessibilityTokens(const CoreIPC::DataReference& elemenToken, const CoreIPC::DataReference& windowToken);
654     bool readSelectionFromPasteboard(const String& pasteboardName);
655     String stringSelectionForPasteboard();
656     PassRefPtr<WebCore::SharedBuffer> dataSelectionForPasteboard(const String& pasteboardType);
657     void makeFirstResponder();
658
659     ColorSpaceData colorSpace();
660 #endif
661
662     void pageScaleFactorDidChange(double);
663
664     void setMemoryCacheClientCallsEnabled(bool);
665
666     // Find.
667     void findString(const String&, FindOptions, unsigned maxMatchCount);
668     void hideFindUI();
669     void countStringMatches(const String&, FindOptions, unsigned maxMatchCount);
670     void didCountStringMatches(const String&, uint32_t matchCount);
671     void setFindIndicator(const WebCore::FloatRect& selectionRectInWindowCoordinates, const Vector<WebCore::FloatRect>& textRectsInSelectionRectCoordinates, float contentImageScaleFactor, const ShareableBitmap::Handle& contentImageHandle, bool fadeOut, bool animate);
672     void didFindString(const String&, uint32_t matchCount);
673     void didFailToFindString(const String&);
674 #if PLATFORM(WIN)
675     void didInstallOrUninstallPageOverlay(bool);
676 #endif
677
678     void getContentsAsString(PassRefPtr<StringCallback>);
679 #if ENABLE(MHTML)
680     void getContentsAsMHTMLData(PassRefPtr<DataCallback>, bool useBinaryEncoding);
681 #endif
682     void getMainResourceDataOfFrame(WebFrameProxy*, PassRefPtr<DataCallback>);
683     void getResourceDataFromFrame(WebFrameProxy*, WebURL*, PassRefPtr<DataCallback>);
684     void getRenderTreeExternalRepresentation(PassRefPtr<StringCallback>);
685     void getSelectionOrContentsAsString(PassRefPtr<StringCallback>);
686     void getSourceForFrame(WebFrameProxy*, PassRefPtr<StringCallback>);
687     void getWebArchiveOfFrame(WebFrameProxy*, PassRefPtr<DataCallback>);
688     void runJavaScriptInMainFrame(const String&, PassRefPtr<ScriptValueCallback>);
689     void forceRepaint(PassRefPtr<VoidCallback>);
690
691 #if ENABLE(WEB_INTENTS)
692     void deliverIntentToFrame(WebFrameProxy*, WebIntentData*);
693 #endif
694
695     float headerHeight(WebFrameProxy*);
696     float footerHeight(WebFrameProxy*);
697     void drawHeader(WebFrameProxy*, const WebCore::FloatRect&);
698     void drawFooter(WebFrameProxy*, const WebCore::FloatRect&);
699
700 #if ENABLE(SCREEN_ORIENTATION_SUPPORT) && ENABLE(TIZEN_SCREEN_ORIENTATION_SUPPORT)
701     void lockOrientation(int orientation, bool& result);
702     void unlockOrientation();
703 #endif
704
705 #if PLATFORM(MAC)
706     // Dictionary.
707     void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
708 #endif
709
710     void receivedPolicyDecision(WebCore::PolicyAction, WebFrameProxy*, uint64_t listenerID);
711
712     void backForwardRemovedItem(uint64_t itemID);
713
714 #if ENABLE(DRAG_SUPPORT)    
715     // Drag and drop support.
716     void dragEntered(WebCore::DragData*, const String& dragStorageName = String());
717     void dragUpdated(WebCore::DragData*, const String& dragStorageName = String());
718     void dragExited(WebCore::DragData*, const String& dragStorageName = String());
719 #if ENABLE(TIZEN_DRAG_SUPPORT)
720     void performDrag(WebCore::DragData*, const String& dragStorageName = String());
721 #else
722     void performDrag(WebCore::DragData*, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
723 #endif
724
725     void didPerformDragControllerAction(WebCore::DragSession);
726     void dragEnded(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t operation);
727 #if PLATFORM(MAC)
728     void setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, bool isLinkDrag);
729     void setPromisedData(const String& pasteboardName, const SharedMemory::Handle& imageHandle, uint64_t imageSize, const String& filename, const String& extension,
730                          const String& title, const String& url, const String& visibleURL, const SharedMemory::Handle& archiveHandle, uint64_t archiveSize);
731 #endif
732 #if PLATFORM(WIN)
733     void startDragDrop(const WebCore::IntPoint& imagePoint, const WebCore::IntPoint& dragPoint, uint64_t okEffect, const HashMap<UINT, Vector<String> >& dataMap, uint64_t fileSize, const String& pathname, const SharedMemory::Handle& fileContentHandle, const WebCore::IntSize& dragImageSize, const SharedMemory::Handle& dragImageHandle, bool isLinkDrag);
734 #endif
735 #if PLATFORM(QT) || PLATFORM(GTK) || ENABLE(TIZEN_DRAG_SUPPORT)
736     void startDrag(const WebCore::DragData&, const ShareableBitmap::Handle& dragImage);
737 #endif
738 #endif
739
740     void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
741     void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&);
742
743     void processDidBecomeUnresponsive();
744     void interactionOccurredWhileProcessUnresponsive();
745     void processDidBecomeResponsive();
746     void processDidCrash();
747
748 #if USE(ACCELERATED_COMPOSITING)
749     virtual void enterAcceleratedCompositingMode(const LayerTreeContext&);
750     virtual void exitAcceleratedCompositingMode();
751     virtual void updateAcceleratedCompositingMode(const LayerTreeContext&);
752 #endif
753     
754     void didDraw();
755
756     enum UndoOrRedo { Undo, Redo };
757     void addEditCommand(WebEditCommandProxy*);
758     void removeEditCommand(WebEditCommandProxy*);
759     bool isValidEditCommand(WebEditCommandProxy*);
760     void registerEditCommand(PassRefPtr<WebEditCommandProxy>, UndoOrRedo);
761
762 #if PLATFORM(MAC)
763     void registerKeypressCommandName(const String& name) { m_knownKeypressCommandNames.add(name); }
764     bool isValidKeypressCommandName(const String& name) const { return m_knownKeypressCommandNames.contains(name); }
765 #endif
766
767     WebProcessProxy* process() const;
768     PlatformProcessIdentifier processIdentifier() const;
769
770     WebPageGroup* pageGroup() const { return m_pageGroup.get(); }
771
772     bool isValid();
773
774     const String& urlAtProcessExit() const { return m_urlAtProcessExit; }
775     WebFrameProxy::LoadState loadStateAtProcessExit() const { return m_loadStateAtProcessExit; }
776
777 #if ENABLE(DRAG_SUPPORT)
778     WebCore::DragSession dragSession() const { return m_currentDragSession; }
779     void resetDragOperation() { m_currentDragSession = WebCore::DragSession(); }
780 #endif
781
782     void preferencesDidChange();
783
784 #if ENABLE(CONTEXT_MENUS)
785     // Called by the WebContextMenuProxy.
786     void contextMenuItemSelected(const WebContextMenuItemData&);
787 #endif
788
789     // Called by the WebOpenPanelResultListenerProxy.
790     void didChooseFilesForOpenPanel(const Vector<String>&);
791     void didCancelForOpenPanel();
792
793     WebPageCreationParameters creationParameters() const;
794
795 #if PLATFORM(QT)
796     void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize&);
797     void didReceiveMessageFromNavigatorQtObject(const String&);
798 #endif
799
800 #if PLATFORM(QT) || PLATFORM(EFL)
801     void handleDownloadRequest(DownloadProxy*);
802 #endif
803 #if OS(TIZEN)
804     void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize&);
805 #endif // #if OS(TIZEN)
806
807     void advanceToNextMisspelling(bool startBeforeSelection) const;
808     void changeSpellingToWord(const String& word) const;
809 #if USE(APPKIT)
810     void uppercaseWord();
811     void lowercaseWord();
812     void capitalizeWord();
813 #endif
814
815 #if PLATFORM(MAC)
816     bool isSmartInsertDeleteEnabled() const { return m_isSmartInsertDeleteEnabled; }
817     void setSmartInsertDeleteEnabled(bool);
818 #endif
819
820 #if PLATFORM(GTK)
821     String accessibilityPlugID() const { return m_accessibilityPlugID; }
822 #endif
823
824     void setCanRunModal(bool);
825     bool canRunModal();
826
827     void beginPrinting(WebFrameProxy*, const PrintInfo&);
828     void endPrinting();
829     void computePagesForPrinting(WebFrameProxy*, const PrintInfo&, PassRefPtr<ComputedPagesCallback>);
830 #if PLATFORM(MAC) || PLATFORM(WIN)
831     void drawRectToPDF(WebFrameProxy*, const PrintInfo&, const WebCore::IntRect&, PassRefPtr<DataCallback>);
832     void drawPagesToPDF(WebFrameProxy*, const PrintInfo&, uint32_t first, uint32_t count, PassRefPtr<DataCallback>);
833 #elif PLATFORM(GTK)
834     void drawPagesForPrinting(WebFrameProxy*, const PrintInfo&, PassRefPtr<PrintFinishedCallback>);
835 #endif
836
837     const String& pendingAPIRequestURL() const { return m_pendingAPIRequestURL; }
838
839     void flashBackingStoreUpdates(const Vector<WebCore::IntRect>& updateRects);
840
841 #if PLATFORM(MAC)
842     void handleAlternativeTextUIResult(const String& result);
843 #endif
844
845     static void setDebugPaintFlags(WKPageDebugPaintFlags flags) { s_debugPaintFlags = flags; }
846     static WKPageDebugPaintFlags debugPaintFlags() { return s_debugPaintFlags; }
847
848     // Color to be used with kWKDebugFlashViewUpdates.
849     static WebCore::Color viewUpdatesFlashColor();
850
851     // Color to be used with kWKDebugFlashBackingStoreUpdates.
852     static WebCore::Color backingStoreUpdatesFlashColor();
853
854     void saveDataToFileInDownloadsFolder(const String& suggestedFilename, const String& mimeType, const String& originatingURLString, WebData*);
855
856     void linkClicked(const String&, const WebMouseEvent&);
857
858     WebCore::IntRect visibleScrollerThumbRect() const { return m_visibleScrollerThumbRect; }
859
860     uint64_t renderTreeSize() const { return m_renderTreeSize; }
861
862     void setShouldSendEventsSynchronously(bool sync) { m_shouldSendEventsSynchronously = sync; };
863 #if ENABLE(TIZEN_INPUT_TAG_EXTENSION) || ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
864     void setFocusedInputElementValue(const String& inputValue);
865     String getFocusedInputElementValue();
866 #endif
867
868 #if ENABLE(TIZEN_DATALIST_ELEMENT)
869     Vector<String> getFocusedInputElementDataList();
870 #endif
871
872     void printMainFrame();
873
874 #if ENABLE(TIZEN_RECORDING_SURFACE_SET)
875 void recordingSurfaceSetEnableSet(bool enable);
876 #endif
877     
878 #if ENABLE(TIZEN_REGISTER_PROTOCOL_HANDLER)
879     void registerProtocolHandler(const String& scheme, const String& baseURL, const String& url, const String& title);
880 #endif
881 #if ENABLE(TIZEN_CUSTOM_SCHEME_HANDLER)
882     void isProtocolHandlerRegistered(const String& scheme, const String& baseURL, const String& url, unsigned int& result);
883     void unregisterProtocolHandler(const String& scheme, const String& baseURL, const String& url);
884 #endif
885 #if ENABLE(TIZEN_REGISTER_CONTENT_HANDLER)
886     void registerContentHandler(const String& mimeType, const String& baseURL, const String& url, const String& title);
887     void isContentHandlerRegistered(const String& mimeType, const String& baseURL, const String& url, unsigned int& result);
888     void unregisterContentHandler(const String& mimeType, const String& baseURL, const String& url);
889 #endif
890
891 #if ENABLE(TIZEN_SEARCH_PROVIDER)
892     void addSearchProvider(const String& baseURL, const String& engineURL);
893     void isSearchProviderInstalled(const String& baseURL, const String& engineURL, uint64_t& result);
894 #endif
895
896 #if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
897     void getStandaloneStatus(bool& standalone);
898     void getWebAppCapable(PassRefPtr<BooleanCallback>);
899     void getWebAppIconURL(PassRefPtr<StringCallback>);
900 #endif
901
902     void setMediaVolume(float);
903
904 #if OS(TIZEN)
905     void replyJavaScriptAlert();
906     void replyJavaScriptConfirm(bool result);
907     void replyJavaScriptPrompt(const String& result);
908 #if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
909     void replyBeforeUnloadConfirmPanel(bool result);
910 #endif
911 #endif
912
913 #if ENABLE(TIZEN_CERTIFICATE_HANDLING)
914     void replyPolicyForCertificateError(bool result);
915 #endif
916
917     // WebPopupMenuProxy::Client
918     virtual NativeWebMouseEvent* currentlyProcessedMouseDownEvent();
919
920 #if ENABLE(TIZEN_PAGE_VISIBILITY_API)
921     void setPageVisibility(WebCore::PageVisibilityState, bool isInitialState);
922 #endif
923
924 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
925     bool scrollOverflow(const WebCore::FloatPoint&);
926     bool setPressedNodeAtPoint(const WebCore::IntPoint&, bool checkOverflowLayer, WebLayerID&);
927     void setLoadingFinished(const bool isLoadingFinished) { m_isLoadingFinished = isLoadingFinished; }
928     bool isLoadingFinished() const { return m_isLoadingFinished; }
929     bool askOverflow() const { return m_askOverflow; }
930     void setOverflowResult(bool pressed, WebLayerID webLayerID);
931 #endif
932
933 #if ENABLE(TIZEN_ISF_PORT)
934     int getCursorOffset();
935     void getSurroundingTextAndCursorOffset(String&, int&);
936     WebCore::IntRect getSelectionRect(bool);
937     void deleteSurroundingText(int, int);
938
939     void updateCursorOffset(int);
940     void didCancelComposition();
941 #endif
942
943     void setBackgroundColor(double red, double green, double blue, double alpha);
944 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
945     bool makeContextCurrent();
946 #endif
947
948 #if OS(TIZEN)
949     void didRenderFrame();
950 #endif
951
952 #if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
953     void getTextStyleStateForSelection();
954     void didGetTextStyleStateForSelection(int underlineState, int italicState, int boldState);
955 #endif
956
957 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
958     void widgetMapped(uint64_t nativeWindowId);
959 #endif
960
961     void setSuppressVisibilityUpdates(bool flag) { m_suppressVisibilityUpdates = flag; }
962     bool suppressVisibilityUpdates() { return m_suppressVisibilityUpdates; }
963
964 #if ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
965 #if ENABLE(INPUT_TYPE_COLOR)
966     void setColorChooserColor(const WebCore::Color&);
967     void endColorChooser();
968 #endif
969 #endif
970
971 #if ENABLE(TIZEN_MULTIPLE_SELECT)
972     void valueChangedForPopupMenuMultiple(WebPopupMenuProxy*, Vector<int32_t> newSelectedIndex);
973 #endif
974
975 #if ENABLE(TIZEN_NATIVE_MEMORY_SNAPSHOT)
976     void dumpMemorySnapshot();
977 #endif
978
979 #if ENABLE(TIZEN_OFFLINE_PAGE_SAVE)
980     void saveSerializedHTMLDataForMainPage(const String& serializedData, const String& fileName);
981     void saveSubresourcesData(Vector<WebSubresourceTizen> subresourceData);
982     void startOfflinePageSave(String subresourceFolderName);
983 #endif
984
985 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
986     bool selectClosestWord(const WebCore::IntPoint&, bool isStartedTextSelectionFromOutside);
987     bool setLeftSelection(const WebCore::IntPoint&);
988     bool setRightSelection(const WebCore::IntPoint&);
989     bool getSelectionHandlers(WebCore::IntRect& leftRect, WebCore::IntRect& rightRect);
990     String getSelectionText();
991     bool selectionRangeClear();
992 #endif
993
994 #if ENABLE(TIZEN_LINK_MAGNIFIER)
995     void getLinkMagnifierRect(const WebCore::IntPoint&, const WebCore::IntSize&);
996     void openLink(const WebCore::IntPoint&);
997 #endif
998
999 #if ENABLE(TIZEN_SCREEN_READER)
1000     void raiseTapEvent(const WebCore::IntPoint&);
1001     bool moveScreenReaderFocus(bool);
1002     void moveScreenReaderFocusByPoint(const WebCore::IntPoint&);
1003     void recalcScreenReaderFocusRect();
1004     void clearScreenReader();
1005
1006     void didScreenReaderFocusRectChanged(const WebCore::IntRect&);
1007     void didScreenReaderTextChanged(const String&);
1008 #endif
1009
1010 #if ENABLE(TIZEN_CSP)
1011     void setContentSecurityPolicy(const String& policy, WebCore::ContentSecurityPolicy::HeaderType type);
1012 #endif
1013
1014 private:
1015     WebPageProxy(PageClient*, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID);
1016
1017     virtual Type type() const { return APIType; }
1018
1019     // WebPopupMenuProxy::Client
1020     virtual void valueChangedForPopupMenu(WebPopupMenuProxy*, int32_t newSelectedIndex);
1021     virtual void setTextFromItemForPopupMenu(WebPopupMenuProxy*, int32_t index);
1022 #if PLATFORM(GTK)
1023     virtual void failedToShowPopupMenu();
1024 #endif
1025 #if PLATFORM(QT)
1026     virtual void changeSelectedIndex(int32_t newSelectedIndex);
1027     virtual void closePopupMenu();
1028 #endif
1029
1030     // Implemented in generated WebPageProxyMessageReceiver.cpp
1031     void didReceiveWebPageProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
1032     void didReceiveSyncWebPageProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&);
1033
1034     void didCreateMainFrame(uint64_t frameID);
1035     void didCreateSubframe(uint64_t frameID, uint64_t parentFrameID);
1036     void didSaveFrameToPageCache(uint64_t frameID);
1037     void didRestoreFrameFromPageCache(uint64_t frameID, uint64_t parentFrameID);
1038
1039     void didStartProvisionalLoadForFrame(uint64_t frameID, const String& url, const String& unreachableURL, CoreIPC::ArgumentDecoder*);
1040     void didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, const String&, CoreIPC::ArgumentDecoder*);
1041     void didFailProvisionalLoadForFrame(uint64_t frameID, const WebCore::ResourceError&, CoreIPC::ArgumentDecoder*);
1042     void didCommitLoadForFrame(uint64_t frameID, const String& mimeType, bool frameHasCustomRepresentation, const PlatformCertificateInfo&, CoreIPC::ArgumentDecoder*);
1043     void didFinishDocumentLoadForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
1044     void didFinishLoadForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
1045     void didFailLoadForFrame(uint64_t frameID, const WebCore::ResourceError&, CoreIPC::ArgumentDecoder*);
1046     void didSameDocumentNavigationForFrame(uint64_t frameID, uint32_t sameDocumentNavigationType, const String&, CoreIPC::ArgumentDecoder*);
1047     void didReceiveTitleForFrame(uint64_t frameID, const String&, CoreIPC::ArgumentDecoder*);
1048     void didFirstLayoutForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
1049     void didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
1050     void didNewFirstVisuallyNonEmptyLayout(CoreIPC::ArgumentDecoder*);
1051     void didRemoveFrameFromHierarchy(uint64_t frameID, CoreIPC::ArgumentDecoder*);
1052     void didDisplayInsecureContentForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
1053     void didRunInsecureContentForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
1054     void didDetectXSSForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
1055     void frameDidBecomeFrameSet(uint64_t frameID, bool);
1056     void didStartProgress();
1057     void didChangeProgress(double);
1058     void didFinishProgress();
1059
1060 #if ENABLE(TIZEN_PLUGIN_CUSTOM_REQUEST)
1061     void processPluginCustomRequest(const String& request, const String& msg);
1062 #endif
1063
1064 #if ENABLE(WEB_INTENTS)
1065     void didReceiveIntentForFrame(uint64_t frameID, const IntentData&, CoreIPC::ArgumentDecoder*);
1066 #endif
1067 #if ENABLE(WEB_INTENTS_TAG)
1068     void registerIntentServiceForFrame(uint64_t frameID, const IntentServiceInfo&, CoreIPC::ArgumentDecoder*);
1069 #endif
1070
1071 #if ENABLE(TIZEN_DOWNLOAD_ATTRIBUTE)
1072     // Called by the web process through a message when the download need to be initiated from the web process.
1073     void startDownload(const WebCore::ResourceRequest&, const String& suggestedName = String());
1074 #endif
1075
1076      void decidePolicyForNavigationAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, const WebCore::ResourceRequest&, uint64_t listenerID, CoreIPC::ArgumentDecoder*, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID);
1077     void decidePolicyForNewWindowAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, const WebCore::ResourceRequest&, const String& frameName, uint64_t listenerID, CoreIPC::ArgumentDecoder*);
1078     void decidePolicyForResponse(uint64_t frameID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, uint64_t listenerID, CoreIPC::ArgumentDecoder* arguments, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID);
1079     void unableToImplementPolicy(uint64_t frameID, const WebCore::ResourceError&, CoreIPC::ArgumentDecoder* arguments);
1080
1081 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
1082     void willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const StringPairVector& textFieldValues, bool containsPasswordData, uint64_t listenerID, CoreIPC::ArgumentDecoder*);
1083 #else
1084     void willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const StringPairVector& textFieldValues, uint64_t listenerID, CoreIPC::ArgumentDecoder*);
1085 #endif
1086
1087     // Resource load client
1088     void didInitiateLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, const WebCore::ResourceRequest&, bool pageIsProvisionallyLoading);
1089     void didSendRequestForResource(uint64_t frameID, uint64_t resourceIdentifier, const WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirectResponse);
1090     void didReceiveResponseForResource(uint64_t frameID, uint64_t resourceIdentifier, const WebCore::ResourceResponse&);
1091     void didReceiveContentLengthForResource(uint64_t frameID, uint64_t resourceIdentifier, uint64_t contentLength);
1092     void didFinishLoadForResource(uint64_t frameID, uint64_t resourceIdentifier);
1093     void didFailLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, const WebCore::ResourceError&);
1094
1095     // UI client
1096     void createNewPage(const WebCore::ResourceRequest&, const WebCore::WindowFeatures&, uint32_t modifiers, int32_t mouseButton, uint64_t& newPageID, WebPageCreationParameters&);
1097     void showPage();
1098     void closePage(bool stopResponsivenessTimer);
1099 #if OS(TIZEN)
1100     void runJavaScriptAlert(uint64_t frameID, const String&, PassRefPtr<Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply>);
1101     void runJavaScriptConfirm(uint64_t frameID, const String&, PassRefPtr<Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply>);
1102     void runJavaScriptPrompt(uint64_t frameID, const String&, const String&, PassRefPtr<Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply>);
1103 #else
1104     void runJavaScriptAlert(uint64_t frameID, const String&);
1105     void runJavaScriptConfirm(uint64_t frameID, const String&, bool& result);
1106     void runJavaScriptPrompt(uint64_t frameID, const String&, const String&, String& result);
1107 #endif
1108     void shouldInterruptJavaScript(bool& result);
1109     void setStatusText(const String&);
1110     void mouseDidMoveOverElement(const WebHitTestResult::Data& hitTestResultData, uint32_t modifiers, CoreIPC::ArgumentDecoder*);
1111     void unavailablePluginButtonClicked(uint32_t opaquePluginUnavailabilityReason, const String& mimeType, const String& url, const String& pluginsPageURL);
1112     void setToolbarsAreVisible(bool toolbarsAreVisible);
1113     void getToolbarsAreVisible(bool& toolbarsAreVisible);
1114     void setMenuBarIsVisible(bool menuBarIsVisible);
1115     void getMenuBarIsVisible(bool& menuBarIsVisible);
1116     void setStatusBarIsVisible(bool statusBarIsVisible);
1117     void getStatusBarIsVisible(bool& statusBarIsVisible);
1118     void setIsResizable(bool isResizable);
1119     void getIsResizable(bool& isResizable);
1120     void setWindowFrame(const WebCore::FloatRect&);
1121     void getWindowFrame(WebCore::FloatRect&);
1122     void screenToWindow(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint);
1123     void windowToScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);
1124 #if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
1125     void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, PassRefPtr<Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::DelayedReply>);
1126 #else
1127     void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, bool& shouldClose);
1128 #endif
1129     void didChangeViewportProperties(const WebCore::ViewportAttributes&);
1130     void pageDidScroll();
1131     void runOpenPanel(uint64_t frameID, const WebCore::FileChooserSettings&);
1132     void printFrame(uint64_t frameID);
1133     void exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, uint64_t& newQuota);
1134     void requestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_t frameID, String originIdentifier);
1135     void runModal();
1136     void notifyScrollerThumbIsVisibleInRect(const WebCore::IntRect&);
1137     void recommendedScrollbarStyleDidChange(int32_t newStyle);
1138     void didChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar);
1139     void didChangeScrollOffsetPinningForMainFrame(bool pinnedToLeftSide, bool pinnedToRightSide);
1140 #if PLATFORM(EFL)
1141     void didChangeScrollPositionForMainFrame(const WebCore::IntPoint&);
1142 #endif
1143     void didChangePageCount(unsigned);
1144     void didFailToInitializePlugin(const String& mimeType);
1145     void didBlockInsecurePluginVersion(const String& mimeType, const String& urlString);
1146     void setCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents) { m_canShortCircuitHorizontalWheelEvents = canShortCircuitHorizontalWheelEvents; }
1147
1148     void reattachToWebProcess();
1149     void reattachToWebProcessWithItem(WebBackForwardListItem*);
1150
1151     void requestNotificationPermission(uint64_t notificationID, const String& originString);
1152
1153     void showNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& originString, uint64_t notificationID);
1154
1155 #if ENABLE(TIZEN_MEDIA_STREAM)
1156     void requestUserMediaPermission(uint64_t userMediaID);
1157 #endif
1158
1159 #if USE(TILED_BACKING_STORE)
1160     void pageDidRequestScroll(const WebCore::IntPoint&);
1161 #endif
1162
1163 #if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
1164     void pageDidRequestRestoreVisibleContentRect(const WebCore::IntPoint&, float);
1165 #endif
1166
1167 #if PLATFORM(QT) || OS(TIZEN)
1168     void didChangeContentsSize(const WebCore::IntSize&);
1169     void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&);
1170 #endif
1171 #if ENABLE(TOUCH_EVENTS)
1172     void needTouchEvents(bool);
1173 #endif
1174
1175 #if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
1176     void didGetWebAppCapable(const bool capable, uint64_t callbackID);
1177     void didGetWebAppIconURL(const String& iconURL, uint64_t callbackID);
1178 #endif
1179 #if ENABLE(TIZEN_ICON_DATABASE)
1180     void didReceiveIcon();
1181 #endif
1182
1183 #if ENABLE(INPUT_TYPE_COLOR)
1184     void showColorChooser(const WebCore::Color& initialColor);
1185 #if !ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
1186     void setColorChooserColor(const WebCore::Color&);
1187     void endColorChooser();
1188 #endif
1189     void didChooseColor(const WebCore::Color&);
1190     void didEndColorChooser();
1191 #endif
1192
1193     void editorStateChanged(const EditorState&);
1194
1195     // Back/Forward list management
1196     void backForwardAddItem(uint64_t itemID);
1197     void backForwardGoToItem(uint64_t itemID, SandboxExtension::Handle&);
1198     void backForwardItemAtIndex(int32_t index, uint64_t& itemID);
1199     void backForwardBackListCount(int32_t& count);
1200     void backForwardForwardListCount(int32_t& count);
1201     void backForwardClear();
1202
1203     // Undo management
1204     void registerEditCommandForUndo(uint64_t commandID, uint32_t editAction);
1205     void clearAllEditCommands();
1206     void canUndoRedo(uint32_t action, bool& result);
1207     void executeUndoRedo(uint32_t action, bool& result);
1208
1209     // Keyboard handling
1210 #if PLATFORM(MAC)
1211     void interpretQueuedKeyEvent(const EditorState&, bool& handled, Vector<WebCore::KeypressCommand>&);
1212     void executeSavedCommandBySelector(const String& selector, bool& handled);
1213 #endif
1214
1215 #if PLATFORM(GTK)
1216     void getEditorCommandsForKeyEvent(const AtomicString&, Vector<String>&);
1217     void bindAccessibilityTree(const String&);
1218 #endif
1219 #if PLATFORM(EFL)
1220     void getEditorCommandsForKeyEvent(Vector<String>&);
1221 #endif
1222
1223     // Popup Menu.
1224     void showPopupMenu(const WebCore::IntRect& rect, uint64_t textDirection, const Vector<WebPopupItem>& items, int32_t selectedIndex, const PlatformPopupMenuData&);
1225     void hidePopupMenu();
1226 #if PLATFORM(WIN)
1227     void setPopupMenuSelectedIndex(int32_t);
1228 #endif
1229 #if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
1230     void updatePopupMenu(uint64_t textDirection, const Vector<WebPopupItem>& items, int32_t selectedIndex);
1231 #endif
1232
1233 #if ENABLE(CONTEXT_MENUS)
1234     // Context Menu.
1235     void showContextMenu(const WebCore::IntPoint& menuLocation, const WebHitTestResult::Data&, const Vector<WebContextMenuItemData>&, CoreIPC::ArgumentDecoder*);
1236     void internalShowContextMenu(const WebCore::IntPoint& menuLocation, const WebHitTestResult::Data&, const Vector<WebContextMenuItemData>&, CoreIPC::ArgumentDecoder*);
1237 #endif
1238
1239     // Search popup results
1240     void saveRecentSearches(const String&, const Vector<String>&);
1241     void loadRecentSearches(const String&, Vector<String>&);
1242
1243 #if PLATFORM(MAC)
1244     // Speech.
1245     void getIsSpeaking(bool&);
1246     void speak(const String&);
1247     void stopSpeaking();
1248
1249     // Spotlight.
1250     void searchWithSpotlight(const String&);
1251
1252     // Dictionary.
1253     void didPerformDictionaryLookup(const String&, const DictionaryPopupInfo&);
1254 #endif
1255
1256     // Spelling and grammar.
1257     int64_t spellDocumentTag();
1258 #if USE(UNIFIED_TEXT_CHECKING)
1259     void checkTextOfParagraph(const String& text, uint64_t checkingTypes, Vector<WebCore::TextCheckingResult>& results);
1260 #endif
1261     void checkSpellingOfString(const String& text, int32_t& misspellingLocation, int32_t& misspellingLength);
1262     void checkGrammarOfString(const String& text, Vector<WebCore::GrammarDetail>&, int32_t& badGrammarLocation, int32_t& badGrammarLength);
1263     void spellingUIIsShowing(bool&);
1264     void updateSpellingUIWithMisspelledWord(const String& misspelledWord);
1265     void updateSpellingUIWithGrammarString(const String& badGrammarPhrase, const WebCore::GrammarDetail&);
1266     void getGuessesForWord(const String& word, const String& context, Vector<String>& guesses);
1267 #if PLATFORM(EFL)
1268 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
1269     void textChangeInTextField(const String&, const String&);
1270 #endif
1271 #if ENABLE(TIZEN_ISF_PORT)
1272     void setInputMethodState(bool, const String&, const String&);
1273 #else
1274     void setInputMethodState(bool active);
1275 #endif
1276 #endif
1277     void learnWord(const String& word);
1278     void ignoreWord(const String& word);
1279
1280     void setFocus(bool focused);
1281     void takeFocus(uint32_t direction);
1282     void setToolTip(const String&);
1283     void setCursor(const WebCore::Cursor&);
1284     void setCursorHiddenUntilMouseMoves(bool);
1285
1286     void didReceiveEvent(uint32_t opaqueType, bool handled);
1287     void stopResponsivenessTimer();
1288
1289     void voidCallback(uint64_t);
1290     void dataCallback(const CoreIPC::DataReference&, uint64_t);
1291     void stringCallback(const String&, uint64_t);
1292     void scriptValueCallback(const CoreIPC::DataReference&, uint64_t);
1293     void computedPagesCallback(const Vector<WebCore::IntRect>&, double totalScaleFactorForPrinting, uint64_t);
1294     void validateCommandCallback(const String&, bool, int, uint64_t);
1295 #if PLATFORM(GTK)
1296     void printFinishedCallback(const WebCore::ResourceError&, uint64_t);
1297 #endif
1298
1299     void focusedFrameChanged(uint64_t frameID);
1300     void frameSetLargestFrameChanged(uint64_t frameID);
1301
1302     void canAuthenticateAgainstProtectionSpaceInFrame(uint64_t frameID, const WebCore::ProtectionSpace&, bool& canAuthenticate);
1303     void didReceiveAuthenticationChallenge(uint64_t frameID, const WebCore::AuthenticationChallenge&, uint64_t challengeID);
1304
1305     void didFinishLoadingDataForCustomRepresentation(const String& suggestedFilename, const CoreIPC::DataReference&);
1306
1307 #if PLATFORM(MAC)
1308     void pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus);
1309     void setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t complexTextInputState);
1310 #endif
1311
1312     void clearPendingAPIRequestURL() { m_pendingAPIRequestURL = String(); }
1313     void setPendingAPIRequestURL(const String& pendingAPIRequestURL) { m_pendingAPIRequestURL = pendingAPIRequestURL; }
1314
1315     bool maybeInitializeSandboxExtensionHandle(const WebCore::KURL&, SandboxExtension::Handle&);
1316
1317 #if PLATFORM(MAC)
1318     void substitutionsPanelIsShowing(bool&);
1319 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
1320     void showCorrectionPanel(int32_t panelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
1321     void dismissCorrectionPanel(int32_t reason);
1322     void dismissCorrectionPanelSoon(int32_t reason, String& result);
1323     void recordAutocorrectionResponse(int32_t responseType, const String& replacedString, const String& replacementString);
1324 #endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
1325
1326 #if USE(DICTATION_ALTERNATIVES)
1327     void showDictationAlternativeUI(const WebCore::FloatRect& boundingBoxOfDictatedText, uint64_t dictationContext);
1328     void dismissDictationAlternativeUI();
1329     void removeDictationAlternatives(uint64_t dictationContext);
1330     void dictationAlternatives(uint64_t dictationContext, Vector<String>& result);
1331 #endif
1332 #endif // PLATFORM(MAC)
1333
1334     void clearLoadDependentCallbacks();
1335
1336     void performDragControllerAction(DragControllerAction, WebCore::DragData*, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
1337
1338     void updateBackingStoreDiscardableState();
1339
1340 #if PLATFORM(WIN)
1341     void scheduleChildWindowGeometryUpdate(const WindowGeometry&);
1342 #endif
1343
1344     void setRenderTreeSize(uint64_t treeSize) { m_renderTreeSize = treeSize; }
1345
1346 #if PLUGIN_ARCHITECTURE(X11)
1347     void createPluginContainer(uint64_t& windowID);
1348     void windowedPluginGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect, uint64_t windowID);
1349 #endif
1350
1351     void processNextQueuedWheelEvent();
1352     void sendWheelEvent(const WebWheelEvent&);
1353
1354 #if ENABLE(TIZEN_CERTIFICATE_HANDLING)
1355     void decidePolicyForCertificateError(const String& url, const String& certificate, int error, PassRefPtr<Messages::WebPageProxy::DecidePolicyForCertificateError::DelayedReply>);
1356 #endif
1357
1358 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
1359     bool isWaitingForJavaScriptPopupReply();
1360 #endif
1361
1362 #if ENABLE(TIZEN_LINK_MAGNIFIER)
1363     void didGetLinkMagnifierRect(const WebCore::IntPoint&, const WebCore::IntRect&);
1364 #endif
1365
1366     PageClient* m_pageClient;
1367     WebLoaderClient m_loaderClient;
1368     WebPolicyClient m_policyClient;
1369     WebFormClient m_formClient;
1370     WebResourceLoadClient m_resourceLoadClient;
1371     WebUIClient m_uiClient;
1372     WebFindClient m_findClient;
1373 #if ENABLE(CONTEXT_MENUS)
1374     WebPageContextMenuClient m_contextMenuClient;
1375 #endif
1376 #if OS(TIZEN)
1377     WebTizenClient m_tizenClient;
1378 #endif
1379
1380     OwnPtr<DrawingAreaProxy> m_drawingArea;
1381     RefPtr<WebProcessProxy> m_process;
1382     RefPtr<WebPageGroup> m_pageGroup;
1383     RefPtr<WebFrameProxy> m_mainFrame;
1384     RefPtr<WebFrameProxy> m_focusedFrame;
1385     RefPtr<WebFrameProxy> m_frameSetLargestFrame;
1386
1387     String m_userAgent;
1388     String m_applicationNameForUserAgent;
1389     String m_customUserAgent;
1390     String m_customTextEncodingName;
1391
1392 #if ENABLE(INSPECTOR)
1393     RefPtr<WebInspectorProxy> m_inspector;
1394 #endif
1395
1396 #if ENABLE(FULLSCREEN_API)
1397     RefPtr<WebFullScreenManagerProxy> m_fullScreenManager;
1398 #endif
1399
1400 #if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
1401     HashMap<uint64_t, RefPtr<BooleanCallback> > m_booleanCallbacks;
1402 #endif
1403     HashMap<uint64_t, RefPtr<VoidCallback> > m_voidCallbacks;
1404     HashMap<uint64_t, RefPtr<DataCallback> > m_dataCallbacks;
1405     HashMap<uint64_t, RefPtr<StringCallback> > m_stringCallbacks;
1406     HashSet<uint64_t> m_loadDependentStringCallbackIDs;
1407     HashMap<uint64_t, RefPtr<ScriptValueCallback> > m_scriptValueCallbacks;
1408     HashMap<uint64_t, RefPtr<ComputedPagesCallback> > m_computedPagesCallbacks;
1409     HashMap<uint64_t, RefPtr<ValidateCommandCallback> > m_validateCommandCallbacks;
1410 #if PLATFORM(GTK)
1411     HashMap<uint64_t, RefPtr<PrintFinishedCallback> > m_printFinishedCallbacks;
1412 #endif
1413 #if ENABLE(TIZEN_WEB_STORAGE)
1414     HashMap<uint64_t, RefPtr<WebStorageQuotaCallback> > m_quotaCallbacks;
1415 #endif
1416
1417     HashSet<WebEditCommandProxy*> m_editCommandSet;
1418
1419 #if PLATFORM(MAC)
1420     HashSet<String> m_knownKeypressCommandNames;
1421 #endif
1422
1423     RefPtr<WebPopupMenuProxy> m_activePopupMenu;
1424     RefPtr<WebContextMenuProxy> m_activeContextMenu;
1425     WebHitTestResult::Data m_activeContextMenuHitTestResultData;
1426     RefPtr<WebOpenPanelResultListenerProxy> m_openPanelResultListener;
1427     GeolocationPermissionRequestManagerProxy m_geolocationPermissionRequestManager;
1428     NotificationPermissionRequestManagerProxy m_notificationPermissionRequestManager;
1429 #if ENABLE(TIZEN_MEDIA_STREAM)
1430     UserMediaPermissionRequestManagerProxy m_userMediaPermissionRequestManager;
1431 #endif
1432     double m_estimatedProgress;
1433
1434     // Whether the web page is contained in a top-level window.
1435     bool m_isInWindow;
1436
1437     // Whether the page is visible; if the backing view is visible and inserted into a window.
1438     bool m_isVisible;
1439
1440     bool m_canGoBack;
1441     bool m_canGoForward;
1442     RefPtr<WebBackForwardList> m_backForwardList;
1443     
1444     bool m_maintainsInactiveSelection;
1445
1446     String m_toolTip;
1447
1448     String m_urlAtProcessExit;
1449     WebFrameProxy::LoadState m_loadStateAtProcessExit;
1450
1451     EditorState m_editorState;
1452
1453     double m_textZoomFactor;
1454     double m_pageZoomFactor;
1455     double m_pageScaleFactor;
1456     float m_intrinsicDeviceScaleFactor;
1457     float m_customDeviceScaleFactor;
1458
1459     LayerHostingMode m_layerHostingMode;
1460
1461     bool m_drawsBackground;
1462     bool m_drawsTransparentBackground;
1463
1464     bool m_areMemoryCacheClientCallsEnabled;
1465
1466     bool m_useFixedLayout;
1467     WebCore::IntSize m_fixedLayoutSize;
1468
1469     WebCore::Page::Pagination::Mode m_paginationMode;
1470     bool m_paginationBehavesLikeColumns;
1471     double m_pageLength;
1472     double m_gapBetweenPages;
1473
1474     // If the process backing the web page is alive and kicking.
1475     bool m_isValid;
1476
1477     // Whether WebPageProxy::close() has been called on this page.
1478     bool m_isClosed;
1479
1480     // Whether it can run modal child web pages.
1481     bool m_canRunModal;
1482
1483     bool m_isInPrintingMode;
1484     bool m_isPerformingDOMPrintOperation;
1485
1486     bool m_inDecidePolicyForResponse;
1487     bool m_syncMimeTypePolicyActionIsValid;
1488     WebCore::PolicyAction m_syncMimeTypePolicyAction;
1489     uint64_t m_syncMimeTypePolicyDownloadID;
1490
1491     bool m_inDecidePolicyForNavigationAction;
1492     bool m_syncNavigationActionPolicyActionIsValid;
1493     WebCore::PolicyAction m_syncNavigationActionPolicyAction;
1494     uint64_t m_syncNavigationActionPolicyDownloadID;
1495
1496 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
1497 #if ENABLE(GESTURE_EVENTS)
1498     Deque<QueuedUIEvents<WebGestureEvent> > m_gestureEventQueue;
1499 #endif
1500     Deque<QueuedUIEvents<NativeWebKeyboardEvent> > m_keyEventQueue;
1501 #else
1502 #if ENABLE(GESTURE_EVENTS)
1503     Deque<WebGestureEvent> m_gestureEventQueue;
1504 #endif
1505     Deque<NativeWebKeyboardEvent> m_keyEventQueue;
1506 #endif
1507     Deque<NativeWebWheelEvent> m_wheelEventQueue;
1508     Deque<OwnPtr<Vector<NativeWebWheelEvent> > > m_currentlyProcessedWheelEvents;
1509
1510     bool m_processingMouseMoveEvent;
1511     OwnPtr<NativeWebMouseEvent> m_nextMouseMoveEvent;
1512     OwnPtr<NativeWebMouseEvent> m_currentlyProcessedMouseDownEvent;
1513
1514 #if ENABLE(TOUCH_EVENTS)
1515     bool m_needTouchEvents;
1516 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
1517     Deque<QueuedUIEvents<NativeWebTouchEvent> > m_touchEventQueue;
1518 #else
1519     Deque<QueuedTouchEvents> m_touchEventQueue;
1520 #endif
1521 #endif
1522 #if ENABLE(INPUT_TYPE_COLOR)
1523     RefPtr<WebColorChooserProxy> m_colorChooser;
1524 #if ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
1525     RefPtr<WebColorPickerResultListenerProxy> m_colorPickerResultListener;
1526 #endif
1527 #endif
1528 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
1529     bool m_isLoadingFinished;    //if the page loading is finished, then set to true.
1530     bool m_askOverflow;
1531 #endif
1532
1533     uint64_t m_pageID;
1534
1535     bool m_isPageSuspended;
1536
1537 #if PLATFORM(MAC)
1538     bool m_isSmartInsertDeleteEnabled;
1539 #endif
1540
1541 #if PLATFORM(GTK)
1542     String m_accessibilityPlugID;
1543 #endif
1544
1545     int64_t m_spellDocumentTag;
1546     bool m_hasSpellDocumentTag;
1547     unsigned m_pendingLearnOrIgnoreWordMessageCount;
1548
1549     bool m_mainFrameHasCustomRepresentation;
1550
1551 #if ENABLE(DRAG_SUPPORT)
1552     WebCore::DragSession m_currentDragSession;
1553 #endif
1554
1555     String m_pendingAPIRequestURL;
1556
1557     bool m_mainFrameHasHorizontalScrollbar;
1558     bool m_mainFrameHasVerticalScrollbar;
1559
1560     // Whether horizontal wheel events can be handled directly for swiping purposes.
1561     bool m_canShortCircuitHorizontalWheelEvents;
1562
1563     bool m_mainFrameIsPinnedToLeftSide;
1564     bool m_mainFrameIsPinnedToRightSide;
1565
1566 #if PLATFORM(EFL)
1567     WebCore::IntPoint m_scrollPosition;
1568     WebCore::IntSize m_contentsSize;
1569 #endif
1570     unsigned m_pageCount;
1571
1572     WebCore::IntRect m_visibleScrollerThumbRect;
1573
1574     uint64_t m_renderTreeSize;
1575
1576     static WKPageDebugPaintFlags s_debugPaintFlags;
1577
1578     bool m_shouldSendEventsSynchronously;
1579
1580     bool m_suppressVisibilityUpdates;
1581
1582     float m_mediaVolume;
1583
1584 #if PLATFORM(QT)
1585     WTF::HashSet<RefPtr<QtRefCountedNetworkRequestData> > m_applicationSchemeRequests;
1586 #endif
1587
1588 #if ENABLE(PAGE_VISIBILITY_API)
1589     WebCore::PageVisibilityState m_visibilityState;
1590 #endif
1591
1592 #if OS(TIZEN)
1593     RefPtr<Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply> m_alertReply;
1594     RefPtr<Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply> m_confirmReply;
1595     RefPtr<Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply> m_promptReply;
1596 #if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
1597     RefPtr<Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::DelayedReply> m_beforeUnloadConfirmPanelReply;
1598 #endif
1599 #endif
1600
1601 #if ENABLE(TIZEN_CERTIFICATE_HANDLING)
1602     RefPtr<Messages::WebPageProxy::DecidePolicyForCertificateError::DelayedReply> m_allowedReply;
1603 #endif
1604
1605 #if ENABLE(TIZEN_REDUCE_KEY_LAGGING)
1606     Ecore_Timer* m_pageContentResumeTimer;
1607 #endif
1608
1609 #if ENABLE(TIZEN_ISF_PORT)
1610     bool m_didCancelCompositionFromWebProcess;
1611 #endif
1612 };
1613
1614 } // namespace WebKit
1615
1616 #endif // WebPageProxy_h