2c771f6e9caf82dc3d9654637c6cee64e00daa08
[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, Vector<uint64_t> callbackIDs)
26     SetLayerHostingMode(unsigned layerHostingMode)
27
28     SetSessionID(WebCore::SessionID sessionID)
29
30     SetDrawsBackground(bool drawsBackground)
31     SetDrawsTransparentBackground(bool drawsTransparentBackground)
32
33     SetTopContentInset(float contentInset)
34
35     SetUnderlayColor(WebCore::Color color)
36
37     ViewWillStartLiveResize()
38     ViewWillEndLiveResize()
39
40     KeyEvent(WebKit::WebKeyboardEvent event)
41     KeyEventSyncForTesting(WebKit::WebKeyboardEvent event) -> (bool handled)
42     MouseEvent(WebKit::WebMouseEvent event)
43     MouseEventSyncForTesting(WebKit::WebMouseEvent event) -> (bool handled)
44     WheelEventSyncForTesting(WebKit::WebWheelEvent event) -> (bool handled)
45 #if PLATFORM(IOS)
46     SetViewportConfigurationMinimumLayoutSize(WebCore::FloatSize size)
47     SetMaximumUnobscuredSize(WebCore::FloatSize size)
48     SetDeviceOrientation(int32_t deviceOrientation)
49     DynamicViewportSizeUpdate(WebCore::FloatSize minimumLayoutSize, WebCore::FloatSize maximumUnobscuredSize, WebCore::FloatRect targetExposedContentRect, WebCore::FloatRect targetUnobscuredRect, WebCore::FloatRect targetUnobscuredRectInScrollViewCoordinates, double scale, int32_t deviceOrientation)
50     SynchronizeDynamicViewportUpdate() -> (double newTargetScale, WebCore::FloatPoint newScrollPosition, uint64_t nextValidLayerTreeTransactionID)
51
52     HandleTap(WebCore::IntPoint point, uint64_t lastLayerTreeTranscationId)
53     PotentialTapAtPosition(uint64_t requestID, WebCore::FloatPoint point)
54     CommitPotentialTap(uint64_t lastLayerTreeTranscationId)
55     CancelPotentialTap()
56     TapHighlightAtPosition(uint64_t requestID, WebCore::FloatPoint point)
57     InspectorNodeSearchMovedToPosition(WebCore::FloatPoint point)
58     InspectorNodeSearchEndedAtPosition(WebCore::FloatPoint point)
59     BlurAssistedNode()
60     SelectWithGesture(WebCore::IntPoint point, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID)
61     UpdateSelectionWithTouches(WebCore::IntPoint point, uint32_t touches, bool baseIsStart, uint64_t callbackID)
62     UpdateBlockSelectionWithTouch(WebCore::IntPoint point, uint32_t touch, uint32_t handlePosition)
63     SelectWithTwoTouches(WebCore::IntPoint from, WebCore::IntPoint to, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID)
64     ExtendSelection(uint32_t granularity)
65     SelectWordBackward()
66     MoveSelectionByOffset(int32_t offset, uint64_t callbackID)
67     SelectTextWithGranularityAtPoint(WebCore::IntPoint point, uint32_t granularity, uint64_t callbackID)
68     SelectPositionAtBoundaryWithDirection(WebCore::IntPoint point, uint32_t granularity, uint32_t direction, uint64_t callbackID)
69     SelectPositionAtPoint(WebCore::IntPoint point, uint64_t callbackID)
70     BeginSelectionInDirection(uint32_t direction, uint64_t callbackID)
71     UpdateSelectionWithExtentPoint(WebCore::IntPoint point, uint64_t callbackID)
72     RequestDictationContext(uint64_t callbackID)
73     ReplaceDictatedText(String oldText, String newText)
74     ReplaceSelectedText(String oldText, String newText)
75     RequestAutocorrectionData(String textForAutocorrection, uint64_t callbackID)
76     ApplyAutocorrection(String correction, String originalText, uint64_t callbackID)
77     SyncApplyAutocorrection(String correction, String originalText) -> (bool autocorrectionApplied)
78     RequestAutocorrectionContext(uint64_t callbackID)
79     GetAutocorrectionContext() -> (String beforeContext, String markedText, String selectedText, String afterContext, uint64_t location, uint64_t length) 
80     GetPositionInformation(WebCore::IntPoint point) -> (struct WebKit::InteractionInformationAtPosition information)
81     RequestPositionInformation(WebCore::IntPoint point)
82     StartInteractionWithElementAtPosition(WebCore::IntPoint point)
83     StopInteraction()
84     PerformActionOnElement(uint32_t action)
85     FocusNextAssistedNode(bool isForward, uint64_t callbackID)
86     SetAssistedNodeValue(String value)
87     SetAssistedNodeValueAsNumber(double value)
88     SetAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection)
89     ApplicationWillResignActive()
90     ApplicationWillEnterForeground()
91     ApplicationDidBecomeActive()
92     ContentSizeCategoryDidChange(String contentSizeCategory)
93     ExecuteEditCommandWithCallback(String name, uint64_t callbackID)
94 #endif
95
96 #if ENABLE(REMOTE_INSPECTOR)
97     SetAllowsRemoteInspection(bool allow)
98 #endif
99
100 #if ENABLE(IOS_TOUCH_EVENTS)
101     TouchEventSync(WebKit::WebTouchEvent event) -> (bool handled)
102 #endif
103 #if !ENABLE(IOS_TOUCH_EVENTS) && ENABLE(TOUCH_EVENTS)
104     TouchEvent(WebKit::WebTouchEvent event)
105     TouchEventSyncForTesting(WebKit::WebTouchEvent event) -> (bool handled)
106 #endif
107
108 #if ENABLE(INPUT_TYPE_COLOR)
109     DidEndColorPicker()
110     DidChooseColor(WebCore::Color color)
111 #endif
112
113 #if ENABLE(CONTEXT_MENUS)
114     ContextMenuHidden()
115 #endif
116
117     ScrollBy(uint32_t scrollDirection, uint32_t scrollGranularity)
118     CenterSelectionInVisibleArea()
119
120     GoBack(uint64_t navigationID, uint64_t backForwardItemID)
121     GoForward(uint64_t navigationID, uint64_t backForwardItemID)
122     GoToBackForwardItem(uint64_t navigationID, uint64_t backForwardItemID)
123     TryRestoreScrollPosition()
124
125     LoadURLInFrame(String url, uint64_t frameID)
126     LoadRequest(uint64_t navigationID, WebCore::ResourceRequest request, WebKit::SandboxExtension::Handle sandboxExtensionHandle, WebKit::UserData userData)
127     LoadData(IPC::DataReference data, String MIMEType, String encoding, String baseURL, WebKit::UserData userData)
128     LoadHTMLString(uint64_t navigationID, String htmlString, String baseURL, WebKit::UserData userData)
129     LoadAlternateHTMLString(String htmlString, String baseURL, String unreachableURL, WebKit::UserData userData)
130     LoadPlainTextString(String string, WebKit::UserData userData)
131     LoadWebArchiveData(IPC::DataReference webArchiveData, WebKit::UserData userData)
132     NavigateToURLWithSimulatedClick(String url, WebCore::IntPoint documentPoint, WebCore::IntPoint screenPoint)
133
134     Reload(uint64_t navigationID, bool reloadFromOrigin, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
135     StopLoading()
136
137     StopLoadingFrame(uint64_t frameID)
138     
139     RestoreSession(Vector<WebKit::BackForwardListItemState> itemStates)
140
141     DidRemoveBackForwardItem(uint64_t backForwardItemID)
142
143     DidReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t navigationID, uint64_t downloadID)
144
145     ClearSelection()
146
147     # Callbacks.
148     GetContentsAsString(uint64_t callbackID)
149 #if ENABLE(MHTML)
150     GetContentsAsMHTMLData(uint64_t callbackID, bool useBinaryEncoding)
151 #endif
152     GetMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID)
153     GetResourceDataFromFrame(uint64_t frameID, String resourceURL, uint64_t callbackID)
154     GetRenderTreeExternalRepresentation(uint64_t callbackID)
155     GetSelectionOrContentsAsString(uint64_t callbackID)
156     GetSelectionAsWebArchiveData(uint64_t callbackID)
157     GetSourceForFrame(uint64_t frameID, uint64_t callbackID)
158     GetWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID)
159     RunJavaScriptInMainFrame(String script, uint64_t callbackID)
160     ForceRepaint(uint64_t callbackID)
161
162 #if PLATFORM(COCOA)
163     # Dictionary support.
164     PerformDictionaryLookupAtLocation(WebCore::FloatPoint point)
165 #endif
166
167 #if PLATFORM(MAC)
168     PerformDictionaryLookupOfCurrentSelection()
169 #endif
170
171     PreferencesDidChange(struct WebKit::WebPreferencesStore store)
172
173     SetUserAgent(String userAgent)
174     SetCustomTextEncodingName(String encodingName)
175
176     SuspendActiveDOMObjectsAndAnimations()
177     ResumeActiveDOMObjectsAndAnimations()
178
179     Close()
180     TryClose()
181
182     SetEditable(bool editable)
183     ValidateCommand(String name, uint64_t callbackID)
184     ExecuteEditCommand(String name)
185
186     DidRemoveEditCommand(uint64_t commandID)
187     ReapplyEditCommand(uint64_t commandID)
188     UnapplyEditCommand(uint64_t commandID)
189
190     SetPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor)
191     SetPageZoomFactor(double zoomFactor)
192     SetTextZoomFactor(double zoomFactor)
193     WindowScreenDidChange(uint64_t displayID)
194
195     ScalePage(double scale, WebCore::IntPoint origin)
196     ScalePageInViewCoordinates(double scale, WebCore::IntPoint centerInViewCoordinates)
197
198     SetUseFixedLayout(bool fixed)
199     SetFixedLayoutSize(WebCore::IntSize size)
200     ListenForLayoutMilestones(uint32_t milestones)
201     SetSuppressScrollbarAnimations(bool suppressAnimations)
202
203     SetEnableVerticalRubberBanding(bool enableVerticalRubberBanding)
204     SetEnableHorizontalRubberBanding(bool enableHorizontalRubberBanding)
205
206     SetBackgroundExtendsBeyondPage(bool backgroundExtendsBeyondPage)
207
208     SetPaginationMode(uint32_t mode)
209     SetPaginationBehavesLikeColumns(bool behavesLikeColumns)
210     SetPageLength(double pageLength)
211     SetGapBetweenPages(double gap)
212
213     PostInjectedBundleMessage(String messageName, WebKit::UserData messageBody)
214
215     # Find.
216     FindString(String string, uint32_t findOptions, unsigned maxMatchCount)
217     FindStringMatches(String string, uint32_t findOptions, unsigned maxMatchCount)
218     GetImageForFindMatch(uint32_t matchIndex)
219     SelectFindMatch(uint32_t matchIndex)
220     HideFindUI()
221     CountStringMatches(String string, uint32_t findOptions, unsigned maxMatchCount)
222     
223     AddMIMETypeWithCustomContentProvider(String mimeType)
224
225     # Drag and drop.
226 #if PLATFORM(GTK) && ENABLE(DRAG_SUPPORT)
227     PerformDragControllerAction(uint64_t action, WebCore::DragData dragData)
228 #endif
229 #if !PLATFORM(GTK) && ENABLE(DRAG_SUPPORT)
230     PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, String dragStorageName, uint32_t flags, WebKit::SandboxExtension::Handle sandboxExtensionHandle, WebKit::SandboxExtension::HandleArray sandboxExtensionsForUpload)
231 #endif
232 #if ENABLE(DRAG_SUPPORT)
233     DidStartDrag()
234     DragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation)
235 #endif
236
237     # Popup menu.
238     DidChangeSelectedIndexForActivePopupMenu(int32_t newIndex)
239     SetTextForActivePopupMenu(int32_t index)
240 #if PLATFORM(GTK)
241     FailedToShowPopupMenu()
242 #endif
243
244 #if ENABLE(CONTEXT_MENUS)
245     # Context menu.
246     DidSelectItemFromActiveContextMenu(WebKit::WebContextMenuItemData menuItem)
247 #endif
248
249     # Open panel.
250 #if PLATFORM(IOS)
251     DidChooseFilesForOpenPanelWithDisplayStringAndIcon(Vector<String> fileURLs, String displayString, IPC::DataReference iconData)
252 #endif
253     DidChooseFilesForOpenPanel(Vector<String> fileURLs)
254     DidCancelForOpenPanel()
255 #if ENABLE(SANDBOX_EXTENSIONS)
256     ExtendSandboxForFileFromOpenPanel(WebKit::SandboxExtension::Handle sandboxExtensionHandle)
257 #endif
258
259     # Spelling and grammar.
260     AdvanceToNextMisspelling(bool startBeforeSelection)
261     ChangeSpellingToWord(String word)
262     DidFinishCheckingText(uint64_t requestID, Vector<WebCore::TextCheckingResult> result)
263     DidCancelCheckingText(uint64_t requestID)
264 #if USE(APPKIT)
265     UppercaseWord()
266     LowercaseWord()
267     CapitalizeWord()
268 #endif
269 #if PLATFORM(COCOA)
270     SetSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled)
271 #endif
272
273 #if ENABLE(GEOLOCATION)
274     # Geolocation
275     DidReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed)
276 #endif
277
278 #if ENABLE(MEDIA_STREAM)
279     # MediaSteam
280     DidReceiveUserMediaPermissionDecision(uint64_t userMediaID, bool allowed)
281 #endif
282
283     # Notification
284     DidReceiveNotificationPermissionDecision(uint64_t notificationID, bool allowed)
285
286     SetWindowResizerSize(WebCore::IntSize intersectsView)
287
288     # Printing.
289     BeginPrinting(uint64_t frameID, struct WebKit::PrintInfo printInfo)
290     EndPrinting()
291     ComputePagesForPrinting(uint64_t frameID, struct WebKit::PrintInfo printInfo, uint64_t callbackID)
292 #if PLATFORM(COCOA)
293     DrawRectToImage(uint64_t frameID, struct WebKit::PrintInfo printInfo, WebCore::IntRect rect, WebCore::IntSize imageSize, uint64_t callbackID)
294     DrawPagesToPDF(uint64_t frameID, struct WebKit::PrintInfo printInfo, uint32_t first, uint32_t count, uint64_t callbackID)
295 #if PLATFORM(IOS)
296     ComputePagesForPrintingAndStartDrawingToPDF(uint64_t frameID, struct WebKit::PrintInfo printInfo, uint32_t firstPage) -> (Vector<WebCore::IntRect> pageRects, double totalScaleFactor) Delayed
297 #endif
298 #endif
299 #if PLATFORM(GTK)
300     DrawPagesForPrinting(uint64_t frameID, struct WebKit::PrintInfo printInfo, uint64_t callbackID)
301 #endif
302
303     # Media
304     SetMediaVolume(float volume)
305     SetMuted(bool muted)
306     SetMayStartMediaWhenInWindow(bool mayStartMedia)
307
308     // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
309     // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
310     Dummy() -> (bool dummyReturn)
311
312     SetCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel)
313     SetCanRunModal(bool canRunModal)
314
315 #if PLATFORM(EFL)
316     SetThemePath(String themePath)
317 #endif
318
319 #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
320     CommitPageTransitionViewport()
321 #endif
322
323 #if PLATFORM(GTK)
324     SetComposition(String text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd)
325     ConfirmComposition(String text, int64_t selectionStart, int64_t selectionLength)
326     CancelComposition()
327 #endif
328
329 #if PLATFORM (GTK) && HAVE(GTK_GESTURES)
330     GetCenterForZoomGesture(WebCore::IntPoint centerInViewCoordinates) -> (WebCore::IntPoint center)
331 #endif
332
333 #if PLATFORM(COCOA)
334     # Complex text input support for plug-ins.
335     SendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, String textInput)
336
337     WindowAndViewFramesChanged(WebCore::FloatRect windowFrameInScreenCoordinates, WebCore::FloatRect windowFrameInUnflippedScreenCoordinates, WebCore::FloatRect viewFrameInWindowCoordinates, WebCore::FloatPoint accessibilityViewCoordinates)
338     SetMainFrameIsScrollable(bool isScrollable)
339     RegisterUIProcessAccessibilityTokens(IPC::DataReference elemenToken, IPC::DataReference windowToken)
340     GetStringSelectionForPasteboard() -> (String stringValue)
341     GetDataSelectionForPasteboard(String pasteboardType) -> (WebKit::SharedMemory::Handle handle, uint64_t size)
342     ReadSelectionFromPasteboard(String pasteboardName) -> (bool result)
343
344 #if ENABLE(SERVICE_CONTROLS)
345     ReplaceSelectionWithPasteboardData(Vector<String> types, IPC::DataReference data)
346 #endif
347
348     ShouldDelayWindowOrderingEvent(WebKit::WebMouseEvent event) -> (bool result)
349     AcceptsFirstMouse(int eventNumber, WebKit::WebMouseEvent event) -> (bool result)
350
351     InsertTextAsync(String text, struct WebKit::EditingRange replacementRange, bool registerUndoGroup)
352     GetMarkedRangeAsync(uint64_t callbackID)
353     GetSelectedRangeAsync(uint64_t callbackID)
354     CharacterIndexForPointAsync(WebCore::IntPoint point, uint64_t callbackID);
355     FirstRectForCharacterRangeAsync(struct WebKit::EditingRange range, uint64_t callbackID);
356     SetCompositionAsync(String text, Vector<WebCore::CompositionUnderline> underlines, struct WebKit::EditingRange selectionRange, struct WebKit::EditingRange replacementRange)
357     ConfirmCompositionAsync()
358 #endif
359 #if PLATFORM(MAC)
360     InsertDictatedTextAsync(String text, struct WebKit::EditingRange replacementRange, Vector<WebCore::DictationAlternative> dictationAlternatives, bool registerUndoGroup)
361     AttributedSubstringForCharacterRangeAsync(struct WebKit::EditingRange range, uint64_t callbackID);
362 #endif
363 #if PLATFORM(MAC) && !USE(ASYNC_NSTEXTINPUTCLIENT)
364     InsertText(String text, struct WebKit::EditingRange replacementRange) -> (bool handled, struct WebKit::EditorState newState)
365     SetComposition(String text, Vector<WebCore::CompositionUnderline> underlines, struct WebKit::EditingRange selectionRange, struct WebKit::EditingRange replacementRange) -> (struct WebKit::EditorState newState)
366     ConfirmComposition() -> (struct WebKit::EditorState newState)
367     InsertDictatedText(String text, struct WebKit::EditingRange replacementRange, Vector<WebCore::DictationAlternative> dictationAlternatives) -> (bool handled, struct WebKit::EditorState newState)
368     GetAttributedSubstringFromRange(struct WebKit::EditingRange range) -> (struct WebKit::AttributedString result)
369     GetMarkedRange() -> (struct WebKit::EditingRange range)
370     GetSelectedRange() -> (struct WebKit::EditingRange range)
371     CharacterIndexForPoint(WebCore::IntPoint point) -> (uint64_t result)
372     FirstRectForCharacterRange(struct WebKit::EditingRange range) -> (WebCore::IntRect resultRect)
373     ExecuteKeypressCommands(Vector<WebCore::KeypressCommand> savedCommands) -> (bool handled, struct WebKit::EditorState newState)
374     CancelComposition() -> (struct WebKit::EditorState newState)
375 #endif
376
377     SetMinimumLayoutSize(WebCore::IntSize minimumLayoutSize)
378     SetAutoSizingShouldExpandToViewHeight(bool shouldExpand)
379
380 #if PLATFORM(EFL)
381     ConfirmComposition(String compositionString)
382     SetComposition(String compositionString, Vector<WebCore::CompositionUnderline> underlines, uint64_t cursorPosition)
383     CancelComposition()
384 #endif
385 #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
386     FindZoomableAreaForPoint(WebCore::IntPoint point, WebCore::IntSize area)
387 #endif
388
389 #if PLATFORM(COCOA)
390     HandleAlternativeTextUIResult(String result)
391 #endif
392
393 #if PLATFORM(IOS)
394     WillStartUserTriggeredZooming();
395 #endif
396
397     SetScrollPinningBehavior(uint32_t pinning)
398
399     GetBytecodeProfile(uint64_t callbackID)
400     
401     TakeSnapshot(WebCore::IntRect snapshotRect, WebCore::IntSize bitmapSize, uint32_t options, uint64_t callbackID)
402 #if PLATFORM(MAC)
403     PerformActionMenuHitTestAtLocation(WebCore::FloatPoint location, bool forImmediateAction)
404     SelectLastActionMenuRange()
405     FocusAndSelectLastActionMenuHitTestResult()
406     DataDetectorsDidPresentUI(WebCore::PageOverlay::PageOverlayID pageOverlay)
407     DataDetectorsDidChangeUI(WebCore::PageOverlay::PageOverlayID pageOverlay)
408     DataDetectorsDidHideUI(WebCore::PageOverlay::PageOverlayID pageOverlay)
409 #endif
410
411     SetShouldDispatchFakeMouseMoveEvents(bool shouldDispatchFakeMouseMoveEvents)
412 }