2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
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.
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.
26 #ifndef WebPageProxy_h
27 #define WebPageProxy_h
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"
38 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
39 #include "NativeWebKeyboardEvent.h"
42 #include "QtNetworkRequestData.h"
44 #include "LayerTreeContext.h"
45 #include "NotificationPermissionRequestManagerProxy.h"
46 #include "PlatformProcessIdentifier.h"
47 #include "SandboxExtension.h"
48 #include "ShareableBitmap.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>
84 #if ENABLE(DRAG_SUPPORT)
85 #include <WebCore/DragActions.h>
86 #include <WebCore/DragSession.h>
91 #include <Ecore_IMF_Evas.h>
95 #include "WebPageProxyMessages.h"
96 #include "WebTizenClient.h"
97 #include <WebCore/Color.h>
100 #if ENABLE(TIZEN_MEDIA_STREAM)
101 #include "UserMediaPermissionRequestManagerProxy.h"
104 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
105 #include "WebLayerTreeInfo.h"
109 class ArgumentDecoder;
115 class AuthenticationChallenge;
120 class ProtectionSpace;
121 struct FileChooserSettings;
122 struct TextAlternativeWithRange;
123 struct TextCheckingResult;
124 struct ViewportAttributes;
125 struct WindowFeatures;
129 class QQuickNetworkReply;
140 #if ENABLE(WEB_INTENTS)
146 #if !ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
147 class NativeWebKeyboardEvent;
149 class NativeWebMouseEvent;
150 class NativeWebWheelEvent;
152 class PlatformCertificateInfo;
153 class StringPairVector;
154 class WebBackForwardList;
155 class WebBackForwardListItem;
156 #if ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
157 class WebColorPickerResultListenerProxy;
159 class WebContextMenuProxy;
161 class WebEditCommandProxy;
162 class WebKeyboardEvent;
164 class WebOpenPanelResultListenerProxy;
166 class WebProcessProxy;
169 struct AttributedString;
170 struct ColorSpaceData;
171 struct DictionaryPopupInfo;
173 struct PlatformPopupMenuData;
175 struct WebPageCreationParameters;
179 struct WindowGeometry;
182 #if ENABLE(GESTURE_EVENTS)
183 class WebGestureEvent;
186 #if ENABLE(WEB_INTENTS)
190 #if ENABLE(WEB_INTENTS_TAG)
191 struct IntentServiceInfo;
194 typedef GenericCallback<WKStringRef, StringImpl*> StringCallback;
195 typedef GenericCallback<WKSerializedScriptValueRef, WebSerializedScriptValue*> ScriptValueCallback;
196 #if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
197 typedef GenericCallback<WKBooleanRef> BooleanCallback;
199 #if ENABLE(TIZEN_WEB_STORAGE)
200 #if ENABLE(TIZEN_WEBKIT2_NUMBER_TYPE_SUPPORT)
201 typedef GenericCallback<WKUInt32Ref> WebStorageQuotaCallback;
206 typedef GenericCallback<WKErrorRef> PrintFinishedCallback;
209 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
211 struct QueuedUIEvents {
212 QueuedUIEvents(const T& event)
213 : forwardedEvent(event)
217 Vector<T> deferredEvents;
220 #if ENABLE(TOUCH_EVENTS)
221 struct QueuedTouchEvents {
222 QueuedTouchEvents(const NativeWebTouchEvent& event)
223 : forwardedEvent(event)
226 NativeWebTouchEvent forwardedEvent;
227 Vector<NativeWebTouchEvent> deferredTouchEvents;
232 // FIXME: Make a version of CallbackBase with three arguments, and define ValidateCommandCallback as a specialization.
233 class ValidateCommandCallback : public CallbackBase {
235 typedef void (*CallbackFunction)(WKStringRef, bool, int32_t, WKErrorRef, void*);
237 static PassRefPtr<ValidateCommandCallback> create(void* context, CallbackFunction callback)
239 return adoptRef(new ValidateCommandCallback(context, callback));
242 virtual ~ValidateCommandCallback()
247 void performCallbackWithReturnValue(StringImpl* returnValue1, bool returnValue2, int returnValue3)
251 m_callback(toAPI(returnValue1), returnValue2, returnValue3, 0, context());
260 RefPtr<WebError> error = WebError::create();
261 m_callback(0, 0, 0, toAPI(error.get()), context());
268 ValidateCommandCallback(void* context, CallbackFunction callback)
269 : CallbackBase(context)
270 , m_callback(callback)
274 CallbackFunction m_callback;
279 #if ENABLE(INPUT_TYPE_COLOR)
280 , public WebColorChooserProxy::Client
282 , public WebPopupMenuProxy::Client {
284 static const Type APIType = TypePage;
286 static PassRefPtr<WebPageProxy> create(PageClient*, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID);
287 virtual ~WebPageProxy();
289 uint64_t pageID() const { return m_pageID; }
291 WebFrameProxy* mainFrame() const { return m_mainFrame.get(); }
292 WebFrameProxy* focusedFrame() const { return m_focusedFrame.get(); }
293 WebFrameProxy* frameSetLargestFrame() const { return m_frameSetLargestFrame.get(); }
295 DrawingAreaProxy* drawingArea() const { return m_drawingArea.get(); }
297 WebBackForwardList* backForwardList() const { return m_backForwardList.get(); }
299 #if ENABLE(INSPECTOR)
300 WebInspectorProxy* inspector();
303 #if ENABLE(FULLSCREEN_API)
304 WebFullScreenManagerProxy* fullScreenManager();
307 #if ENABLE(CONTEXT_MENUS)
308 void initializeContextMenuClient(const WKPageContextMenuClient*);
310 void initializeFindClient(const WKPageFindClient*);
311 void initializeFormClient(const WKPageFormClient*);
312 void initializeLoaderClient(const WKPageLoaderClient*);
313 void initializePolicyClient(const WKPagePolicyClient*);
314 void initializeResourceLoadClient(const WKPageResourceLoadClient*);
315 void initializeUIClient(const WKPageUIClient*);
317 void initializeTizenClient(const WKPageTizenClient*);
320 void initializeWebPage();
324 bool isClosed() const { return m_isClosed; }
326 void loadURL(const String&);
327 void loadURLRequest(WebURLRequest*);
328 void loadHTMLString(const String& htmlString, const String& baseURL);
329 void loadAlternateHTMLString(const String& htmlString, const String& baseURL, const String& unreachableURL);
330 void loadPlainTextString(const String& string);
331 void loadWebArchiveData(const WebData*);
333 void loadContentsbyMimeType(const WebData*, const String& mimeType, const String& encoding, const String& baseURL);
337 void reload(bool reloadFromOrigin);
340 bool canGoForward() const;
342 bool canGoBack() const;
344 void goToBackForwardItem(WebBackForwardListItem*);
345 void tryRestoreScrollPosition();
346 void didChangeBackForwardList(WebBackForwardListItem* addedItem, Vector<RefPtr<APIObject> >* removedItems);
347 void shouldGoToBackForwardListItem(uint64_t itemID, bool& shouldGoToBackForwardListItem);
348 void willGoToBackForwardListItem(uint64_t itemID, CoreIPC::ArgumentDecoder* arguments);
350 String activeURL() const;
351 String provisionalURL() const;
352 String committedURL() const;
354 bool willHandleHorizontalScrollEvents() const;
356 bool canShowMIMEType(const String& mimeType) const;
358 bool drawsBackground() const { return m_drawsBackground; }
359 void setDrawsBackground(bool);
361 bool drawsTransparentBackground() const { return m_drawsTransparentBackground; }
362 void setDrawsTransparentBackground(bool);
364 void viewWillStartLiveResize();
365 void viewWillEndLiveResize();
367 void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&);
368 void setWindowResizerSize(const WebCore::IntSize&);
370 void clearSelection();
372 void setViewNeedsDisplay(const WebCore::IntRect&);
374 void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
377 ViewWindowIsActive = 1 << 0,
378 ViewIsFocused = 1 << 1,
379 ViewIsVisible = 1 << 2,
380 ViewIsInWindow = 1 << 3,
382 typedef unsigned ViewStateFlags;
383 void viewStateDidChange(ViewStateFlags flags);
385 WebCore::IntSize viewSize() const;
386 bool isViewVisible() const { return m_isVisible; }
387 bool isViewWindowActive() const;
389 void executeEditCommand(const String& commandName);
391 void executeEditCommandWithArgument(const String& commandName, const String& argument);
393 void validateCommand(const String& commandName, PassRefPtr<ValidateCommandCallback>);
395 const EditorState& editorState() const { return m_editorState; }
396 bool canDelete() const { return hasSelectedRange() && isContentEditable(); }
397 bool hasSelectedRange() const { return m_editorState.selectionIsRange; }
398 bool isContentEditable() const { return m_editorState.isContentEditable; }
400 bool maintainsInactiveSelection() const { return m_maintainsInactiveSelection; }
401 void setMaintainsInactiveSelection(bool);
403 void registerApplicationScheme(const String& scheme);
404 void resolveApplicationSchemeRequest(QtNetworkRequestData);
405 void sendApplicationSchemeReply(const QQuickNetworkReply*);
406 void authenticationRequiredRequest(const String& hostname, const String& realm, const String& prefilledUsername, String& username, String& password);
407 void certificateVerificationRequest(const String& hostname, bool& ignoreErrors);
408 void proxyAuthenticationRequiredRequest(const String& hostname, uint16_t port, const String& prefilledUsername, String& username, String& password);
409 void setUserScripts(const Vector<String>&);
410 #endif // PLATFORM(QT).
412 void setThemePath(const String&);
416 void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
417 void confirmComposition(const String& compositionString, int64_t selectionStart, int64_t selectionLength);
418 void cancelComposition();
421 void updateWindowIsVisible(bool windowIsVisible);
422 void windowAndViewFramesChanged(const WebCore::IntRect& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates, const WebCore::IntPoint& accessibilityViewCoordinates);
424 void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
425 void confirmComposition();
426 void cancelComposition();
427 bool insertText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
428 bool insertDictatedText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, const Vector<WebCore::TextAlternativeWithRange>& dictationAlternatives);
429 void getMarkedRange(uint64_t& location, uint64_t& length);
430 void getSelectedRange(uint64_t& location, uint64_t& length);
431 void getAttributedSubstringFromRange(uint64_t location, uint64_t length, AttributedString&);
432 uint64_t characterIndexForPoint(const WebCore::IntPoint);
433 WebCore::IntRect firstRectForCharacterRange(uint64_t, uint64_t);
434 bool executeKeypressCommands(const Vector<WebCore::KeypressCommand>&);
436 void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
437 CGContextRef containingWindowGraphicsContext();
438 bool shouldDelayWindowOrderingForEvent(const WebMouseEvent&);
439 bool acceptsFirstMouse(int eventNumber, const WebMouseEvent&);
442 WKView* wkView() const;
446 void didChangeCompositionSelection(bool);
447 void confirmComposition(const String&);
448 void setComposition(const String&, Vector<WebCore::CompositionUnderline>&, int);
449 WebCore::IntRect firstRectForCharacterInSelectedRange(int);
450 String getSelectedText();
452 bool gestureWillBegin(const WebCore::IntPoint&);
453 void gestureDidScroll(const WebCore::IntSize&);
454 void gestureDidEnd();
456 void setGestureReachedScrollingLimit(bool);
458 HWND nativeWindow() const;
461 GtkWidget* viewWidget();
464 Evas_Object* viewWidget();
468 void confirmComposition(const String&);
469 void setComposition(const String&, Vector<WebCore::CompositionUnderline>&, int);
470 void handleInputMethodKeydown(bool&);
471 #if ENABLE(TIZEN_TEXT_CARET_HANDLING_WK2)
472 void setCaretPosition(const WebCore::IntPoint&);
473 void getCaretPosition(WebCore::IntRect&);
475 bool scrollMainFrameBy(const WebCore::IntSize&);
476 void scrollMainFrameTo(const WebCore::IntPoint&);
477 WebCore::IntPoint& scrollPosition() { return m_scrollPosition; }
478 WebCore::IntSize& contentsSize() { return m_contentsSize; }
479 PassRefPtr<WebImage> createSnapshot(const WebCore::IntRect&, float);
481 void requestUpdateFormNavigation();
483 void updateFormNavigation(int length, int offset);
484 void focusedNodeChanged(const WebCore::IntRect&);
486 #if ENABLE(TIZEN_WEB_STORAGE)
487 #if ENABLE(TIZEN_WEBKIT2_NUMBER_TYPE_SUPPORT)
488 void getWebStorageQuotaBytes(PassRefPtr<WebStorageQuotaCallback>);
489 void didGetWebStorageQuotaBytes(const uint32_t quota, uint64_t callbackID);
491 void setWebStorageQuotaBytes(uint32_t quota);
494 #if ENABLE(TIZEN_WEBKIT2_HIT_TEST)
495 WebHitTestResult::Data hitTestResultAtPoint(const WebCore::IntPoint&, int hitTestMode = WebHitTestResult::HitTestModeDefault);
497 #if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
498 void hideContextMenu();
499 String contextMenuAbsoluteLinkURLString();
500 String contextMenuAbsoluteImageURLString();
502 #if ENABLE(TIZEN_CLIPBOARD) || ENABLE(TIZEN_PASTEBOARD)
503 void setClipboardData(const String& data, const String& type);
504 void clearClipboardData();
506 #if ENABLE(TIZEN_WEBKIT2_CLIPBOARD_HELPER)
507 void didSelectPasteMenuFromContextMenu(const String& data, const String& type);
508 void pasteContextMenuSelected();
510 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
511 void clipboardContextMenuSelected();
512 void executePasteFromClipboardItem(const String& data, const String& type);
514 #if ENABLE(TIZEN_WEBKIT2_REMOTE_WEB_INSPECTOR)
515 uint32_t startInspectorServer(uint32_t port);
516 bool stopInspectorServer();
518 #if ENABLE(TIZEN_MOBILE_WEB_PRINT)
519 void createPagesToPDF(const WebCore::IntSize&, const WebCore::IntSize&, const String&);
522 void scale(double, const WebCore::IntPoint&);
523 void scaleImage(double, const WebCore::IntPoint&);
524 double scaleFactor();
526 #if ENABLE(TIZEN_ORIENTATION_EVENTS)
527 void sendOrientationChangeEvent(int orientation);
530 void suspendPainting();
531 void resumePainting();
533 void suspendJavaScriptAndResource();
534 void resumeJavaScriptAndResource();
536 #if ENABLE(TIZEN_PLUGIN_SUSPEND_RESUME)
537 void suspendPlugin();
541 #endif // #if OS(TIZEN)
543 #if USE(TILED_BACKING_STORE)
544 void setViewportSize(const WebCore::IntSize&);
547 void handleMouseEvent(const NativeWebMouseEvent&);
548 void handleWheelEvent(const NativeWebWheelEvent&);
549 void handleKeyboardEvent(const NativeWebKeyboardEvent&);
550 #if ENABLE(GESTURE_EVENTS)
551 void handleGestureEvent(const WebGestureEvent&);
553 #if ENABLE(TOUCH_EVENTS)
554 void handleTouchEvent(const NativeWebTouchEvent&);
556 void handlePotentialActivation(const WebCore::IntPoint& touchPoint, const WebCore::IntSize& touchArea);
560 void scrollBy(WebCore::ScrollDirection, WebCore::ScrollGranularity);
561 void centerSelectionInVisibleArea();
563 String pageTitle() const;
564 const String& toolTip() const { return m_toolTip; }
566 void setUserAgent(const String&);
567 const String& userAgent() const { return m_userAgent; }
568 void setApplicationNameForUserAgent(const String&);
569 const String& applicationNameForUserAgent() const { return m_applicationNameForUserAgent; }
570 void setCustomUserAgent(const String&);
571 const String& customUserAgent() const { return m_customUserAgent; }
572 static String standardUserAgent(const String& applicationName = String());
573 #if ENABLE(TIZEN_CUSTOM_HEADERS)
574 void addCustomHeader(const String&, const String&);
575 void removeCustomHeader(const String&);
576 void clearCustomHeaders();
579 bool supportsTextEncoding() const;
580 void setCustomTextEncodingName(const String&);
581 String customTextEncodingName() const { return m_customTextEncodingName; }
583 void resumeActiveDOMObjectsAndAnimations();
584 void suspendActiveDOMObjectsAndAnimations();
586 double estimatedProgress() const;
588 void terminateProcess();
590 typedef bool (*WebPageProxySessionStateFilterCallback)(WKPageRef, WKStringRef type, WKTypeRef object, void* context);
591 PassRefPtr<WebData> sessionStateData(WebPageProxySessionStateFilterCallback, void* context) const;
592 void restoreFromSessionStateData(WebData*);
594 bool supportsTextZoom() const;
595 double textZoomFactor() const { return m_mainFrameHasCustomRepresentation ? 1 : m_textZoomFactor; }
596 void setTextZoomFactor(double);
597 double pageZoomFactor() const;
598 void setPageZoomFactor(double);
599 void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
601 void scalePage(double scale, const WebCore::IntPoint& origin);
602 double pageScaleFactor() const { return m_pageScaleFactor; }
604 float deviceScaleFactor() const;
605 void setIntrinsicDeviceScaleFactor(float);
606 void setCustomDeviceScaleFactor(float);
607 void windowScreenDidChange(PlatformDisplayID);
609 LayerHostingMode layerHostingMode() const { return m_layerHostingMode; }
611 void setUseFixedLayout(bool);
612 void setFixedLayoutSize(const WebCore::IntSize&);
613 bool useFixedLayout() const { return m_useFixedLayout; };
614 const WebCore::IntSize& fixedLayoutSize() const { return m_fixedLayoutSize; };
616 bool hasHorizontalScrollbar() const { return m_mainFrameHasHorizontalScrollbar; }
617 bool hasVerticalScrollbar() const { return m_mainFrameHasVerticalScrollbar; }
619 bool isPinnedToLeftSide() const { return m_mainFrameIsPinnedToLeftSide; }
620 bool isPinnedToRightSide() const { return m_mainFrameIsPinnedToRightSide; }
622 void setPaginationMode(WebCore::Page::Pagination::Mode);
623 WebCore::Page::Pagination::Mode paginationMode() const { return m_paginationMode; }
624 void setPaginationBehavesLikeColumns(bool);
625 bool paginationBehavesLikeColumns() const { return m_paginationBehavesLikeColumns; }
626 void setPageLength(double);
627 double pageLength() const { return m_pageLength; }
628 void setGapBetweenPages(double);
629 double gapBetweenPages() const { return m_gapBetweenPages; }
630 unsigned pageCount() const { return m_pageCount; }
633 // Called by the web process through a message.
634 void registerWebProcessAccessibilityToken(const CoreIPC::DataReference&);
635 // Called by the UI process when it is ready to send its tokens to the web process.
636 void registerUIProcessAccessibilityTokens(const CoreIPC::DataReference& elemenToken, const CoreIPC::DataReference& windowToken);
637 bool readSelectionFromPasteboard(const String& pasteboardName);
638 String stringSelectionForPasteboard();
639 PassRefPtr<WebCore::SharedBuffer> dataSelectionForPasteboard(const String& pasteboardType);
640 void makeFirstResponder();
642 ColorSpaceData colorSpace();
645 void pageScaleFactorDidChange(double);
647 void setMemoryCacheClientCallsEnabled(bool);
650 void findString(const String&, FindOptions, unsigned maxMatchCount);
652 void countStringMatches(const String&, FindOptions, unsigned maxMatchCount);
653 void didCountStringMatches(const String&, uint32_t matchCount);
654 void setFindIndicator(const WebCore::FloatRect& selectionRectInWindowCoordinates, const Vector<WebCore::FloatRect>& textRectsInSelectionRectCoordinates, float contentImageScaleFactor, const ShareableBitmap::Handle& contentImageHandle, bool fadeOut, bool animate);
655 void didFindString(const String&, uint32_t matchCount);
656 void didFailToFindString(const String&);
658 void didInstallOrUninstallPageOverlay(bool);
661 void getContentsAsString(PassRefPtr<StringCallback>);
662 void getMainResourceDataOfFrame(WebFrameProxy*, PassRefPtr<DataCallback>);
663 void getResourceDataFromFrame(WebFrameProxy*, WebURL*, PassRefPtr<DataCallback>);
664 void getRenderTreeExternalRepresentation(PassRefPtr<StringCallback>);
665 void getSelectionOrContentsAsString(PassRefPtr<StringCallback>);
666 void getSourceForFrame(WebFrameProxy*, PassRefPtr<StringCallback>);
667 void getWebArchiveOfFrame(WebFrameProxy*, PassRefPtr<DataCallback>);
668 void runJavaScriptInMainFrame(const String&, PassRefPtr<ScriptValueCallback>);
669 void forceRepaint(PassRefPtr<VoidCallback>);
671 #if ENABLE(WEB_INTENTS)
672 void deliverIntentToFrame(WebFrameProxy*, WebIntentData*);
675 float headerHeight(WebFrameProxy*);
676 float footerHeight(WebFrameProxy*);
677 void drawHeader(WebFrameProxy*, const WebCore::FloatRect&);
678 void drawFooter(WebFrameProxy*, const WebCore::FloatRect&);
680 #if ENABLE(SCREEN_ORIENTATION_SUPPORT) && ENABLE(TIZEN_SCREEN_ORIENTATION_SUPPORT)
681 void lockOrientation(int orientation, bool& result);
682 void unlockOrientation();
685 #if ENABLE(TIZEN_FILE_SYSTEM)
686 void allowFileSystem(uint64_t frameID, const String& originIdentifier, bool& result);
691 void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
694 void receivedPolicyDecision(WebCore::PolicyAction, WebFrameProxy*, uint64_t listenerID);
696 void backForwardRemovedItem(uint64_t itemID);
698 #if ENABLE(DRAG_SUPPORT)
699 // Drag and drop support.
700 void dragEntered(WebCore::DragData*, const String& dragStorageName = String());
701 void dragUpdated(WebCore::DragData*, const String& dragStorageName = String());
702 void dragExited(WebCore::DragData*, const String& dragStorageName = String());
703 #if ENABLE(TIZEN_DRAG_SUPPORT)
704 void performDrag(WebCore::DragData*, const String& dragStorageName = String());
706 void performDrag(WebCore::DragData*, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
709 void didPerformDragControllerAction(WebCore::DragSession);
710 void dragEnded(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t operation);
712 void setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, bool isLinkDrag);
713 void setPromisedData(const String& pasteboardName, const SharedMemory::Handle& imageHandle, uint64_t imageSize, const String& filename, const String& extension,
714 const String& title, const String& url, const String& visibleURL, const SharedMemory::Handle& archiveHandle, uint64_t archiveSize);
717 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);
719 #if PLATFORM(QT) || PLATFORM(GTK) || ENABLE(TIZEN_DRAG_SUPPORT)
720 void startDrag(const WebCore::DragData&, const ShareableBitmap::Handle& dragImage);
724 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
725 void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&);
727 void processDidBecomeUnresponsive();
728 void interactionOccurredWhileProcessUnresponsive();
729 void processDidBecomeResponsive();
730 void processDidCrash();
732 #if USE(ACCELERATED_COMPOSITING)
733 virtual void enterAcceleratedCompositingMode(const LayerTreeContext&);
734 virtual void exitAcceleratedCompositingMode();
735 virtual void updateAcceleratedCompositingMode(const LayerTreeContext&);
740 enum UndoOrRedo { Undo, Redo };
741 void addEditCommand(WebEditCommandProxy*);
742 void removeEditCommand(WebEditCommandProxy*);
743 bool isValidEditCommand(WebEditCommandProxy*);
744 void registerEditCommand(PassRefPtr<WebEditCommandProxy>, UndoOrRedo);
747 void registerKeypressCommandName(const String& name) { m_knownKeypressCommandNames.add(name); }
748 bool isValidKeypressCommandName(const String& name) const { return m_knownKeypressCommandNames.contains(name); }
751 WebProcessProxy* process() const;
752 PlatformProcessIdentifier processIdentifier() const;
754 WebPageGroup* pageGroup() const { return m_pageGroup.get(); }
758 const String& urlAtProcessExit() const { return m_urlAtProcessExit; }
759 WebFrameProxy::LoadState loadStateAtProcessExit() const { return m_loadStateAtProcessExit; }
761 #if ENABLE(DRAG_SUPPORT)
762 WebCore::DragSession dragSession() const { return m_currentDragSession; }
763 void resetDragOperation() { m_currentDragSession = WebCore::DragSession(); }
766 void preferencesDidChange();
768 #if ENABLE(CONTEXT_MENUS)
769 // Called by the WebContextMenuProxy.
770 void contextMenuItemSelected(const WebContextMenuItemData&);
773 // Called by the WebOpenPanelResultListenerProxy.
774 void didChooseFilesForOpenPanel(const Vector<String>&);
775 void didCancelForOpenPanel();
777 WebPageCreationParameters creationParameters() const;
780 void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize&);
781 void didReceiveMessageFromNavigatorQtObject(const String&);
784 #if PLATFORM(QT) || PLATFORM(EFL)
785 void handleDownloadRequest(DownloadProxy*);
788 void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize&);
789 #endif // #if OS(TIZEN)
791 void advanceToNextMisspelling(bool startBeforeSelection) const;
792 void changeSpellingToWord(const String& word) const;
794 void uppercaseWord();
795 void lowercaseWord();
796 void capitalizeWord();
800 bool isSmartInsertDeleteEnabled() const { return m_isSmartInsertDeleteEnabled; }
801 void setSmartInsertDeleteEnabled(bool);
805 String accessibilityPlugID() const { return m_accessibilityPlugID; }
808 void setCanRunModal(bool);
811 void beginPrinting(WebFrameProxy*, const PrintInfo&);
813 void computePagesForPrinting(WebFrameProxy*, const PrintInfo&, PassRefPtr<ComputedPagesCallback>);
814 #if PLATFORM(MAC) || PLATFORM(WIN)
815 void drawRectToPDF(WebFrameProxy*, const PrintInfo&, const WebCore::IntRect&, PassRefPtr<DataCallback>);
816 void drawPagesToPDF(WebFrameProxy*, const PrintInfo&, uint32_t first, uint32_t count, PassRefPtr<DataCallback>);
818 void drawPagesForPrinting(WebFrameProxy*, const PrintInfo&, PassRefPtr<PrintFinishedCallback>);
821 const String& pendingAPIRequestURL() const { return m_pendingAPIRequestURL; }
823 void flashBackingStoreUpdates(const Vector<WebCore::IntRect>& updateRects);
826 void handleAlternativeTextUIResult(const String& result);
829 static void setDebugPaintFlags(WKPageDebugPaintFlags flags) { s_debugPaintFlags = flags; }
830 static WKPageDebugPaintFlags debugPaintFlags() { return s_debugPaintFlags; }
832 // Color to be used with kWKDebugFlashViewUpdates.
833 static WebCore::Color viewUpdatesFlashColor();
835 // Color to be used with kWKDebugFlashBackingStoreUpdates.
836 static WebCore::Color backingStoreUpdatesFlashColor();
838 void saveDataToFileInDownloadsFolder(const String& suggestedFilename, const String& mimeType, const String& originatingURLString, WebData*);
840 void linkClicked(const String&, const WebMouseEvent&);
842 WebCore::IntRect visibleScrollerThumbRect() const { return m_visibleScrollerThumbRect; }
844 uint64_t renderTreeSize() const { return m_renderTreeSize; }
846 void setShouldSendEventsSynchronously(bool sync) { m_shouldSendEventsSynchronously = sync; };
847 #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
848 void setFocusedInputElementValue(const String& inputValue);
849 String getFocusedInputElementValue();
852 #if ENABLE(TIZEN_DATALIST_ELEMENT)
853 Vector<String> getFocusedInputElementDataList();
856 void printMainFrame();
858 #if ENABLE(TIZEN_RECORDING_SURFACE_SET)
859 void recordingSurfaceSetEnableSet(bool enable);
862 #if ENABLE(TIZEN_REGISTER_PROTOCOL_HANDLER)
863 void registerProtocolHandler(const String& scheme, const String& baseURL, const String& url, const String& title);
865 #if ENABLE(TIZEN_CUSTOM_SCHEME_HANDLER)
866 void isProtocolHandlerRegistered(const String& scheme, const String& baseURL, const String& url, unsigned int& result);
867 void unregisterProtocolHandler(const String& scheme, const String& baseURL, const String& url);
869 #if ENABLE(TIZEN_REGISTER_CONTENT_HANDLER)
870 void registerContentHandler(const String& mimeType, const String& baseURL, const String& url, const String& title);
871 void isContentHandlerRegistered(const String& mimeType, const String& baseURL, const String& url, unsigned int& result);
872 void unregisterContentHandler(const String& mimeType, const String& baseURL, const String& url);
875 #if ENABLE(TIZEN_SEARCH_PROVIDER)
876 void addSearchProvider(const String& baseURL, const String& engineURL);
877 void isSearchProviderInstalled(const String& baseURL, const String& engineURL, uint64_t& result);
880 #if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
881 void getStandaloneStatus(bool& standalone);
882 void getWebAppCapable(PassRefPtr<BooleanCallback>);
883 void getWebAppIconURL(PassRefPtr<StringCallback>);
886 void setMediaVolume(float);
889 void replyJavaScriptAlert();
890 void replyJavaScriptConfirm(bool result);
891 void replyJavaScriptPrompt(const String& result);
894 #if ENABLE(TIZEN_CERTIFICATE_HANDLING)
895 void replyPolicyForCertificateError(bool result);
898 // WebPopupMenuProxy::Client
899 virtual NativeWebMouseEvent* currentlyProcessedMouseDownEvent();
901 #if ENABLE(TIZEN_PAGE_VISIBILITY_API)
902 void setPageVisibility(WebCore::PageVisibilityState, bool isInitialState);
905 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
906 bool scrollOverflow(const WebCore::FloatPoint&);
907 bool setPressedNodeAtPoint(const WebCore::IntPoint&, bool checkOverflowLayer, WebLayerID&);
908 void setLoadingFinished(const bool isLoadingFinished) { m_isLoadingFinished = isLoadingFinished; }
909 const bool isLoadingFinished() const { return m_isLoadingFinished; }
910 const bool askOverflow() const { return m_askOverflow; }
911 void setOverflowResult(bool pressed, WebLayerID webLayerID);
914 #if ENABLE(TIZEN_ISF_PORT)
915 void updateCursorPosition();
916 int getCursorOffsetPosition();
917 String getContentOfPosition();
918 bool deleteSurroundingPosition();
919 WebCore::IntRect getSelectionRect(bool);
920 void didCancelComposition();
923 void setBackgroundColor(double red, double green, double blue, double alpha);
924 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
925 bool makeContextCurrent();
929 void didRenderFrame();
932 #if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
933 void getTextStyleStateForSelection();
934 void didGetTextStyleStateForSelection(int underlineState, int italicState, int boldState);
937 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
938 void widgetMapped(uint64_t nativeWindowId);
941 void setSuppressVisibilityUpdates(bool flag) { m_suppressVisibilityUpdates = flag; }
942 bool suppressVisibilityUpdates() { return m_suppressVisibilityUpdates; }
944 #if ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
945 #if ENABLE(INPUT_TYPE_COLOR)
946 void setColorChooserColor(const WebCore::Color&);
947 void endColorChooser();
951 #if ENABLE(TIZEN_MULTIPLE_SELECT)
952 void valueChangedForPopupMenuMultiple(WebPopupMenuProxy*, Vector<int32_t> newSelectedIndex);
955 #if ENABLE(TIZEN_NATIVE_MEMORY_SNAPSHOT)
956 void dumpMemorySnapshot();
959 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
960 bool selectClosestWord(const WebCore::IntPoint&, bool isStartedTextSelectionFromOutside);
961 bool setLeftSelection(const WebCore::IntPoint&);
962 bool setRightSelection(const WebCore::IntPoint&);
963 bool getSelectionHandlers(WebCore::IntRect& leftRect, WebCore::IntRect& rightRect);
964 String getSelectionText();
965 bool selectionRangeClear();
969 WebPageProxy(PageClient*, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID);
971 virtual Type type() const { return APIType; }
973 // WebPopupMenuProxy::Client
974 virtual void valueChangedForPopupMenu(WebPopupMenuProxy*, int32_t newSelectedIndex);
975 virtual void setTextFromItemForPopupMenu(WebPopupMenuProxy*, int32_t index);
977 virtual void failedToShowPopupMenu();
980 virtual void changeSelectedIndex(int32_t newSelectedIndex);
981 virtual void closePopupMenu();
984 // Implemented in generated WebPageProxyMessageReceiver.cpp
985 void didReceiveWebPageProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
986 void didReceiveSyncWebPageProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&);
988 void didCreateMainFrame(uint64_t frameID);
989 void didCreateSubframe(uint64_t frameID, uint64_t parentFrameID);
990 void didSaveFrameToPageCache(uint64_t frameID);
991 void didRestoreFrameFromPageCache(uint64_t frameID, uint64_t parentFrameID);
993 void didStartProvisionalLoadForFrame(uint64_t frameID, const String& url, const String& unreachableURL, CoreIPC::ArgumentDecoder*);
994 void didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, const String&, CoreIPC::ArgumentDecoder*);
995 void didFailProvisionalLoadForFrame(uint64_t frameID, const WebCore::ResourceError&, CoreIPC::ArgumentDecoder*);
996 void didCommitLoadForFrame(uint64_t frameID, const String& mimeType, bool frameHasCustomRepresentation, const PlatformCertificateInfo&, CoreIPC::ArgumentDecoder*);
997 void didFinishDocumentLoadForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
998 void didFinishLoadForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
999 void didFailLoadForFrame(uint64_t frameID, const WebCore::ResourceError&, CoreIPC::ArgumentDecoder*);
1000 void didSameDocumentNavigationForFrame(uint64_t frameID, uint32_t sameDocumentNavigationType, const String&, CoreIPC::ArgumentDecoder*);
1001 void didReceiveTitleForFrame(uint64_t frameID, const String&, CoreIPC::ArgumentDecoder*);
1002 void didFirstLayoutForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
1003 void didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
1004 void didNewFirstVisuallyNonEmptyLayout(CoreIPC::ArgumentDecoder*);
1005 void didRemoveFrameFromHierarchy(uint64_t frameID, CoreIPC::ArgumentDecoder*);
1006 void didDisplayInsecureContentForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
1007 void didRunInsecureContentForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
1008 void didDetectXSSForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
1009 void frameDidBecomeFrameSet(uint64_t frameID, bool);
1010 void didStartProgress();
1011 void didChangeProgress(double);
1012 void didFinishProgress();
1014 #if ENABLE(TIZEN_PLUGIN_CUSTOM_REQUEST)
1015 void processPluginCustomRequest(const String& request, const String& msg);
1018 #if ENABLE(WEB_INTENTS)
1019 void didReceiveIntentForFrame(uint64_t frameID, const IntentData&, CoreIPC::ArgumentDecoder*);
1021 #if ENABLE(WEB_INTENTS_TAG)
1022 void registerIntentServiceForFrame(uint64_t frameID, const IntentServiceInfo&, CoreIPC::ArgumentDecoder*);
1025 #if ENABLE(TIZEN_DOWNLOAD_ATTRIBUTE)
1026 // Called by the web process through a message when the download need to be initiated from the web process.
1027 void startDownload(const WebCore::ResourceRequest&, const String& suggestedName = String());
1030 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);
1031 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*);
1032 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);
1033 void unableToImplementPolicy(uint64_t frameID, const WebCore::ResourceError&, CoreIPC::ArgumentDecoder* arguments);
1035 void willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const StringPairVector& textFieldValues, uint64_t listenerID, CoreIPC::ArgumentDecoder*);
1037 // Resource load client
1038 void didInitiateLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, const WebCore::ResourceRequest&, bool pageIsProvisionallyLoading);
1039 void didSendRequestForResource(uint64_t frameID, uint64_t resourceIdentifier, const WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirectResponse);
1040 void didReceiveResponseForResource(uint64_t frameID, uint64_t resourceIdentifier, const WebCore::ResourceResponse&);
1041 void didReceiveContentLengthForResource(uint64_t frameID, uint64_t resourceIdentifier, uint64_t contentLength);
1042 void didFinishLoadForResource(uint64_t frameID, uint64_t resourceIdentifier);
1043 void didFailLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, const WebCore::ResourceError&);
1046 void createNewPage(const WebCore::ResourceRequest&, const WebCore::WindowFeatures&, uint32_t modifiers, int32_t mouseButton, uint64_t& newPageID, WebPageCreationParameters&);
1048 void closePage(bool stopResponsivenessTimer);
1050 void runJavaScriptAlert(uint64_t frameID, const String&, PassRefPtr<Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply>);
1051 void runJavaScriptConfirm(uint64_t frameID, const String&, PassRefPtr<Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply>);
1052 void runJavaScriptPrompt(uint64_t frameID, const String&, const String&, PassRefPtr<Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply>);
1054 void runJavaScriptAlert(uint64_t frameID, const String&);
1055 void runJavaScriptConfirm(uint64_t frameID, const String&, bool& result);
1056 void runJavaScriptPrompt(uint64_t frameID, const String&, const String&, String& result);
1058 void shouldInterruptJavaScript(bool& result);
1059 void setStatusText(const String&);
1060 void mouseDidMoveOverElement(const WebHitTestResult::Data& hitTestResultData, uint32_t modifiers, CoreIPC::ArgumentDecoder*);
1061 void unavailablePluginButtonClicked(uint32_t opaquePluginUnavailabilityReason, const String& mimeType, const String& url, const String& pluginsPageURL);
1062 void setToolbarsAreVisible(bool toolbarsAreVisible);
1063 void getToolbarsAreVisible(bool& toolbarsAreVisible);
1064 void setMenuBarIsVisible(bool menuBarIsVisible);
1065 void getMenuBarIsVisible(bool& menuBarIsVisible);
1066 void setStatusBarIsVisible(bool statusBarIsVisible);
1067 void getStatusBarIsVisible(bool& statusBarIsVisible);
1068 void setIsResizable(bool isResizable);
1069 void getIsResizable(bool& isResizable);
1070 void setWindowFrame(const WebCore::FloatRect&);
1071 void getWindowFrame(WebCore::FloatRect&);
1072 void screenToWindow(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint);
1073 void windowToScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);
1074 void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, bool& shouldClose);
1075 void didChangeViewportProperties(const WebCore::ViewportAttributes&);
1076 void pageDidScroll();
1077 void runOpenPanel(uint64_t frameID, const WebCore::FileChooserSettings&);
1078 void printFrame(uint64_t frameID);
1079 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);
1080 void requestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_t frameID, String originIdentifier);
1082 void notifyScrollerThumbIsVisibleInRect(const WebCore::IntRect&);
1083 void recommendedScrollbarStyleDidChange(int32_t newStyle);
1084 void didChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar);
1085 void didChangeScrollOffsetPinningForMainFrame(bool pinnedToLeftSide, bool pinnedToRightSide);
1087 void didChangeScrollPositionForMainFrame(const WebCore::IntPoint&);
1089 void didChangePageCount(unsigned);
1090 void didFailToInitializePlugin(const String& mimeType);
1091 void didBlockInsecurePluginVersion(const String& mimeType, const String& urlString);
1092 void setCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents) { m_canShortCircuitHorizontalWheelEvents = canShortCircuitHorizontalWheelEvents; }
1094 void reattachToWebProcess();
1095 void reattachToWebProcessWithItem(WebBackForwardListItem*);
1097 void requestNotificationPermission(uint64_t notificationID, const String& originString);
1099 void showNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& originString, uint64_t notificationID);
1101 #if ENABLE(TIZEN_MEDIA_STREAM)
1102 void requestUserMediaPermission(uint64_t userMediaID);
1105 #if USE(TILED_BACKING_STORE)
1106 void pageDidRequestScroll(const WebCore::IntPoint&);
1109 #if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
1110 void pageDidRequestRestoreVisibleContentRect(const WebCore::IntPoint&, float);
1113 #if PLATFORM(QT) || OS(TIZEN)
1114 void didChangeContentsSize(const WebCore::IntSize&);
1115 void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&);
1117 #if ENABLE(TOUCH_EVENTS)
1118 void needTouchEvents(bool);
1121 #if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
1122 void didGetWebAppCapable(const bool capable, uint64_t callbackID);
1123 void didGetWebAppIconURL(const String& iconURL, uint64_t callbackID);
1125 #if ENABLE(TIZEN_ICON_DATABASE)
1126 void didReceiveIcon();
1129 #if ENABLE(INPUT_TYPE_COLOR)
1130 void showColorChooser(const WebCore::Color& initialColor);
1131 #if !ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
1132 void setColorChooserColor(const WebCore::Color&);
1133 void endColorChooser();
1135 void didChooseColor(const WebCore::Color&);
1136 void didEndColorChooser();
1139 void editorStateChanged(const EditorState&);
1141 // Back/Forward list management
1142 void backForwardAddItem(uint64_t itemID);
1143 void backForwardGoToItem(uint64_t itemID, SandboxExtension::Handle&);
1144 void backForwardItemAtIndex(int32_t index, uint64_t& itemID);
1145 void backForwardBackListCount(int32_t& count);
1146 void backForwardForwardListCount(int32_t& count);
1147 void backForwardClear();
1150 void registerEditCommandForUndo(uint64_t commandID, uint32_t editAction);
1151 void clearAllEditCommands();
1152 void canUndoRedo(uint32_t action, bool& result);
1153 void executeUndoRedo(uint32_t action, bool& result);
1155 // Keyboard handling
1157 void interpretQueuedKeyEvent(const EditorState&, bool& handled, Vector<WebCore::KeypressCommand>&);
1158 void executeSavedCommandBySelector(const String& selector, bool& handled);
1162 void getEditorCommandsForKeyEvent(const AtomicString&, Vector<String>&);
1163 void bindAccessibilityTree(const String&);
1166 void getEditorCommandsForKeyEvent(Vector<String>&);
1170 void showPopupMenu(const WebCore::IntRect& rect, uint64_t textDirection, const Vector<WebPopupItem>& items, int32_t selectedIndex, const PlatformPopupMenuData&);
1171 void hidePopupMenu();
1173 void setPopupMenuSelectedIndex(int32_t);
1175 #if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL)
1176 void updatePopupMenu(uint64_t textDirection, const Vector<WebPopupItem>& items, int32_t selectedIndex);
1179 #if ENABLE(CONTEXT_MENUS)
1181 void showContextMenu(const WebCore::IntPoint& menuLocation, const WebHitTestResult::Data&, const Vector<WebContextMenuItemData>&, CoreIPC::ArgumentDecoder*);
1182 void internalShowContextMenu(const WebCore::IntPoint& menuLocation, const WebHitTestResult::Data&, const Vector<WebContextMenuItemData>&, CoreIPC::ArgumentDecoder*);
1185 // Search popup results
1186 void saveRecentSearches(const String&, const Vector<String>&);
1187 void loadRecentSearches(const String&, Vector<String>&);
1191 void getIsSpeaking(bool&);
1192 void speak(const String&);
1193 void stopSpeaking();
1196 void searchWithSpotlight(const String&);
1199 void didPerformDictionaryLookup(const String&, const DictionaryPopupInfo&);
1202 // Spelling and grammar.
1203 int64_t spellDocumentTag();
1204 #if USE(UNIFIED_TEXT_CHECKING)
1205 void checkTextOfParagraph(const String& text, uint64_t checkingTypes, Vector<WebCore::TextCheckingResult>& results);
1207 void checkSpellingOfString(const String& text, int32_t& misspellingLocation, int32_t& misspellingLength);
1208 void checkGrammarOfString(const String& text, Vector<WebCore::GrammarDetail>&, int32_t& badGrammarLocation, int32_t& badGrammarLength);
1209 void spellingUIIsShowing(bool&);
1210 void updateSpellingUIWithMisspelledWord(const String& misspelledWord);
1211 void updateSpellingUIWithGrammarString(const String& badGrammarPhrase, const WebCore::GrammarDetail&);
1212 void getGuessesForWord(const String& word, const String& context, Vector<String>& guesses);
1214 #if ENABLE(TIZEN_ISF_PORT)
1215 void setInputMethodState(bool, const String&, const String&);
1217 void setInputMethodState(bool active);
1220 void learnWord(const String& word);
1221 void ignoreWord(const String& word);
1223 void setFocus(bool focused);
1224 void takeFocus(uint32_t direction);
1225 void setToolTip(const String&);
1226 void setCursor(const WebCore::Cursor&);
1227 void setCursorHiddenUntilMouseMoves(bool);
1229 void didReceiveEvent(uint32_t opaqueType, bool handled);
1230 void stopResponsivenessTimer();
1232 void voidCallback(uint64_t);
1233 void dataCallback(const CoreIPC::DataReference&, uint64_t);
1234 void stringCallback(const String&, uint64_t);
1235 void scriptValueCallback(const CoreIPC::DataReference&, uint64_t);
1236 void computedPagesCallback(const Vector<WebCore::IntRect>&, double totalScaleFactorForPrinting, uint64_t);
1237 void validateCommandCallback(const String&, bool, int, uint64_t);
1239 void printFinishedCallback(const WebCore::ResourceError&, uint64_t);
1242 void focusedFrameChanged(uint64_t frameID);
1243 void frameSetLargestFrameChanged(uint64_t frameID);
1245 void canAuthenticateAgainstProtectionSpaceInFrame(uint64_t frameID, const WebCore::ProtectionSpace&, bool& canAuthenticate);
1246 void didReceiveAuthenticationChallenge(uint64_t frameID, const WebCore::AuthenticationChallenge&, uint64_t challengeID);
1248 void didFinishLoadingDataForCustomRepresentation(const String& suggestedFilename, const CoreIPC::DataReference&);
1251 void pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus);
1252 void setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t complexTextInputState);
1255 void clearPendingAPIRequestURL() { m_pendingAPIRequestURL = String(); }
1256 void setPendingAPIRequestURL(const String& pendingAPIRequestURL) { m_pendingAPIRequestURL = pendingAPIRequestURL; }
1258 bool maybeInitializeSandboxExtensionHandle(const WebCore::KURL&, SandboxExtension::Handle&);
1261 void substitutionsPanelIsShowing(bool&);
1262 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
1263 void showCorrectionPanel(int32_t panelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
1264 void dismissCorrectionPanel(int32_t reason);
1265 void dismissCorrectionPanelSoon(int32_t reason, String& result);
1266 void recordAutocorrectionResponse(int32_t responseType, const String& replacedString, const String& replacementString);
1267 #endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
1269 #if USE(DICTATION_ALTERNATIVES)
1270 void showDictationAlternativeUI(const WebCore::FloatRect& boundingBoxOfDictatedText, uint64_t dictationContext);
1271 void dismissDictationAlternativeUI();
1272 void removeDictationAlternatives(uint64_t dictationContext);
1273 void dictationAlternatives(uint64_t dictationContext, Vector<String>& result);
1275 #endif // PLATFORM(MAC)
1277 void clearLoadDependentCallbacks();
1279 void performDragControllerAction(DragControllerAction, WebCore::DragData*, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
1281 void updateBackingStoreDiscardableState();
1284 void scheduleChildWindowGeometryUpdate(const WindowGeometry&);
1287 void setRenderTreeSize(uint64_t treeSize) { m_renderTreeSize = treeSize; }
1289 #if PLUGIN_ARCHITECTURE(X11)
1290 void createPluginContainer(uint64_t& windowID);
1291 void windowedPluginGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect, uint64_t windowID);
1294 void processNextQueuedWheelEvent();
1295 void sendWheelEvent(const WebWheelEvent&);
1297 #if ENABLE(TIZEN_CERTIFICATE_HANDLING)
1298 void decidePolicyForCertificateError(const String& url, const String& certificate, int error, PassRefPtr<Messages::WebPageProxy::DecidePolicyForCertificateError::DelayedReply>);
1301 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
1302 bool isWaitingForJavaScriptPopupReply();
1305 PageClient* m_pageClient;
1306 WebLoaderClient m_loaderClient;
1307 WebPolicyClient m_policyClient;
1308 WebFormClient m_formClient;
1309 WebResourceLoadClient m_resourceLoadClient;
1310 WebUIClient m_uiClient;
1311 WebFindClient m_findClient;
1312 #if ENABLE(CONTEXT_MENUS)
1313 WebPageContextMenuClient m_contextMenuClient;
1316 WebTizenClient m_tizenClient;
1319 OwnPtr<DrawingAreaProxy> m_drawingArea;
1320 RefPtr<WebProcessProxy> m_process;
1321 RefPtr<WebPageGroup> m_pageGroup;
1322 RefPtr<WebFrameProxy> m_mainFrame;
1323 RefPtr<WebFrameProxy> m_focusedFrame;
1324 RefPtr<WebFrameProxy> m_frameSetLargestFrame;
1327 String m_applicationNameForUserAgent;
1328 String m_customUserAgent;
1329 String m_customTextEncodingName;
1331 #if ENABLE(INSPECTOR)
1332 RefPtr<WebInspectorProxy> m_inspector;
1335 #if ENABLE(FULLSCREEN_API)
1336 RefPtr<WebFullScreenManagerProxy> m_fullScreenManager;
1339 #if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
1340 HashMap<uint64_t, RefPtr<BooleanCallback> > m_booleanCallbacks;
1342 HashMap<uint64_t, RefPtr<VoidCallback> > m_voidCallbacks;
1343 HashMap<uint64_t, RefPtr<DataCallback> > m_dataCallbacks;
1344 HashMap<uint64_t, RefPtr<StringCallback> > m_stringCallbacks;
1345 HashSet<uint64_t> m_loadDependentStringCallbackIDs;
1346 HashMap<uint64_t, RefPtr<ScriptValueCallback> > m_scriptValueCallbacks;
1347 HashMap<uint64_t, RefPtr<ComputedPagesCallback> > m_computedPagesCallbacks;
1348 HashMap<uint64_t, RefPtr<ValidateCommandCallback> > m_validateCommandCallbacks;
1350 HashMap<uint64_t, RefPtr<PrintFinishedCallback> > m_printFinishedCallbacks;
1352 #if ENABLE(TIZEN_WEB_STORAGE)
1353 HashMap<uint64_t, RefPtr<WebStorageQuotaCallback> > m_quotaCallbacks;
1356 HashSet<WebEditCommandProxy*> m_editCommandSet;
1359 HashSet<String> m_knownKeypressCommandNames;
1362 RefPtr<WebPopupMenuProxy> m_activePopupMenu;
1363 RefPtr<WebContextMenuProxy> m_activeContextMenu;
1364 WebHitTestResult::Data m_activeContextMenuHitTestResultData;
1365 RefPtr<WebOpenPanelResultListenerProxy> m_openPanelResultListener;
1366 GeolocationPermissionRequestManagerProxy m_geolocationPermissionRequestManager;
1367 NotificationPermissionRequestManagerProxy m_notificationPermissionRequestManager;
1368 #if ENABLE(TIZEN_MEDIA_STREAM)
1369 UserMediaPermissionRequestManagerProxy m_userMediaPermissionRequestManager;
1371 double m_estimatedProgress;
1373 // Whether the web page is contained in a top-level window.
1376 // Whether the page is visible; if the backing view is visible and inserted into a window.
1380 bool m_canGoForward;
1381 RefPtr<WebBackForwardList> m_backForwardList;
1383 bool m_maintainsInactiveSelection;
1387 String m_urlAtProcessExit;
1388 WebFrameProxy::LoadState m_loadStateAtProcessExit;
1390 EditorState m_editorState;
1392 double m_textZoomFactor;
1393 double m_pageZoomFactor;
1394 double m_pageScaleFactor;
1395 float m_intrinsicDeviceScaleFactor;
1396 float m_customDeviceScaleFactor;
1398 LayerHostingMode m_layerHostingMode;
1400 bool m_drawsBackground;
1401 bool m_drawsTransparentBackground;
1403 bool m_areMemoryCacheClientCallsEnabled;
1405 bool m_useFixedLayout;
1406 WebCore::IntSize m_fixedLayoutSize;
1408 WebCore::Page::Pagination::Mode m_paginationMode;
1409 bool m_paginationBehavesLikeColumns;
1410 double m_pageLength;
1411 double m_gapBetweenPages;
1413 // If the process backing the web page is alive and kicking.
1416 // Whether WebPageProxy::close() has been called on this page.
1419 // Whether it can run modal child web pages.
1422 bool m_isInPrintingMode;
1423 bool m_isPerformingDOMPrintOperation;
1425 bool m_inDecidePolicyForResponse;
1426 bool m_syncMimeTypePolicyActionIsValid;
1427 WebCore::PolicyAction m_syncMimeTypePolicyAction;
1428 uint64_t m_syncMimeTypePolicyDownloadID;
1430 bool m_inDecidePolicyForNavigationAction;
1431 bool m_syncNavigationActionPolicyActionIsValid;
1432 WebCore::PolicyAction m_syncNavigationActionPolicyAction;
1433 uint64_t m_syncNavigationActionPolicyDownloadID;
1435 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
1436 #if ENABLE(GESTURE_EVENTS)
1437 Deque<QueuedUIEvents<WebGestureEvent> > m_gestureEventQueue;
1439 Deque<QueuedUIEvents<NativeWebKeyboardEvent> > m_keyEventQueue;
1441 #if ENABLE(GESTURE_EVENTS)
1442 Deque<WebGestureEvent> m_gestureEventQueue;
1444 Deque<NativeWebKeyboardEvent> m_keyEventQueue;
1446 Deque<NativeWebWheelEvent> m_wheelEventQueue;
1447 Deque<OwnPtr<Vector<NativeWebWheelEvent> > > m_currentlyProcessedWheelEvents;
1449 bool m_processingMouseMoveEvent;
1450 OwnPtr<NativeWebMouseEvent> m_nextMouseMoveEvent;
1451 OwnPtr<NativeWebMouseEvent> m_currentlyProcessedMouseDownEvent;
1453 #if ENABLE(TOUCH_EVENTS)
1454 bool m_needTouchEvents;
1455 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
1456 Deque<QueuedUIEvents<NativeWebTouchEvent> > m_touchEventQueue;
1458 Deque<QueuedTouchEvents> m_touchEventQueue;
1461 #if ENABLE(INPUT_TYPE_COLOR)
1462 RefPtr<WebColorChooserProxy> m_colorChooser;
1463 #if ENABLE(TIZEN_INPUT_COLOR_PICKER) // wait for upstream
1464 RefPtr<WebColorPickerResultListenerProxy> m_colorPickerResultListener;
1467 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
1468 bool m_isLoadingFinished; //if the page loading is finished, then set to true.
1474 bool m_isPageSuspended;
1477 bool m_isSmartInsertDeleteEnabled;
1481 String m_accessibilityPlugID;
1484 int64_t m_spellDocumentTag;
1485 bool m_hasSpellDocumentTag;
1486 unsigned m_pendingLearnOrIgnoreWordMessageCount;
1488 bool m_mainFrameHasCustomRepresentation;
1490 #if ENABLE(DRAG_SUPPORT)
1491 WebCore::DragSession m_currentDragSession;
1494 String m_pendingAPIRequestURL;
1496 bool m_mainFrameHasHorizontalScrollbar;
1497 bool m_mainFrameHasVerticalScrollbar;
1499 // Whether horizontal wheel events can be handled directly for swiping purposes.
1500 bool m_canShortCircuitHorizontalWheelEvents;
1502 bool m_mainFrameIsPinnedToLeftSide;
1503 bool m_mainFrameIsPinnedToRightSide;
1506 WebCore::IntPoint m_scrollPosition;
1507 WebCore::IntSize m_contentsSize;
1509 unsigned m_pageCount;
1511 WebCore::IntRect m_visibleScrollerThumbRect;
1513 uint64_t m_renderTreeSize;
1515 static WKPageDebugPaintFlags s_debugPaintFlags;
1517 bool m_shouldSendEventsSynchronously;
1519 bool m_suppressVisibilityUpdates;
1521 float m_mediaVolume;
1524 WTF::HashSet<RefPtr<QtRefCountedNetworkRequestData> > m_applicationSchemeRequests;
1527 #if ENABLE(PAGE_VISIBILITY_API)
1528 WebCore::PageVisibilityState m_visibilityState;
1532 RefPtr<Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply> m_alertReply;
1533 RefPtr<Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply> m_confirmReply;
1534 RefPtr<Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply> m_promptReply;
1537 #if ENABLE(TIZEN_CERTIFICATE_HANDLING)
1538 RefPtr<Messages::WebPageProxy::DecidePolicyForCertificateError::DelayedReply> m_allowedReply;
1543 } // namespace WebKit
1545 #endif // WebPageProxy_h