710751e6ea18e41be45d572b67c047648194fcf8
[WebKit-https.git] / Source / WebKit2 / UIProcess / WebPageProxy.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 -> WebPageProxy {
24     # UI messages
25     CreateNewPage(WebCore::ResourceRequest request, WebCore::WindowFeatures windowFeatures, uint32_t modifiers, int32_t mouseButton) -> (uint64_t newPageID, WebKit::WebPageCreationParameters newPageParameters)
26     ShowPage()
27     ClosePage(bool stopResponsivenessTimer)
28     RunJavaScriptAlert(uint64_t frameID, String message) -> ()
29     RunJavaScriptConfirm(uint64_t frameID, String message) -> (bool result)
30     RunJavaScriptPrompt(uint64_t frameID, String message, String defaultValue) -> (String result)
31     ShouldInterruptJavaScript() -> (bool shouldInterupt)
32     MouseDidMoveOverElement(WebKit::WebHitTestResult::Data hitTestResultData, uint32_t modifiers, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
33 #if ENABLE(NETSCAPE_PLUGIN_API)
34     UnavailablePluginButtonClicked(uint32_t pluginUnavailabilityReason, String mimeType, String pluginURLString, String pluginspageAttributeURLString, String frameURLString, String pageURLString)
35 #endif // ENABLE(NETSCAPE_PLUGIN_API)
36 #if ENABLE(WEBGL)
37     WebGLPolicyForURL(String url) -> (uint32_t loadPolicy)
38 #endif // ENABLE(WEBGL)
39     DidChangeViewportProperties(WebCore::ViewportAttributes attributes)
40     DidReceiveEvent(uint32_t type, bool handled)
41     StopResponsivenessTimer()
42 #if !PLATFORM(IOS)
43     SetCursor(WebCore::Cursor cursor)
44     SetCursorHiddenUntilMouseMoves(bool hiddenUntilMouseMoves)
45 #endif
46     SetStatusText(String statusText)
47     SetToolTip(String toolTip)
48     SetFocus(bool focused)
49     TakeFocus(uint32_t direction)
50     FocusedFrameChanged(uint64_t frameID)
51     FrameSetLargestFrameChanged(uint64_t frameID)
52     SetRenderTreeSize(uint64_t treeSize)
53     SetToolbarsAreVisible(bool toolbarsAreVisible)
54     GetToolbarsAreVisible() -> (bool toolbarsAreVisible)
55     SetMenuBarIsVisible(bool menuBarIsVisible);
56     GetMenuBarIsVisible() -> (bool menuBarIsVisible);
57     SetStatusBarIsVisible(bool statusBarIsVisible)
58     GetStatusBarIsVisible() -> (bool statusBarIsVisible)
59     SetIsResizable(bool isResizable)
60     GetIsResizable() -> (bool isResizable)
61     SetWindowFrame(WebCore::FloatRect windowFrame)
62     GetWindowFrame() -> (WebCore::FloatRect windowFrame)
63     ScreenToWindow(WebCore::IntPoint screenPoint) -> (WebCore::IntPoint windowPoint)
64     WindowToScreen(WebCore::IntRect rect) -> (WebCore::IntRect screenFrame)
65     RunBeforeUnloadConfirmPanel(String message, uint64_t frameID) -> (bool shouldClose)
66     PageDidScroll()
67     RunOpenPanel(uint64_t frameID, WebCore::FileChooserSettings parameters)
68     PrintFrame(uint64_t frameID) -> ()
69     RunModal()
70     NotifyScrollerThumbIsVisibleInRect(WebCore::IntRect scrollerThumb)
71     RecommendedScrollbarStyleDidChange(int32_t newStyle)
72     DidChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar)
73     DidChangeScrollOffsetPinningForMainFrame(bool pinnedToLeftSide, bool pinnedToRightSide, bool pinnedToTopSide, bool pinnedToBottomSide)
74     DidChangePageCount(unsigned pageCount);
75 #if ENABLE(NETSCAPE_PLUGIN_API)
76     DidFailToInitializePlugin(String mimeType, String frameURLString, String pageURLString)
77     DidBlockInsecurePluginVersion(String mimeType, String pluginURLString, String frameURLString, String pageURLString, bool replacementObscured)
78 #endif // ENABLE(NETSCAPE_PLUGIN_API)
79     SetCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents)
80
81 #if PLATFORM(EFL)
82     HandleInputMethodKeydown() -> (bool handled)
83 #endif
84
85 #if USE(TILED_BACKING_STORE)
86     PageDidRequestScroll(WebCore::IntPoint point)
87     PageTransitionViewportReady()
88 #endif
89 #if USE(COORDINATED_GRAPHICS)
90     DidFindZoomableArea(WebCore::IntPoint target, WebCore::IntRect area)
91 #endif
92
93 #if PLATFORM(EFL) || PLATFORM(IOS)
94     DidChangeContentSize(WebCore::IntSize newSize)
95 #endif
96
97 #if ENABLE(TOUCH_EVENTS)
98     NeedTouchEvents(bool needTouchEvents)
99 #endif
100
101 #if ENABLE(INPUT_TYPE_COLOR)
102     ShowColorPicker(WebCore::Color initialColor, WebCore::IntRect elementRect);
103     SetColorPickerColor(WebCore::Color color);
104     EndColorPicker();
105 #endif
106
107     # Policy messages
108     DecidePolicyForResponseSync(uint64_t frameID, WebCore::ResourceResponse response, WebCore::ResourceRequest request, bool canShowMIMEType, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) -> (bool receivedPolicyAction, uint64_t policyAction, uint64_t downloadID) Variadic
109     DecidePolicyForNavigationAction(uint64_t frameID, WebKit::NavigationActionData navigationActionData, uint64_t originatingFrameID, WebCore::ResourceRequest originalRequest, WebCore::ResourceRequest request, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) -> (bool receivedPolicyAction, uint64_t policyAction, uint64_t downloadID) Variadic
110     DecidePolicyForNewWindowAction(uint64_t frameID, WebKit::NavigationActionData navigationActionData, WebCore::ResourceRequest request, String frameName, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
111     UnableToImplementPolicy(uint64_t frameID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData)  Variadic
112
113     # Progress messages
114     DidChangeProgress(double value)
115     DidFinishProgress()
116     DidStartProgress()
117
118     # Frame lifetime messages
119     DidCreateMainFrame(uint64_t frameID)
120     DidCreateSubframe(uint64_t frameID)
121
122     # Frame load messages
123     DidStartProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, String url, String unreachableURL, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
124     DidReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, String url, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
125     DidFailProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
126     DidCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, String mimeType, uint32_t loadType, WebCore::CertificateInfo certificateInfo, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
127     DidFailLoadForFrame(uint64_t frameID, uint64_t navigationID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
128     DidFinishDocumentLoadForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
129     DidFinishLoadForFrame(uint64_t frameID, uint64_t navigationID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
130     DidFirstLayoutForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
131     DidFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
132     DidLayout(uint32_t type, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
133     DidRemoveFrameFromHierarchy(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
134     DidReceiveTitleForFrame(uint64_t frameID, String title, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
135     DidDisplayInsecureContentForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
136     DidRunInsecureContentForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
137     DidDetectXSSForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
138     DidSameDocumentNavigationForFrame(uint64_t frameID, uint32_t type, String url, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
139
140     FrameDidBecomeFrameSet(uint64_t frameID, bool value)
141
142     # Forms messages
143     WillSubmitForm(uint64_t frameID, uint64_t sourceFrameID, Vector<std::pair<String, String>> textFieldValues, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
144
145     # Callback messages
146     VoidCallback(uint64_t callbackID)
147     DataCallback(IPC::DataReference resultData, uint64_t callbackID)
148     ImageCallback(WebKit::ShareableBitmap::Handle bitmapHandle, uint64_t callbackID)
149     StringCallback(String resultString, uint64_t callbackID)
150     ScriptValueCallback(IPC::DataReference resultData, uint64_t callbackID)
151     ComputedPagesCallback(Vector<WebCore::IntRect> pageRects, double totalScaleFactorForPrinting, uint64_t callbackID)
152     ValidateCommandCallback(String command, bool isEnabled, int32_t state, uint64_t callbackID)
153 #if PLATFORM(IOS)
154     GestureCallback(WebCore::IntPoint point, uint32_t gestureType, uint32_t gestureState, uint32_t flags, uint64_t callbackID)
155     TouchesCallback(WebCore::IntPoint point, uint32_t touches, uint64_t callbackID)
156     AutocorrectionDataCallback(Vector<WebCore::FloatRect> textRects, String fontName, double fontSize, uint64_t traits, uint64_t callbackID)
157     AutocorrectionContextCallback(String beforeText, String markedText, String selectedText, String afterText, uint64_t location, uint64_t length, uint64_t callbackID)
158     InterpretKeyEvent(WebKit::EditorState state, bool isCharEvent) -> (bool handled)
159     DidReceivePositionInformation(WebKit::InteractionInformationAtPosition information)
160     SaveImageToLibrary(WebKit::SharedMemory::Handle handle, uint64_t size)
161 #endif
162 #if PLATFORM(GTK)
163     PrintFinishedCallback(WebCore::ResourceError error, uint64_t callbackID)
164 #endif
165
166     PageScaleFactorDidChange(double scaleFactor)
167     PageZoomFactorDidChange(double zoomFactor)
168
169 #if PLATFORM(GTK)
170     # Support for GTK+ platform keybindings
171     GetEditorCommandsForKeyEvent(AtomicString eventType) -> (Vector<String> commandsList)
172
173     # Support for connecting the Accessibility worlds of the UI and the Web processes
174     BindAccessibilityTree(String plugID)
175
176     SetInputMethodState(bool enabled);
177 #endif
178
179     # BackForward messages
180     BackForwardAddItem(uint64_t itemID)
181     BackForwardGoToItem(uint64_t itemID) -> (WebKit::SandboxExtension::Handle sandboxExtensionHandle)
182     BackForwardItemAtIndex(int32_t itemIndex) -> (uint64_t itemID)
183     BackForwardBackListCount() -> (int32_t count)
184     BackForwardForwardListCount() -> (int32_t count)
185     BackForwardClear()
186     WillGoToBackForwardListItem(uint64_t itemID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
187
188     # Undo/Redo messages
189     RegisterEditCommandForUndo(uint64_t commandID, uint32_t editAction)
190     ClearAllEditCommands()
191     CanUndoRedo(uint32_t action) -> (bool result)
192     ExecuteUndoRedo(uint32_t action) -> (bool result)
193
194     # Editor notifications
195     EditorStateChanged(WebKit::EditorState editorState)
196
197     # Find messages
198     DidCountStringMatches(String string, uint32_t matchCount)
199     SetFindIndicator(WebCore::FloatRect selectionRect, Vector<WebCore::FloatRect> textRects, float contentImageScaleFactor, WebKit::ShareableBitmap::Handle contentImageHandle, bool fadeOut, bool animate)
200     DidFindString(String string, uint32_t matchCount)
201     DidFailToFindString(String string)
202     DidFindStringMatches(String string, Vector<Vector<WebCore::IntRect>> matches, int32_t firstIndexAfterSelection)
203     DidGetImageForFindMatch(WebKit::ShareableBitmap::Handle contentImageHandle, uint32_t matchIndex)
204
205     # PopupMenu messages
206     ShowPopupMenu(WebCore::IntRect rect, uint64_t textDirection, Vector<WebKit::WebPopupItem> items, int32_t selectedIndex, WebKit::PlatformPopupMenuData data)
207     HidePopupMenu()
208
209 #if ENABLE(CONTEXT_MENUS)
210     # ContextMenu messages
211     ShowContextMenu(WebCore::IntPoint menuLocation, WebKit::WebHitTestResult::Data hitTestResultData, Vector<WebKit::WebContextMenuItemData> items, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
212 #endif
213
214     # Authentication messages
215     CanAuthenticateAgainstProtectionSpaceInFrame(uint64_t frameID, WebCore::ProtectionSpace protectionSpace) -> (bool canAuthenticate)
216     DidReceiveAuthenticationChallenge(uint64_t frameID, WebCore::AuthenticationChallenge challenge, uint64_t challengeID)
217
218     # Database messages
219     ExceededDatabaseQuota(uint64_t frameID, String originIdentifier, String databaseName, String databaseDisplayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage) -> (uint64_t newQuota) Delayed
220
221     # Geolocation messages
222     RequestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_t frameID, String originIdentifier)
223     
224     # Notification messages
225     RequestNotificationPermission(uint64_t requestID, String originIdentifier)
226     ShowNotification(String title, String body, String iconURL, String tag, String lang, String dir, String originIdentifier, uint64_t notificationID)
227     CancelNotification(uint64_t notificationID)
228     ClearNotifications(Vector<uint64_t> notificationIDs)
229     DidDestroyNotification(uint64_t notificationID)
230
231     # Spelling and grammar messages
232 #if USE(UNIFIED_TEXT_CHECKING)  
233     CheckTextOfParagraph(String text, uint64_t checkingTypes) -> (Vector<WebCore::TextCheckingResult> results)
234 #endif
235     CheckSpellingOfString(String text) -> (int32_t misspellingLocation, int32_t misspellingLength)
236     CheckGrammarOfString(String text) -> (Vector<WebCore::GrammarDetail> results, int32_t badGrammarLocation, int32_t badGrammarLength)
237     SpellingUIIsShowing() -> (bool isShowing)
238     UpdateSpellingUIWithMisspelledWord(String misspelledWord)
239     UpdateSpellingUIWithGrammarString(String badGrammarPhrase, WebCore::GrammarDetail grammarDetail)
240     GetGuessesForWord(String word, String context) -> (Vector<String> guesses)
241     LearnWord(String word);
242     IgnoreWord(String word);
243     RequestCheckingOfString(uint64_t requestID, WebCore::TextCheckingRequestData request)
244
245     # Drag and drop messages
246 #if ENABLE(DRAG_SUPPORT)
247     DidPerformDragControllerAction(WebCore::DragSession dragSession)
248 #endif
249 #if PLATFORM(MAC) && ENABLE(DRAG_SUPPORT)
250     SetDragImage(WebCore::IntPoint clientPosition, WebKit::ShareableBitmap::Handle dragImage, bool linkDrag)
251     SetPromisedData(String pasteboardName, WebKit::SharedMemory::Handle imageHandle, uint64_t imageSize, String filename, String extension, String title, String url, String visibleURL, WebKit::SharedMemory::Handle archiveHandle, uint64_t archiveSize)
252 #endif
253 #if PLATFORM(GTK) && ENABLE(DRAG_SUPPORT)
254     StartDrag(WebCore::DragData dragData, WebKit::ShareableBitmap::Handle dragImage)
255 #endif
256
257 #if PLATFORM(MAC)
258     # Dictionary support.
259     DidPerformDictionaryLookup(WebKit::AttributedString text, WebKit::DictionaryPopupInfo dictionaryPopupInfo)
260
261     # Keyboard input support messages
262     InterpretQueuedKeyEvent(WebKit::EditorState state) -> (bool handled, Vector<WebCore::KeypressCommand> savedCommands)
263     ExecuteSavedCommandBySelector(String selector) -> (bool handled)
264
265     # Remote accessibility messages
266     RegisterWebProcessAccessibilityToken(IPC::DataReference data)
267
268     # Plug-in complex text input support messages
269     PluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus)
270     SetPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t complexTextInputState)
271
272     # Speech messages
273     GetIsSpeaking() -> (bool isSpeaking)
274     Speak(String string)
275     StopSpeaking()
276
277     MakeFirstResponder()
278
279     # Spotlight
280     SearchWithSpotlight(String string)
281
282     SearchTheWeb(String string)
283 #endif
284
285 #if USE(APPKIT)
286     SubstitutionsPanelIsShowing() -> (bool isShowing)
287 #endif
288 #if !PLATFORM(IOS) && PLATFORM(MAC)
289     # Autocorrection messages
290     ShowCorrectionPanel(int32_t panelType, WebCore::FloatRect boundingBoxOfReplacedString, String replacedString, String replacementString, Vector<String> alternativeReplacementStrings)
291     DismissCorrectionPanel(int32_t reason)
292     DismissCorrectionPanelSoon(int32_t reason) -> (String result)
293     RecordAutocorrectionResponse(int32_t responseType, String replacedString, String replacementString);
294 #endif
295
296 #if USE(DICTATION_ALTERNATIVES)
297     ShowDictationAlternativeUI(WebCore::FloatRect boundingBoxOfDictatedText, uint64_t dictationContext)
298     RemoveDictationAlternatives(uint64_t dictationContext)
299     DictationAlternatives(uint64_t dictationContext) -> (Vector<String> alternatives)
300 #endif
301
302 #if PLUGIN_ARCHITECTURE(X11)
303     # X11 windowed plugin messages
304     CreatePluginContainer() -> (uint64_t windowID)
305     WindowedPluginGeometryDidChange(WebCore::IntRect frameRect, WebCore::IntRect clipRect, uint64_t windowID)
306 #endif
307
308 #if PLATFORM(IOS)
309     MainDocumentDidReceiveMobileDocType();
310
311     DidGetTapHighlightGeometries(uint64_t requestID, WebCore::Color color, Vector<WebCore::FloatQuad> geometries, WebCore::IntSize topLeftRadius, WebCore::IntSize topRightRadius, WebCore::IntSize bottomLeftRadius, WebCore::IntSize bottomRightRadius)
312     DidChangeViewportArguments(WebCore::ViewportArguments viewportArguments)
313
314     StartAssistingNode(WebCore::IntRect scrollRect, bool hasNextFocusable, bool hasPreviousFocusable)
315     StopAssistingNode()
316     NotifyRevealedSelection()
317 #endif
318
319     # Search popup menus
320     SaveRecentSearches(String name, Vector<String> searchItems)
321     LoadRecentSearches(String name) -> (Vector<String> result)
322
323 #if USE(SOUP)
324 #if !ENABLE(CUSTOM_PROTOCOLS)
325     # Soup custom URI request messages
326     DidReceiveURIRequest(String uriString, uint64_t requestID);
327 #endif
328 #endif
329
330     SavePDFToFileInDownloadsFolder(String suggestedFilename, String originatingURLString, IPC::DataReference data)
331
332 #if PLATFORM(MAC)
333     SavePDFToTemporaryFolderAndOpenWithNativeApplication(String suggestedFilename, String originatingURLString, IPC::DataReference data, String pdfUUID)
334     OpenPDFFromTemporaryFolderWithNativeApplication(String pdfUUID)
335 #endif
336
337 #if ENABLE(NETSCAPE_PLUGIN_API)
338     FindPlugin(String mimeType, uint32_t processType, String urlString, String frameURLString, String pageURLString, bool allowOnlyApplicationPlugins) -> (uint64_t pluginProcessToken, String newMIMEType, uint32_t pluginLoadPolicy, String unavailabilityDescription)
339 #endif
340
341     DidUpdateViewState()
342     
343     DidSaveToPageCache()
344 }