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