Reviewed and landed by Sam Weinig.
[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::WindowFeatures windowFeatures, uint32_t modifiers, int32_t mouseButton) -> (uint64_t newPageID, WebKit::WebPageCreationParameters newPageParameters)
26     ShowPage()
27     ClosePage()
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     MouseDidMoveOverElement(uint32_t modifiers, WebKit::InjectedBundleUserMessageEncoder userData);
32     MissingPluginButtonClicked(WTF::String mimeType, WTF::String url)
33     DidChangeViewportData(WebCore::ViewportArguments arguments)
34     DidReceiveEvent(uint32_t type, bool handled)
35     DidValidateMenuItem(WTF::String commandName, bool isEnabled, int32_t state)
36     SetCursor(WebCore::Cursor cursor)
37     SetStatusText(WTF::String statusText)
38     SetToolTip(WTF::String toolTip)
39     TakeFocus(bool direction)
40     FocusedFrameChanged(uint64_t frameID)
41     FrameSetLargestFrameChanged(uint64_t frameID)
42     SetToolbarsAreVisible(bool toolbarsAreVisible)
43     GetToolbarsAreVisible() -> (bool toolbarsAreVisible)
44     SetMenuBarIsVisible(bool menuBarIsVisible);
45     GetMenuBarIsVisible() -> (bool menuBarIsVisible);
46     SetStatusBarIsVisible(bool statusBarIsVisible)
47     GetStatusBarIsVisible() -> (bool statusBarIsVisible)
48     SetIsResizable(bool isResizable)
49     GetIsResizable() -> (bool isResizable)
50     SetWindowFrame(WebCore::FloatRect windowFrame)
51     GetWindowFrame() -> (WebCore::FloatRect windowFrame)
52     CanRunBeforeUnloadConfirmPanel() -> (bool canRun)
53     RunBeforeUnloadConfirmPanel(WTF::String message, uint64_t frameID) -> (bool shouldClose)
54     PageDidScroll()
55     RunOpenPanel(uint64_t frameID, WebKit::WebOpenPanelParameters::Data parameters)
56     PrintFrame(uint64_t frameID) -> ()
57     RunModal()
58     DidCompleteRubberBandForMainFrame(WebCore::IntSize initialOverhang)
59     DidChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar)
60
61 #if ENABLE(TILED_BACKING_STORE)
62     PageDidRequestScroll(WebCore::IntSize delta)
63 #endif
64 #if PLATFORM(QT)
65     DidChangeContentsSize(WebCore::IntSize newSize)
66     DidFindZoomableArea(WebCore::IntRect area)
67 #endif
68
69     # Policy messages
70     DecidePolicyForMIMEType(uint64_t frameID, WTF::String MIMEType, WebCore::ResourceRequest request, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) -> (bool receivedPolicyAction, uint64_t policyAction, uint64_t downloadID)
71     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)
72     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)
73
74     # Progress messages
75     DidChangeProgress(double value)
76     DidFinishProgress()
77     DidStartProgress()
78
79     # Frame lifetime messages
80     DidCreateMainFrame(uint64_t frameID)
81     DidCreateSubframe(uint64_t frameID, uint64_t parentFrameID)
82     DidSaveFrameToPageCache(uint64_t frameID);
83     DidRestoreFrameFromPageCache(uint64_t frameID, uint64_t parentFrameID);
84
85     # Frame load messages
86     DidCommitLoadForFrame(uint64_t frameID, WTF::String mimeType, bool hasCustomRepresentation, WebKit::PlatformCertificateInfo certificateInfo, WebKit::InjectedBundleUserMessageEncoder userData)
87     DidFailLoadForFrame(uint64_t frameID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData)
88     DidFailProvisionalLoadForFrame(uint64_t frameID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData)
89     DidFinishDocumentLoadForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
90     DidFinishLoadForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
91     DidFirstLayoutForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
92     DidFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
93     DidReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, WTF::String url, WebKit::InjectedBundleUserMessageEncoder userData)
94     DidRemoveFrameFromHierarchy(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
95     DidStartProvisionalLoadForFrame(uint64_t frameID, WTF::String url, bool loadingSubstituteDataForUnreachableURL, WebKit::InjectedBundleUserMessageEncoder userData)
96     DidReceiveTitleForFrame(uint64_t frameID, WTF::String title, WebKit::InjectedBundleUserMessageEncoder userData)
97     DidDisplayInsecureContentForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
98     DidRunInsecureContentForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
99     DidSameDocumentNavigationForFrame(uint64_t frameID, uint32_t type, WTF::String url, WebKit::InjectedBundleUserMessageEncoder userData)
100
101     FrameDidBecomeFrameSet(uint64_t frameID, bool value)
102
103     # Resource load messages
104     DidInitiateLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, WebCore::ResourceRequest request, bool pageIsProvisionallyLoading)
105     DidSendRequestForResource(uint64_t frameID, uint64_t resourceIdentifier, WebCore::ResourceRequest request, WebCore::ResourceResponse redirectResponse)
106     DidReceiveResponseForResource(uint64_t frameID, uint64_t resourceIdentifier, WebCore::ResourceResponse response)
107     DidReceiveContentLengthForResource(uint64_t frameID, uint64_t resourceIdentifier, uint64_t contentLength)
108     DidFinishLoadForResource(uint64_t frameID, uint64_t resourceIdentifier)
109     DidFailLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, WebCore::ResourceError error)
110
111     # Custom representations
112     DidFinishLoadingDataForCustomRepresentation(CoreIPC::DataReference data)
113
114     # Forms messages
115     WillSubmitForm(uint64_t frameID, uint64_t sourceFrameID, WebKit::StringPairVector textFieldValues, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData)
116
117     # Callback messages
118     VoidCallback(uint64_t callbackID)
119     DataCallback(CoreIPC::DataReference resultData, uint64_t callbackID)
120     StringCallback(WTF::String resultString, uint64_t callbackID)
121     ComputedPagesCallback(Vector<WebCore::IntRect> pageRects, double totalScaleFactorForPrinting, uint64_t callbackID)
122
123
124     ViewScaleFactorDidChange(double scaleFactor)
125
126 #if PLATFORM(MAC)
127     # Keyboard support messages
128     InterpretKeyEvent(uint32_t type) -> (Vector<WebCore::KeypressCommand> commandName, uint32_t selectionStart, uint32_t selectionEnd, Vector<WebCore::CompositionUnderline> underlines)
129     
130     # Remote accessibility messages
131     RegisterWebProcessAccessibilityToken(CoreIPC::DataReference data)
132 #endif
133     
134     # BackForward messages
135     BackForwardAddItem(uint64_t itemID)
136     BackForwardGoToItem(uint64_t itemID)
137     BackForwardItemAtIndex(int32_t itemIndex) -> (uint64_t itemID)
138     BackForwardBackListCount() -> (int32_t count)
139     BackForwardForwardListCount() -> (int32_t count)
140     BackForwardClear()
141
142     # Undo/Redo messages
143     RegisterEditCommandForUndo(uint64_t commandID, uint32_t editAction)
144     ClearAllEditCommands()
145     
146     # Selection messages
147     SelectionStateChanged(WebKit::SelectionState selectionState)
148
149 #if PLATFORM(WIN)
150     DidChangeCompositionSelection(bool hasChanged)
151 #endif
152
153     # Find messages
154     DidCountStringMatches(WTF::String string, uint32_t matchCount)
155     SetFindIndicator(WebCore::FloatRect selectionRect, Vector<WebCore::FloatRect> textRects, WebKit::SharedMemory::Handle contentImageHandle, bool fadeOut)
156     DidFindString(WTF::String string, uint32_t matchCount)
157     DidFailToFindString(WTF::String string)
158
159     # PopupMenu messages
160     ShowPopupMenu(WebCore::IntRect rect, uint64_t textDirection, Vector<WebKit::WebPopupItem> items, int32_t selectedIndex, WebKit::PlatformPopupMenuData data)
161     HidePopupMenu()
162     
163     # ContextMenu messages
164     ShowContextMenu(WebCore::IntPoint menuLocation, WebKit::ContextMenuState state, Vector<WebKit::WebContextMenuItemData> items, WebKit::InjectedBundleUserMessageEncoder userData)
165
166 #if USE(ACCELERATED_COMPOSITING)
167     # Accelerated compositing messages
168     DidChangeAcceleratedCompositing(bool compositing) -> (WebKit::DrawingAreaInfo newDrawingArea)
169 #endif
170
171     # Authentication messages
172     CanAuthenticateAgainstProtectionSpaceInFrame(uint64_t frameID, WebCore::ProtectionSpace protectionSpace) -> (bool canAuthenticate)
173     DidReceiveAuthenticationChallenge(uint64_t frameID, WebCore::AuthenticationChallenge challenge, uint64_t challengeID)
174
175     # Database messages
176     ExceededDatabaseQuota(uint64_t frameID, WTF::String originIdentifier, WTF::String databaseName, WTF::String databaseDisplayName, uint64_t currentQuota, uint64_t currentUsage, uint64_t expectedUsage) -> (uint64_t newQuota)
177
178     # Geolocation messages
179     RequestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_t frameID, WTF::String originIdentifier)
180
181 #if PLATFORM(MAC)
182     # Plug-in complex text input support messages
183     SetComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled)
184 #endif
185
186 #if PLATFORM(MAC)
187     # Speech messages
188     GetIsSpeaking() -> (bool isSpeaking)
189     Speak(WTF::String string)
190     StopSpeaking()
191 #endif
192
193     # Spelling and grammar messages
194     CheckTextOfParagraph(WTF::String text, uint64_t checkingTypes) -> (Vector<WebCore::TextCheckingResult> results)
195     UpdateSpellingUIWithMisspelledWord(WTF::String misspelledWord)
196     GetGuessesForWord(WTF::String word, WTF::String context) -> (Vector<WTF::String> guesses)
197     LearnWord(WTF::String word);
198     IgnoreWord(WTF::String word);
199
200     # Drag and drop messages
201     DidPerformDragControllerAction(uint64_t resultOperation)
202 #if PLATFORM(MAC)
203     SetDragImage(WebCore::IntPoint clientPosition, WebCore::IntSize imageSize, WebKit::SharedMemory::Handle dragImage, bool linkDrag)
204 #endif
205 #if PLATFORM(WIN)
206     StartDragDrop(WebCore::IntPoint imagePoint, WebCore::IntPoint dragPoint, uint64_t okEffect, HashMap<UINT,Vector<String> > dataMap, WebCore::IntSize dragImageSize, WebKit::SharedMemory::Handle dragImage, bool linkDrag)
207 #endif
208 }