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