6d2313aecc46bdf85e6eabc87abf43beaa6013f8
[WebKit-https.git] / Source / WebKit2 / WebProcess / WebPage / WebPage.messages.in
1 # Copyright (C) 2010, 2011 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 LegacyReceiver {
24     SetInitialFocus(bool forward, bool isKeyboardEventValid, WebKit::WebKeyboardEvent event)
25     SetViewState(unsigned viewState, bool wantsDidUpdateViewState)
26
27     SetDrawsBackground(bool drawsBackground)
28     SetDrawsTransparentBackground(bool drawsTransparentBackground)
29
30     SetUnderlayColor(WebCore::Color color)
31
32     ViewWillStartLiveResize()
33     ViewWillEndLiveResize()
34
35     KeyEvent(WebKit::WebKeyboardEvent event)
36     KeyEventSyncForTesting(WebKit::WebKeyboardEvent event) -> (bool handled)
37     MouseEvent(WebKit::WebMouseEvent event)
38     MouseEventSyncForTesting(WebKit::WebMouseEvent event) -> (bool handled)
39     WheelEventSyncForTesting(WebKit::WebWheelEvent event) -> (bool handled)
40 #if PLATFORM(IOS)
41     HandleTap(WebCore::IntPoint point)
42     TapHighlightAtPosition(uint64_t requestID, WebCore::FloatPoint point)
43     BlurAssistedNode()
44     SelectWithGesture(WebCore::IntPoint point, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID)
45     UpdateSelectionWithTouches(WebCore::IntPoint point, uint32_t touches, bool baseIsStart, uint64_t callbackID)
46     SelectWithTwoTouches(WebCore::IntPoint from, WebCore::IntPoint to, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID)
47     ExtendSelection(uint32_t granularity)
48     RequestAutocorrectionData(String textForAutocorrection, uint64_t callbackID)
49     ApplyAutocorrection(String correction, String originalText, uint64_t callbackID)
50 #endif
51
52 #if ENABLE(TOUCH_EVENTS)
53     TouchEvent(WebKit::WebTouchEvent event)
54     TouchEventSyncForTesting(WebKit::WebTouchEvent event) -> (bool handled)
55 #endif
56
57 #if ENABLE(INPUT_TYPE_COLOR)
58     DidEndColorPicker()
59     DidChooseColor(WebCore::Color color)
60 #endif
61
62 #if ENABLE(CONTEXT_MENUS)
63     ContextMenuHidden()
64 #endif
65
66     ScrollBy(uint32_t scrollDirection, uint32_t scrollGranularity)
67     CenterSelectionInVisibleArea()
68
69     GoBack(uint64_t backForwardItemID)
70     GoForward(uint64_t backForwardItemID)
71     GoToBackForwardItem(uint64_t backForwardItemID)
72     TryRestoreScrollPosition()
73
74     LoadURL(WTF::String url, WebKit::SandboxExtension::Handle sandboxExtensionHandle, WebKit::WebContextUserMessageEncoder userData) Variadic
75     LoadURLInFrame(WTF::String url, uint64_t frameID)
76     LoadURLRequest(WebCore::ResourceRequest request, WebKit::SandboxExtension::Handle sandboxExtensionHandle, WebKit::WebContextUserMessageEncoder userData) Variadic
77     LoadData(CoreIPC::DataReference data, WTF::String MIMEType, WTF::String encoding, WTF::String baseURL, WebKit::WebContextUserMessageEncoder userData) Variadic
78     LoadHTMLString(WTF::String htmlString, WTF::String baseURL, WebKit::WebContextUserMessageEncoder userData) Variadic
79     LoadAlternateHTMLString(WTF::String htmlString, WTF::String baseURL, WTF::String unreachableURL, WebKit::WebContextUserMessageEncoder userData) Variadic
80     LoadPlainTextString(WTF::String string, WebKit::WebContextUserMessageEncoder userData) Variadic
81     LoadWebArchiveData(CoreIPC::DataReference webArchiveData, WebKit::WebContextUserMessageEncoder userData) Variadic
82
83     LinkClicked(WTF::String url, WebKit::WebMouseEvent event)
84
85     Reload(bool reloadFromOrigin, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
86     StopLoading()
87
88     StopLoadingFrame(uint64_t frameID)
89     
90     RestoreSession(WebKit::SessionState state)
91     RestoreSessionAndNavigateToCurrentItem(WebKit::SessionState state)
92
93     DidRemoveBackForwardItem(uint64_t backForwardItemID)
94     SetWillGoToBackForwardItemCallbackEnabled(bool willGoToBackForwardItemEnabled)
95
96     DidReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID)
97
98     ClearSelection()
99
100     # Callbacks.
101     GetContentsAsString(uint64_t callbackID)
102 #if ENABLE(MHTML)
103     GetContentsAsMHTMLData(uint64_t callbackID, bool useBinaryEncoding)
104 #endif
105     GetMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID)
106     GetResourceDataFromFrame(uint64_t frameID, WTF::String resourceURL, uint64_t callbackID)
107     GetRenderTreeExternalRepresentation(uint64_t callbackID)
108     GetSelectionOrContentsAsString(uint64_t callbackID)
109     GetSelectionAsWebArchiveData(uint64_t callbackID)
110     GetSourceForFrame(uint64_t frameID, uint64_t callbackID)
111     GetWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID)
112     RunJavaScriptInMainFrame(WTF::String script, uint64_t callbackID)
113     ForceRepaint(uint64_t callbackID)
114
115 #if PLATFORM(MAC)
116     # Dictionary support.
117     PerformDictionaryLookupAtLocation(WebCore::FloatPoint point)
118 #endif
119
120     PreferencesDidChange(WebKit::WebPreferencesStore store)
121
122     SetUserAgent(WTF::String userAgent)
123     SetCustomTextEncodingName(WTF::String encodingName)
124
125     SuspendActiveDOMObjectsAndAnimations()
126     ResumeActiveDOMObjectsAndAnimations()
127
128     Close()
129     TryClose()
130
131     ValidateCommand(WTF::String name, uint64_t callbackID)
132     ExecuteEditCommand(WTF::String name)
133
134     DidRemoveEditCommand(uint64_t commandID)
135     ReapplyEditCommand(uint64_t commandID)
136     UnapplyEditCommand(uint64_t commandID)
137
138     SetPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor)
139     SetPageZoomFactor(double zoomFactor)
140     SetTextZoomFactor(double zoomFactor)
141     WindowScreenDidChange(uint64_t displayID)
142
143     ScalePage(double scale, WebCore::IntPoint origin)
144
145     SetUseFixedLayout(bool fixed)
146     SetFixedLayoutSize(WebCore::IntSize size)
147     ListenForLayoutMilestones(uint32_t milestones)
148     SetSuppressScrollbarAnimations(bool suppressAnimations)
149
150     SetPaginationMode(uint32_t mode)
151     SetPaginationBehavesLikeColumns(bool behavesLikeColumns)
152     SetPageLength(double pageLength)
153     SetGapBetweenPages(double gap)
154
155     PostInjectedBundleMessage(WTF::String messageName, WebKit::WebContextUserMessageEncoder messageBody) Variadic
156
157     # Find.
158     FindString(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
159     FindStringMatches(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
160     GetImageForFindMatch(uint32_t matchIndex)
161     SelectFindMatch(uint32_t matchIndex)
162     HideFindUI()
163     CountStringMatches(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
164
165     # Drag and drop.
166 #if PLATFORM(GTK) && ENABLE(DRAG_SUPPORT)
167     PerformDragControllerAction(uint64_t action, WebCore::DragData dragData)
168 #endif
169 #if !PLATFORM(GTK) && ENABLE(DRAG_SUPPORT)
170     PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, WTF::String dragStorageName, uint32_t flags, WebKit::SandboxExtension::Handle sandboxExtensionHandle, WebKit::SandboxExtension::HandleArray sandboxExtensionsForUpload)
171 #endif
172 #if ENABLE(DRAG_SUPPORT)
173     DragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation)
174 #endif
175
176     # Popup menu.
177     DidChangeSelectedIndexForActivePopupMenu(int32_t newIndex)
178     SetTextForActivePopupMenu(int32_t index)
179 #if PLATFORM(GTK)
180     FailedToShowPopupMenu()
181 #endif
182
183 #if ENABLE(CONTEXT_MENUS)
184     # Context menu.
185     DidSelectItemFromActiveContextMenu(WebKit::WebContextMenuItemData menuItem)
186 #endif
187
188     # Open panel.
189     DidChooseFilesForOpenPanel(Vector<WTF::String> fileURLs)
190     DidCancelForOpenPanel()
191 #if ENABLE(WEB_PROCESS_SANDBOX)
192     ExtendSandboxForFileFromOpenPanel(WebKit::SandboxExtension::Handle sandboxExtensionHandle)
193 #endif
194
195     # Spelling and grammar.
196     AdvanceToNextMisspelling(bool startBeforeSelection)
197     ChangeSpellingToWord(WTF::String word)
198     DidFinishCheckingText(uint64_t requestID, Vector<WebCore::TextCheckingResult> result)
199     DidCancelCheckingText(uint64_t requestID)
200 #if USE(APPKIT)
201     UppercaseWord()
202     LowercaseWord()
203     CapitalizeWord()
204 #endif
205 #if PLATFORM(MAC)
206     SetSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled)
207 #endif
208
209 #if ENABLE(GEOLOCATION)
210     # Geolocation
211     DidReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed)
212 #endif
213
214     # Notification
215     DidReceiveNotificationPermissionDecision(uint64_t notificationID, bool allowed)
216
217     SetWindowResizerSize(WebCore::IntSize intersectsView)
218
219     # Printing.
220     BeginPrinting(uint64_t frameID, WebKit::PrintInfo printInfo)
221     EndPrinting()
222     ComputePagesForPrinting(uint64_t frameID, WebKit::PrintInfo printInfo, uint64_t callbackID)
223 #if PLATFORM(MAC)
224     DrawRectToImage(uint64_t frameID, WebKit::PrintInfo printInfo, WebCore::IntRect rect, WebCore::IntSize imageSize, uint64_t callbackID)
225     DrawPagesToPDF(uint64_t frameID, WebKit::PrintInfo printInfo, uint32_t first, uint32_t count, uint64_t callbackID)
226 #endif
227 #if PLATFORM(GTK)
228     DrawPagesForPrinting(uint64_t frameID, WebKit::PrintInfo printInfo, uint64_t callbackID)
229 #endif
230
231     # Media
232     SetMediaVolume(float volume)
233     SetMayStartMediaWhenInWindow(bool mayStartMedia)
234
235     SetMemoryCacheMessagesEnabled(bool memoryCacheMessagesEnabled)
236
237     // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
238     // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
239     Dummy() -> (bool dummyReturn)
240
241     SetCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel)
242     SetCanRunModal(bool canRunModal)
243
244 #if PLATFORM(EFL)
245     SetThemePath(WTF::String themePath)
246 #endif
247
248 #if USE(TILED_BACKING_STORE)
249     CommitPageTransitionViewport()
250 #endif
251
252 #if PLATFORM(GTK)
253     SetComposition(WTF::String text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd)
254     ConfirmComposition(WTF::String text, int64_t selectionStart, int64_t selectionLength)
255     CancelComposition()
256 #endif
257
258 #if PLATFORM(MAC)
259     # Complex text input support for plug-ins.
260     SendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, String textInput)
261
262     WindowAndViewFramesChanged(WebCore::FloatRect windowFrameInScreenCoordinates, WebCore::FloatRect windowFrameInUnflippedScreenCoordinates, WebCore::FloatRect viewFrameInWindowCoordinates, WebCore::FloatPoint accessibilityViewCoordinates)
263     ViewExposedRectChanged(WebCore::FloatRect exposedRect, bool clipsToExposedRect)
264     SetMainFrameIsScrollable(bool isScrollable)
265     RegisterUIProcessAccessibilityTokens(CoreIPC::DataReference elemenToken, CoreIPC::DataReference windowToken)
266     GetStringSelectionForPasteboard() -> (WTF::String stringValue)
267     GetDataSelectionForPasteboard(WTF::String pasteboardType) -> (WebKit::SharedMemory::Handle handle, uint64_t size)
268     ReadSelectionFromPasteboard(WTF::String pasteboardName) -> (bool result)
269
270     # Text input.
271     SetComposition(WTF::String text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) -> (WebKit::EditorState newState)
272     ConfirmComposition() -> (WebKit::EditorState newState)
273     CancelComposition() -> (WebKit::EditorState newState)
274     InsertText(WTF::String text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) -> (bool handled, WebKit::EditorState newState)
275     GetMarkedRange() -> (uint64_t location, uint64_t length)
276     GetSelectedRange() -> (uint64_t location, uint64_t length)
277     GetAttributedSubstringFromRange(uint64_t location, uint64_t length) -> (WebKit::AttributedString result)
278     CharacterIndexForPoint(WebCore::IntPoint point) -> (uint64_t result)
279     FirstRectForCharacterRange(uint64_t location, uint64_t length) -> (WebCore::IntRect resultRect)
280     ExecuteKeypressCommands(Vector<WebCore::KeypressCommand> savedCommands) -> (bool handled, WebKit::EditorState newState)
281     ShouldDelayWindowOrderingEvent(WebKit::WebMouseEvent event) -> (bool result)
282     AcceptsFirstMouse(int eventNumber, WebKit::WebMouseEvent event) -> (bool result)
283     InsertDictatedText(WTF::String text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, Vector<WebCore::DictationAlternative> dictationAlternatives) -> (bool handled, WebKit::EditorState newState)
284 #endif
285
286     SetMinimumLayoutSize(WebCore::IntSize minimumLayoutSize)
287     SetAutoSizingShouldExpandToViewHeight(bool shouldExpand)
288
289 #if PLATFORM(EFL)
290     ConfirmComposition(WTF::String compositionString)
291     SetComposition(WTF::String compositionString, Vector<WebCore::CompositionUnderline> underlines, uint64_t cursorPosition)
292     CancelComposition()
293 #endif
294 #if USE(COORDINATED_GRAPHICS)
295     FindZoomableAreaForPoint(WebCore::IntPoint point, WebCore::IntSize area)
296 #endif
297
298 #if PLATFORM(MAC)
299     HandleAlternativeTextUIResult(String result)
300 #endif
301
302 #if ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
303     SetVisibilityState(uint32_t visibilityState, bool isInitialState)
304 #endif
305
306 #if PLATFORM(IOS)
307     DidFinishScrolling(WebCore::FloatPoint contentOffset);
308     DidFinishZooming(float scale);
309 #endif
310
311 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
312     SetAcceleratedCompositingWindowId(int64_t id)
313 #endif
314
315     SetMainFrameInViewSourceMode(bool inViewSourceMode)
316     
317     SetScrollPinningBehavior(uint32_t pinning)
318 }