Reviewed by Darin Adler.
[WebKit.git] / Source / WebKit2 / UIProcess / WebPageProxy.messages.in
1 # Copyright (C) 2010 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
58 #if ENABLE(TILED_BACKING_STORE)
59     PageDidRequestScroll(WebCore::IntSize delta)
60 #endif
61 #if PLATFORM(QT)
62     DidChangeContentsSize(WebCore::IntSize newSize)
63     DidFindZoomableArea(WebCore::IntRect area)
64 #endif
65
66     # Policy messages.
67     DecidePolicyForMIMEType(uint64_t frameID, WTF::String MIMEType, WTF::String url, uint64_t listenerID) -> (bool receivedPolicyAction, uint64_t policyAction, uint64_t downloadID)
68     DecidePolicyForNavigationAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, WTF::String url, uint64_t listenerID)
69     DecidePolicyForNewWindowAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, WTF::String url, uint64_t listenerID)
70
71     # Progress messages.
72     DidChangeProgress(double value)
73     DidFinishProgress()
74     DidStartProgress()
75
76     # Frame lifetime messages.
77     DidCreateMainFrame(uint64_t frameID)
78     DidCreateSubframe(uint64_t frameID, uint64_t parentFrameID)
79     DidSaveFrameToPageCache(uint64_t frameID);
80     DidRestoreFrameFromPageCache(uint64_t frameID, uint64_t parentFrameID);
81
82     # Frame load messages.
83     DidCommitLoadForFrame(uint64_t frameID, WTF::String mimeType, bool hasCustomRepresentation, WebKit::PlatformCertificateInfo certificateInfo, WebKit::InjectedBundleUserMessageEncoder userData)
84     DidFailLoadForFrame(uint64_t frameID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData)
85     DidFailProvisionalLoadForFrame(uint64_t frameID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData)
86     DidFinishDocumentLoadForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
87     DidFinishLoadForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
88     DidFirstLayoutForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
89     DidFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
90     DidReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, WTF::String url, WebKit::InjectedBundleUserMessageEncoder userData)
91     DidRemoveFrameFromHierarchy(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
92     DidStartProvisionalLoadForFrame(uint64_t frameID, WTF::String url, bool loadingSubstituteDataForUnreachableURL, WebKit::InjectedBundleUserMessageEncoder userData)
93     DidReceiveTitleForFrame(uint64_t frameID, WTF::String title, WebKit::InjectedBundleUserMessageEncoder userData)
94     DidDisplayInsecureContentForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
95     DidRunInsecureContentForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
96     DidSameDocumentNavigationForFrame(uint64_t frameID, uint32_t type, WTF::String url, WebKit::InjectedBundleUserMessageEncoder userData)
97
98     FrameDidBecomeFrameSet(uint64_t frameID, bool value)
99
100     # Resource load messages.
101     DidInitiateLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, WebCore::ResourceRequest request)
102     DidSendRequestForResource(uint64_t frameID, uint64_t resourceIdentifier, WebCore::ResourceRequest request, WebCore::ResourceResponse redirectResponse)
103     DidReceiveResponseForResource(uint64_t frameID, uint64_t resourceIdentifier, WebCore::ResourceResponse response)
104     DidReceiveContentLengthForResource(uint64_t frameID, uint64_t resourceIdentifier, uint64_t contentLength)
105     DidFinishLoadForResource(uint64_t frameID, uint64_t resourceIdentifier)
106     DidFailLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, WebCore::ResourceError error)
107
108     # Custom representations
109     DidFinishLoadingDataForCustomRepresentation(CoreIPC::DataReference data)
110
111     # Forms messages.
112     WillSubmitForm(uint64_t frameID, uint64_t sourceFrameID, WebKit::StringPairVector textFieldValues, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData)
113
114     # Callback messages.
115     DataCallback(CoreIPC::DataReference resultData, uint64_t callbackID)
116     StringCallback(WTF::String resultString, uint64_t callbackID)
117
118     DidReceiveAccessibilityPageToken(CoreIPC::DataReference data)
119
120 #if PLATFORM(MAC)
121     # Keyboard support messages.
122     InterpretKeyEvent(uint32_t type) -> (Vector<WebCore::KeypressCommand> commandName, uint32_t selectionStart, uint32_t selectionEnd, Vector<WebCore::CompositionUnderline> underlines)
123 #endif
124     
125     # BackForward messages.
126     BackForwardAddItem(uint64_t itemID)
127     BackForwardGoToItem(uint64_t itemID)
128     BackForwardItemAtIndex(int32_t itemIndex) -> (uint64_t itemID)
129     BackForwardBackListCount() -> (int32_t count)
130     BackForwardForwardListCount() -> (int32_t count)
131     BackForwardClear()
132
133     # Undo/Redo messages.
134     RegisterEditCommandForUndo(uint64_t commandID, uint32_t editAction)
135     ClearAllEditCommands()
136     
137     # Selection messages.
138     SelectionStateChanged(WebKit::SelectionState selectionState)
139
140 #if PLATFORM(WIN)
141     DidChangeCompositionSelection(bool hasChanged)
142 #endif
143
144     # Find messages.
145     DidCountStringMatches(WTF::String string, uint32_t matchCount)
146     SetFindIndicator(WebCore::FloatRect selectionRect, Vector<WebCore::FloatRect> textRects, WebKit::SharedMemory::Handle contentImageHandle, bool fadeOut)
147     DidFindString(WTF::String string, uint32_t matchCount)
148     DidFailToFindString(WTF::String string)
149
150     # PopupMenu messages.
151     ShowPopupMenu(WebCore::IntRect rect, Vector<WebKit::WebPopupItem> items, int32_t selectedIndex, WebKit::PlatformPopupMenuData data)
152     HidePopupMenu()
153     
154     # ContextMenu messages.
155     ShowContextMenu(WebCore::IntPoint menuLocation, WebKit::ContextMenuState state, Vector<WebKit::WebContextMenuItemData> items, WebKit::InjectedBundleUserMessageEncoder userData)
156
157 #if USE(ACCELERATED_COMPOSITING)
158     # Accelerated compositing messages.
159     DidChangeAcceleratedCompositing(bool compositing) -> (WebKit::DrawingAreaInfo newDrawingArea)
160 #endif
161
162     # Authentication messages.
163     CanAuthenticateAgainstProtectionSpaceInFrame(uint64_t frameID, WebCore::ProtectionSpace protectionSpace) -> (bool canAuthenticate)
164     DidReceiveAuthenticationChallenge(uint64_t frameID, WebCore::AuthenticationChallenge challenge, uint64_t challengeID)
165
166     # Database messages.
167     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)
168
169     # Geolocation messages.
170     RequestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_t frameID, WTF::String originIdentifier)
171
172     # Plug-in complex text input support messages.
173 #if PLATFORM(MAC)
174     SetComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled)
175 #endif
176
177     # Speech messages.
178 #if PLATFORM(MAC)
179     GetIsSpeaking() -> (bool isSpeaking)
180     Speak(WTF::String string)
181     StopSpeaking()
182 #endif
183
184     # Spelling and grammar.
185     CheckTextOfParagraph(WTF::String text, uint64_t checkingTypes) -> (Vector<WebCore::TextCheckingResult> results)
186     UpdateSpellingUIWithMisspelledWord(WTF::String misspelledWord)
187     GetGuessesForWord(WTF::String word, WTF::String context) -> (Vector<WTF::String> guesses)
188     LearnWord(WTF::String word);
189     IgnoreWord(WTF::String word);
190     
191     # Drag and drop.
192     DidPerformDragControllerAction(uint64_t resultOperation)
193 #if PLATFORM(MAC)
194     SetDragImage(WebCore::IntPoint clientPosition, WebCore::IntSize imageSize, WebKit::SharedMemory::Handle dragImageHandle, bool linkDrag)
195 #endif
196 }