https://bugs.webkit.org/show_bug.cgi?id=66584
[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);
33     MissingPluginButtonClicked(WTF::String mimeType, WTF::String url, WTF::String pluginsPageURL)
34     DidChangeViewportProperties(WebCore::ViewportArguments arguments)
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     DidChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar)
65     DidChangeScrollOffsetPinningForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar)
66     DidFailToInitializePlugin(WTF::String mimeType)
67     NumWheelEventHandlersChanged(unsigned count)
68
69 #if USE(TILED_BACKING_STORE)
70     PageDidRequestScroll(WebCore::IntPoint point)
71 #endif
72 #if PLATFORM(QT)
73     DidChangeContentsSize(WebCore::IntSize newSize)
74     DidFindZoomableArea(WebCore::IntPoint target, WebCore::IntRect area)
75 #endif
76 #if ENABLE(TOUCH_EVENTS)
77     NeedTouchEvents(bool needTouchEvents)
78 #endif
79
80     # Policy messages
81     DecidePolicyForResponse(uint64_t frameID, WebCore::ResourceResponse response, WebCore::ResourceRequest request, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) -> (bool receivedPolicyAction, uint64_t policyAction, uint64_t downloadID)
82     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)
83     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)
84     UnableToImplementPolicy(uint64_t frameID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData)
85
86     # Progress messages
87     DidChangeProgress(double value)
88     DidFinishProgress()
89     DidStartProgress()
90
91     # Frame lifetime messages
92     DidCreateMainFrame(uint64_t frameID)
93     DidCreateSubframe(uint64_t frameID, uint64_t parentFrameID)
94     DidSaveFrameToPageCache(uint64_t frameID);
95     DidRestoreFrameFromPageCache(uint64_t frameID, uint64_t parentFrameID);
96
97     # Frame load messages
98     DidCommitLoadForFrame(uint64_t frameID, WTF::String mimeType, bool hasCustomRepresentation, WebKit::PlatformCertificateInfo certificateInfo, WebKit::InjectedBundleUserMessageEncoder userData)
99     DidFailLoadForFrame(uint64_t frameID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData)
100     DidFailProvisionalLoadForFrame(uint64_t frameID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData)
101     DidFinishDocumentLoadForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
102     DidFinishLoadForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
103     DidFirstLayoutForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
104     DidFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
105     DidReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, WTF::String url, WebKit::InjectedBundleUserMessageEncoder userData)
106     DidRemoveFrameFromHierarchy(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
107     DidStartProvisionalLoadForFrame(uint64_t frameID, WTF::String url, WTF::String unreachableURL, WebKit::InjectedBundleUserMessageEncoder userData)
108     DidReceiveTitleForFrame(uint64_t frameID, WTF::String title, WebKit::InjectedBundleUserMessageEncoder userData)
109     DidDisplayInsecureContentForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
110     DidRunInsecureContentForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
111     DidDetectXSSForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
112     DidSameDocumentNavigationForFrame(uint64_t frameID, uint32_t type, WTF::String url, WebKit::InjectedBundleUserMessageEncoder userData)
113
114     FrameDidBecomeFrameSet(uint64_t frameID, bool value)
115
116     # Resource load messages
117     DidInitiateLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, WebCore::ResourceRequest request, bool pageIsProvisionallyLoading)
118     DidSendRequestForResource(uint64_t frameID, uint64_t resourceIdentifier, WebCore::ResourceRequest request, WebCore::ResourceResponse redirectResponse)
119     DidReceiveResponseForResource(uint64_t frameID, uint64_t resourceIdentifier, WebCore::ResourceResponse response)
120     DidReceiveContentLengthForResource(uint64_t frameID, uint64_t resourceIdentifier, uint64_t contentLength)
121     DidFinishLoadForResource(uint64_t frameID, uint64_t resourceIdentifier)
122     DidFailLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, WebCore::ResourceError error)
123
124     # Custom representations
125     DidFinishLoadingDataForCustomRepresentation(WTF::String suggestedFilename, CoreIPC::DataReference data)
126
127     # Forms messages
128     WillSubmitForm(uint64_t frameID, uint64_t sourceFrameID, WebKit::StringPairVector textFieldValues, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData)
129
130     # Callback messages
131     VoidCallback(uint64_t callbackID)
132     DataCallback(CoreIPC::DataReference resultData, uint64_t callbackID)
133     StringCallback(WTF::String resultString, uint64_t callbackID)
134     ScriptValueCallback(CoreIPC::DataReference resultData, uint64_t callbackID)
135     ComputedPagesCallback(Vector<WebCore::IntRect> pageRects, double totalScaleFactorForPrinting, uint64_t callbackID)
136     ValidateCommandCallback(WTF::String command, bool isEnabled, int32_t state, uint64_t callbackID)
137
138     PageScaleFactorDidChange(double scaleFactor)
139
140 #if PLATFORM(GTK)
141     # Support for GTK+ platform keybindings
142     GetEditorCommandsForKeyEvent(AtomicString eventType) -> (Vector<WTF::String> commandsList)
143 #endif
144
145     # BackForward messages
146     BackForwardAddItem(uint64_t itemID)
147     BackForwardGoToItem(uint64_t itemID)
148     BackForwardItemAtIndex(int32_t itemIndex) -> (uint64_t itemID)
149     BackForwardBackListCount() -> (int32_t count)
150     BackForwardForwardListCount() -> (int32_t count)
151     BackForwardClear()
152     ShouldGoToBackForwardListItem(uint64_t itemID) -> (bool shouldGoToBackForwardListItem)
153
154     # Undo/Redo messages
155     RegisterEditCommandForUndo(uint64_t commandID, uint32_t editAction)
156     ClearAllEditCommands()
157     CanUndoRedo(uint32_t action) -> (bool result)
158     ExecuteUndoRedo(uint32_t action) -> (bool result)
159
160     # Editor notifications
161     EditorStateChanged(WebKit::EditorState editorState)
162 #if PLATFORM(WIN)
163     DidChangeCompositionSelection(bool hasChanged)
164 #endif
165
166     # Find messages
167     DidCountStringMatches(WTF::String string, uint32_t matchCount)
168     SetFindIndicator(WebCore::FloatRect selectionRect, Vector<WebCore::FloatRect> textRects, float contentImageScaleFactor, WebKit::ShareableBitmap::Handle contentImageHandle, bool fadeOut, bool animate)
169     DidFindString(WTF::String string, uint32_t matchCount)
170     DidFailToFindString(WTF::String string)
171 #if PLATFORM(WIN)
172     DidInstallOrUninstallPageOverlay(bool didInstall)
173 #endif
174
175     # PopupMenu messages
176     ShowPopupMenu(WebCore::IntRect rect, uint64_t textDirection, Vector<WebKit::WebPopupItem> items, int32_t selectedIndex, WebKit::PlatformPopupMenuData data)
177     HidePopupMenu()
178 #if PLATFORM(WIN)
179     SetPopupMenuSelectedIndex(int32_t selectedIndex)
180 #endif
181
182     # ContextMenu messages
183     ShowContextMenu(WebCore::IntPoint menuLocation, WebKit::ContextMenuState state, Vector<WebKit::WebContextMenuItemData> items, WebKit::InjectedBundleUserMessageEncoder userData)
184
185     # Authentication messages
186     CanAuthenticateAgainstProtectionSpaceInFrame(uint64_t frameID, WebCore::ProtectionSpace protectionSpace) -> (bool canAuthenticate)
187     DidReceiveAuthenticationChallenge(uint64_t frameID, WebCore::AuthenticationChallenge challenge, uint64_t challengeID)
188
189     # Database messages
190     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)
191
192     # Geolocation messages
193     RequestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_t frameID, WTF::String originIdentifier)
194
195     # Spelling and grammar messages
196 #if USE(UNIFIED_TEXT_CHECKING)  
197     CheckTextOfParagraph(WTF::String text, uint64_t checkingTypes) -> (Vector<WebCore::TextCheckingResult> results)
198 #endif
199     CheckSpellingOfString(WTF::String text) -> (int32_t misspellingLocation, int32_t misspellingLength)
200     CheckGrammarOfString(WTF::String text) -> (Vector<WebCore::GrammarDetail> results, int32_t badGrammarLocation, int32_t badGrammarLength)
201     SpellingUIIsShowing() -> (bool isShowing)
202     UpdateSpellingUIWithMisspelledWord(WTF::String misspelledWord)
203     UpdateSpellingUIWithGrammarString(WTF::String badGrammarPhrase, WebCore::GrammarDetail grammarDetail)
204     GetGuessesForWord(WTF::String word, WTF::String context) -> (Vector<WTF::String> guesses)
205     LearnWord(WTF::String word);
206     IgnoreWord(WTF::String word);
207
208     # Drag and drop messages
209     DidPerformDragControllerAction(WebCore::DragSession dragSession)
210 #if PLATFORM(MAC)
211     SetDragImage(WebCore::IntPoint clientPosition, WebKit::ShareableBitmap::Handle dragImage, bool linkDrag)
212 #endif
213 #if PLATFORM(WIN)
214     StartDragDrop(WebCore::IntPoint imagePoint, WebCore::IntPoint dragPoint, uint64_t okEffect, HashMap<UINT,Vector<String> > dataMap, uint64_t fileSize, String pathname, WebKit::SharedMemory::Handle fileContentHandle, WebCore::IntSize dragImageSize, WebKit::SharedMemory::Handle dragImage, bool linkDrag)
215 #endif
216 #if PLATFORM(QT) || PLATFORM(GTK)
217     StartDrag(WebCore::DragData dragData, WebKit::ShareableBitmap::Handle dragImage)
218 #endif
219
220 #if PLATFORM(MAC)
221     # Dictionary support.
222     DidPerformDictionaryLookup(WTF::String text, WebKit::DictionaryPopupInfo dictionaryPopupInfo)
223
224     # Keyboard input support messages
225     InterpretQueuedKeyEvent(WebKit::EditorState state) -> (bool handled, Vector<WebCore::KeypressCommand> savedCommands)
226     ExecuteSavedCommandBySelector(WTF::String selector) -> (bool handled)
227
228     # Remote accessibility messages
229     RegisterWebProcessAccessibilityToken(CoreIPC::DataReference data)
230
231     # Plug-in complex text input support messages
232     PluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus)
233     SetPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t complexTextInputState)
234
235     # Speech messages
236     GetIsSpeaking() -> (bool isSpeaking)
237     Speak(WTF::String string)
238     StopSpeaking()
239
240     MakeFirstResponder()
241
242     # Spotlight
243     SearchWithSpotlight(WTF::String string)
244 #endif
245
246 #if PLATFORM(MAC)
247     SubstitutionsPanelIsShowing() -> (bool isShowing)
248 #endif
249 #if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
250     # Autocorrection messages
251     ShowCorrectionPanel(int32_t panelType, WebCore::FloatRect boundingBoxOfReplacedString, String replacedString, String replacementString, Vector<String> alternativeReplacementStrings)
252     DismissCorrectionPanel(int32_t reason)
253     DismissCorrectionPanelSoon(int32_t reason) -> (String result)
254     RecordAutocorrectionResponse(int32_t responseType, String replacedString, String replacementString);
255 #endif
256
257 #if PLATFORM(WIN)
258     # Windows 7 Gesture Messages
259     SetGestureReachedScrollingLimit(bool limitReached)
260
261     # Miscellaneous Windows messages
262     ScheduleChildWindowGeometryUpdate(WebKit::WindowGeometry geometry)
263 #endif
264
265     # Search popup menus
266     SaveRecentSearches(WTF::String name, Vector<String> searchItems)
267     LoadRecentSearches(WTF::String name) -> (Vector<String> result)
268 }