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