8692f14bfb8a806b0b09fb6befd84d80ce4a05c0
[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     RunBeforeUnloadConfirmPanel(WTF::String message, uint64_t frameID) -> (bool shouldClose)
52     PageDidScroll()
53     RunOpenPanel(uint64_t frameID, WebKit::WebOpenPanelParameters::Data parameters)
54     PrintFrame(uint64_t frameID) -> ()
55     RunModal()
56     DidCompleteRubberBandForMainFrame(WebCore::IntSize initialOverhang)
57     DidChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar)
58     DidChangeScrollOffsetPinningForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar)
59
60 #if ENABLE(TILED_BACKING_STORE)
61     PageDidRequestScroll(WebCore::IntSize delta)
62 #endif
63 #if PLATFORM(QT)
64     DidChangeContentsSize(WebCore::IntSize newSize)
65     DidFindZoomableArea(WebCore::IntRect area)
66 #endif
67
68     # Policy messages
69     DecidePolicyForResponse(uint64_t frameID, WebCore::ResourceResponse response, WebCore::ResourceRequest request, uint64_t listenerID, WebKit::InjectedBundleUserMessageEncoder userData) -> (bool receivedPolicyAction, uint64_t policyAction, uint64_t downloadID)
70     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)
71     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)
72     UnableToImplementPolicy(uint64_t frameID, WebCore::ResourceError error, 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(WTF::String suggestedFilename, 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     ScriptValueCallback(CoreIPC::DataReference resultData, uint64_t callbackID)
122     ComputedPagesCallback(Vector<WebCore::IntRect> pageRects, double totalScaleFactorForPrinting, uint64_t callbackID)
123     ValidateCommandCallback(WTF::String command, bool isEnabled, int32_t state, uint64_t callbackID)
124
125     ViewScaleFactorDidChange(double scaleFactor)
126
127 #if PLATFORM(MAC)
128     # Dictionary support.
129     DidPerformDictionaryLookup(WTF::String text, WebKit::DictionaryPopupInfo dictionaryPopupInfo)
130
131     # Keyboard support messages
132     InterpretKeyEvent(uint32_t type) -> (Vector<WebCore::KeypressCommand> commandName, uint32_t selectionStart, uint32_t selectionEnd, Vector<WebCore::CompositionUnderline> underlines)
133     
134     # Remote accessibility messages
135     RegisterWebProcessAccessibilityToken(CoreIPC::DataReference data)
136 #endif
137     
138     # BackForward messages
139     BackForwardAddItem(uint64_t itemID)
140     BackForwardGoToItem(uint64_t itemID)
141     BackForwardItemAtIndex(int32_t itemIndex) -> (uint64_t itemID)
142     BackForwardBackListCount() -> (int32_t count)
143     BackForwardForwardListCount() -> (int32_t count)
144     BackForwardClear()
145     ShouldGoToBackForwardListItem(uint64_t itemID) -> (bool shouldGoToBackForwardListItem)
146
147     # Undo/Redo messages
148     RegisterEditCommandForUndo(uint64_t commandID, uint32_t editAction)
149     ClearAllEditCommands()
150     
151     # Selection messages
152     SelectionStateChanged(WebKit::SelectionState selectionState)
153
154 #if PLATFORM(WIN)
155     DidChangeCompositionSelection(bool hasChanged)
156 #endif
157
158     # Find messages
159     DidCountStringMatches(WTF::String string, uint32_t matchCount)
160     SetFindIndicator(WebCore::FloatRect selectionRect, Vector<WebCore::FloatRect> textRects, WebKit::SharedMemory::Handle contentImageHandle, bool fadeOut)
161     DidFindString(WTF::String string, uint32_t matchCount)
162     DidFailToFindString(WTF::String string)
163
164     # PopupMenu messages
165     ShowPopupMenu(WebCore::IntRect rect, uint64_t textDirection, Vector<WebKit::WebPopupItem> items, int32_t selectedIndex, WebKit::PlatformPopupMenuData data)
166     HidePopupMenu()
167     
168     # ContextMenu messages
169     ShowContextMenu(WebCore::IntPoint menuLocation, WebKit::ContextMenuState state, Vector<WebKit::WebContextMenuItemData> items, WebKit::InjectedBundleUserMessageEncoder userData)
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     UpdateSpellingUIWithGrammarString(WTF::String badGrammarPhrase, WebCore::GrammarDetail grammarDetail)
197     GetGuessesForWord(WTF::String word, WTF::String context) -> (Vector<WTF::String> guesses)
198     LearnWord(WTF::String word);
199     IgnoreWord(WTF::String word);
200
201     # Drag and drop messages
202     DidPerformDragControllerAction(uint64_t resultOperation)
203 #if PLATFORM(MAC)
204     SetDragImage(WebCore::IntPoint clientPosition, WebCore::IntSize imageSize, WebKit::SharedMemory::Handle dragImage, bool linkDrag)
205 #endif
206 #if PLATFORM(WIN)
207     StartDragDrop(WebCore::IntPoint imagePoint, WebCore::IntPoint dragPoint, uint64_t okEffect, HashMap<UINT,Vector<String> > dataMap, WebCore::IntSize dragImageSize, WebKit::SharedMemory::Handle dragImage, bool linkDrag)
208 #endif
209 }