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