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