WebKit2: Implement showModalDialog
[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     DataCallback(CoreIPC::DataReference resultData, uint64_t callbackID)
117     StringCallback(WTF::String resultString, uint64_t callbackID)
118
119     DidReceiveAccessibilityPageToken(CoreIPC::DataReference data)
120
121 #if PLATFORM(MAC)
122     # Keyboard support messages
123     InterpretKeyEvent(uint32_t type) -> (Vector<WebCore::KeypressCommand> commandName, uint32_t selectionStart, uint32_t selectionEnd, Vector<WebCore::CompositionUnderline> underlines)
124 #endif
125     
126     # BackForward messages
127     BackForwardAddItem(uint64_t itemID)
128     BackForwardGoToItem(uint64_t itemID)
129     BackForwardItemAtIndex(int32_t itemIndex) -> (uint64_t itemID)
130     BackForwardBackListCount() -> (int32_t count)
131     BackForwardForwardListCount() -> (int32_t count)
132     BackForwardClear()
133
134     # Undo/Redo messages
135     RegisterEditCommandForUndo(uint64_t commandID, uint32_t editAction)
136     ClearAllEditCommands()
137     
138     # Selection messages
139     SelectionStateChanged(WebKit::SelectionState selectionState)
140
141 #if PLATFORM(WIN)
142     DidChangeCompositionSelection(bool hasChanged)
143 #endif
144
145     # Find messages
146     DidCountStringMatches(WTF::String string, uint32_t matchCount)
147     SetFindIndicator(WebCore::FloatRect selectionRect, Vector<WebCore::FloatRect> textRects, WebKit::SharedMemory::Handle contentImageHandle, bool fadeOut)
148     DidFindString(WTF::String string, uint32_t matchCount)
149     DidFailToFindString(WTF::String string)
150
151     # PopupMenu messages
152     ShowPopupMenu(WebCore::IntRect rect, Vector<WebKit::WebPopupItem> items, int32_t selectedIndex, WebKit::PlatformPopupMenuData data)
153     HidePopupMenu()
154     
155     # ContextMenu messages
156     ShowContextMenu(WebCore::IntPoint menuLocation, WebKit::ContextMenuState state, Vector<WebKit::WebContextMenuItemData> items, WebKit::InjectedBundleUserMessageEncoder userData)
157
158 #if USE(ACCELERATED_COMPOSITING)
159     # Accelerated compositing messages
160     DidChangeAcceleratedCompositing(bool compositing) -> (WebKit::DrawingAreaInfo newDrawingArea)
161 #endif
162
163     # Authentication messages
164     CanAuthenticateAgainstProtectionSpaceInFrame(uint64_t frameID, WebCore::ProtectionSpace protectionSpace) -> (bool canAuthenticate)
165     DidReceiveAuthenticationChallenge(uint64_t frameID, WebCore::AuthenticationChallenge challenge, uint64_t challengeID)
166
167     # Database messages
168     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)
169
170     # Geolocation messages
171     RequestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_t frameID, WTF::String originIdentifier)
172
173 #if PLATFORM(MAC)
174     # Plug-in complex text input support messages
175     SetComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled)
176 #endif
177
178 #if PLATFORM(MAC)
179     # Speech messages
180     GetIsSpeaking() -> (bool isSpeaking)
181     Speak(WTF::String string)
182     StopSpeaking()
183 #endif
184
185     # Spelling and grammar messages
186     CheckTextOfParagraph(WTF::String text, uint64_t checkingTypes) -> (Vector<WebCore::TextCheckingResult> results)
187     UpdateSpellingUIWithMisspelledWord(WTF::String misspelledWord)
188     GetGuessesForWord(WTF::String word, WTF::String context) -> (Vector<WTF::String> guesses)
189     LearnWord(WTF::String word);
190     IgnoreWord(WTF::String word);
191     
192     # Drag and drop messages
193     DidPerformDragControllerAction(uint64_t resultOperation)
194 #if PLATFORM(MAC)
195     SetDragImage(WebCore::IntPoint clientPosition, WebCore::IntSize imageSize, WebKit::SharedMemory::Handle dragImage, bool linkDrag)
196 #endif
197 }