327288679aa992cca78cc42eb5878ee9b6c9e92b
[WebKit.git] / Source / WebKit2 / WebProcess / WebPage / WebPage.messages.in
1 # Copyright (C) 2010 Apple Inc. All rights reserved.
2 #
3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions
5 # are met:
6 # 1.  Redistributions of source code must retain the above copyright
7 #     notice, this list of conditions and the following disclaimer.
8 # 2.  Redistributions in binary form must reproduce the above copyright
9 #     notice, this list of conditions and the following disclaimer in the
10 #     documentation and/or other materials provided with the distribution.
11 #
12 # THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
13 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
14 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
15 # DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
16 # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
18 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
19 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
20 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
21 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
23 messages -> WebPage {
24     SetActive(bool active)
25     SetFocused(bool focused)
26     SetInitialFocus(bool forward)
27     SetIsInWindow(bool isInWindow)
28
29     SetDrawsBackground(bool drawsBackground)
30     SetDrawsTransparentBackground(bool drawsTransparentBackground)
31
32     KeyEvent(WebKit::WebKeyboardEvent event)
33     MouseEvent(WebKit::WebMouseEvent event)
34     WheelEvent(WebKit::WebWheelEvent event)
35 #if ENABLE(TOUCH_EVENTS)
36     TouchEvent(WebKit::WebTouchEvent event)
37 #endif
38
39     GoBack(uint64_t backForwardItemID)
40     GoForward(uint64_t backForwardItemID)
41     GoToBackForwardItem(uint64_t backForwardItemID)
42     LoadHTMLString(WTF::String htmlString, WTF::String baseURL)
43     LoadAlternateHTMLString(WTF::String htmlString, WTF::String baseURL, WTF::String unreachableURL); 
44     LoadPlainTextString(WTF::String string)
45     LoadURL(WTF::String url, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
46     LoadURLRequest(WebCore::ResourceRequest request, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
47     Reload(bool reloadFromOrigin)
48     StopLoading()
49     
50     RestoreSessionAndNavigateToCurrentItem(WebKit::SessionState state)
51
52     DidRemoveBackForwardItem(uint64_t backForwardItemID)
53
54     DidReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID)
55
56     # Callbacks.
57     GetContentsAsString(uint64_t callbackID)
58     GetMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID)
59     GetResourceDataFromFrame(uint64_t frameID, WTF::String resourceURL, uint64_t callbackID)
60     GetRenderTreeExternalRepresentation(uint64_t callbackID)
61     GetSelectionOrContentsAsString(uint64_t callbackID)
62     GetSourceForFrame(uint64_t frameID, uint64_t callbackID)
63     GetWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID)
64     RunJavaScriptInMainFrame(WTF::String script, uint64_t callbackID)
65
66     PreferencesDidChange(WebKit::WebPreferencesStore store)
67
68     SetUserAgent(WTF::String userAgent)
69     SetCustomTextEncodingName(WTF::String encodingName)
70
71 #if ENABLE(TILED_BACKING_STORE)
72     SetActualVisibleContentRect(WebCore::IntRect rect)
73     SetResizesToContentsUsingLayoutSize(WebCore::IntSize size)
74 #endif
75
76     Close()
77     TryClose()
78
79     ValidateMenuItem(WTF::String name)
80     ExecuteEditCommand(WTF::String name)
81
82     DidRemoveEditCommand(uint64_t commandID)
83     ReapplyEditCommand(uint64_t commandID)
84     UnapplyEditCommand(uint64_t commandID)
85
86     SetPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor)
87     SetPageZoomFactor(double zoomFactor)
88     SetTextZoomFactor(double zoomFactor)
89
90     ScaleWebView(double scale, WebCore::IntPoint origin)
91
92     SetUseFixedLayout(bool fixed)
93     SetFixedLayoutSize(WebCore::IntSize size)
94
95     # Find.
96     FindString(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
97     HideFindUI()
98     CountStringMatches(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
99
100     # Drag and drop.
101     PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, WTF::String dragStorageName, uint32_t flags)
102     DragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation)
103
104     # Popup menu.
105     DidChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
106     SetTextForActivePopupMenu(int32_t index);
107     
108     # Context menu.
109     DidSelectItemFromActiveContextMenu(WebKit::WebContextMenuItemData menuItem);
110
111     # Open panel.
112     DidChooseFilesForOpenPanel(Vector<WTF::String> fileURLs)
113     DidCancelForOpenPanel()
114
115     # Spelling and grammar.
116     AdvanceToNextMisspelling(bool startBeforeSelection)
117     ChangeSpellingToWord(WTF::String word)
118     UnmarkAllMisspellings()
119     UnmarkAllBadGrammar()
120 #if PLATFORM(MAC)
121     UppercaseWord();
122     LowercaseWord();
123     CapitalizeWord();
124
125     SetSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled);
126 #endif
127
128     # Geolocation
129     DidReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed)
130
131     SetWindowResizerSize(WebCore::IntSize intersectsView)
132
133     # Printing.
134     BeginPrinting(uint64_t frameID, WebKit::PrintInfo printInfo);
135     EndPrinting();
136     ComputePagesForPrinting(uint64_t frameID, WebKit::PrintInfo printInfo) -> (Vector<WebCore::IntRect> pageRects, double totalScaleFactorForPrinting)
137 #if PLATFORM(MAC)
138     DrawRectToPDF(uint64_t frameID, WebCore::IntRect rect) -> (Vector<uint8_t> pdfData)
139 #endif
140
141     // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
142     // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
143     Dummy() -> (bool dummyReturn)
144
145 #if PLATFORM(MAC)
146     # Complex text input support for plug-ins.
147     SendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, String textInput)
148
149     SetWindowIsVisible(bool windowIsVisible)
150     WindowAndViewFramesChanged(WebCore::IntRect windowFrameInScreenCoordinates, WebCore::IntRect viewFrameInWindowCoordinates, WebCore::IntPoint accessibilityViewCoordinates)
151     GetMarkedRange() -> (uint64_t location, uint64_t length)
152     CharacterIndexForPoint(WebCore::IntPoint point) -> (uint64_t result)
153     FirstRectForCharacterRange(uint64_t location, uint64_t length) -> (WebCore::IntRect resultRect)
154     SendAccessibilityPresenterToken(CoreIPC::DataReference token)
155 #endif
156 #if PLATFORM(WIN)
157     ConfirmComposition(WTF::String compositionString)
158     SetComposition(WTF::String compositionString, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t cursorPosition)
159     FirstRectForCharacterInSelectedRange(uint64_t characterPosition) -> (WebCore::IntRect resultRect)
160     GetSelectedText() -> (WTF::String text)
161 #endif
162 #if PLATFORM(QT)
163     FindZoomableAreaForPoint(WebCore::IntPoint point)
164 #endif
165 }