<http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system...
[WebKit-https.git] / Source / WebKit2 / WebProcess / WebPage / WebPage.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 -> WebPage {
24     SetActive(bool active)
25     SetFocused(bool focused)
26     SetInitialFocus(bool forward, bool isKeyboardEventValid, WebKit::WebKeyboardEvent event)
27     SetIsInWindow(bool isInWindow)
28
29     SetDrawsBackground(bool drawsBackground)
30     SetDrawsTransparentBackground(bool drawsTransparentBackground)
31
32     ViewWillStartLiveResize()
33     ViewWillEndLiveResize()
34
35     KeyEvent(WebKit::WebKeyboardEvent event)
36     KeyEventSyncForTesting(WebKit::WebKeyboardEvent event) -> (bool handled)
37     MouseEvent(WebKit::WebMouseEvent event)
38     MouseEventSyncForTesting(WebKit::WebMouseEvent event) -> (bool handled)
39     WheelEventSyncForTesting(WebKit::WebWheelEvent event) -> (bool handled)
40 #if ENABLE(TOUCH_EVENTS)
41     TouchEvent(WebKit::WebTouchEvent event)
42     TouchEventSyncForTesting(WebKit::WebTouchEvent event) -> (bool handled)
43 #endif
44 #if ENABLE(TOUCH_EVENTS) && PLATFORM(QT)
45     HighlightPotentialActivation(WebCore::IntPoint point, WebCore::IntSize area)
46 #endif
47
48 #if ENABLE(INPUT_TYPE_COLOR)
49     DidEndColorChooser();
50     DidChooseColor(WebCore::Color color);
51 #endif
52
53 #if ENABLE(CONTEXT_MENUS)
54     ContextMenuHidden()
55 #endif
56
57     ScrollBy(uint32_t scrollDirection, uint32_t scrollGranularity)
58     CenterSelectionInVisibleArea()
59
60     GoBack(uint64_t backForwardItemID)
61     GoForward(uint64_t backForwardItemID)
62     GoToBackForwardItem(uint64_t backForwardItemID)
63     TryRestoreScrollPosition()
64     LoadHTMLString(WTF::String htmlString, WTF::String baseURL)
65     LoadAlternateHTMLString(WTF::String htmlString, WTF::String baseURL, WTF::String unreachableURL); 
66     LoadPlainTextString(WTF::String string)
67     LoadWebArchiveData(CoreIPC::DataReference webArchiveData)
68     LoadURL(WTF::String url, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
69     LoadURLRequest(WebCore::ResourceRequest request, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
70     LinkClicked(WTF::String url, WebKit::WebMouseEvent event)
71     Reload(bool reloadFromOrigin, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
72     StopLoading()
73
74 #if PLATFORM(QT)
75     ApplicationSchemeReply(WebKit::QtNetworkReplyData reply)
76     RegisterApplicationScheme(WTF::String scheme)
77     SetUserScripts(WTF::Vector<WTF::String> script)
78 #endif
79
80     StopLoadingFrame(uint64_t frameID)
81     
82     RestoreSession(WebKit::SessionState state)
83     RestoreSessionAndNavigateToCurrentItem(WebKit::SessionState state)
84
85     DidRemoveBackForwardItem(uint64_t backForwardItemID)
86     SetWillGoToBackForwardItemCallbackEnabled(bool willGoToBackForwardItemEnabled)
87
88     DidReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID)
89
90     ClearSelection()
91
92     # Callbacks.
93     GetContentsAsString(uint64_t callbackID)
94     GetMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID)
95     GetResourceDataFromFrame(uint64_t frameID, WTF::String resourceURL, uint64_t callbackID)
96     GetRenderTreeExternalRepresentation(uint64_t callbackID)
97     GetSelectionOrContentsAsString(uint64_t callbackID)
98     GetSourceForFrame(uint64_t frameID, uint64_t callbackID)
99     GetWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID)
100     RunJavaScriptInMainFrame(WTF::String script, uint64_t callbackID)
101     ForceRepaint(uint64_t callbackID)
102
103 #if PLATFORM(MAC)
104     # Dictionary support.
105     PerformDictionaryLookupAtLocation(WebCore::FloatPoint point)
106 #endif
107
108     PreferencesDidChange(WebKit::WebPreferencesStore store)
109
110     SetUserAgent(WTF::String userAgent)
111     SetCustomTextEncodingName(WTF::String encodingName)
112
113     SuspendActiveDOMObjectsAndAnimations()
114     ResumeActiveDOMObjectsAndAnimations()
115
116 #if USE(TILED_BACKING_STORE)
117     SetViewportSize(WebCore::IntSize size)
118 #endif
119
120     Close()
121     TryClose()
122
123     ValidateCommand(WTF::String name, uint64_t callbackID)
124     ExecuteEditCommand(WTF::String name)
125
126     DidRemoveEditCommand(uint64_t commandID)
127     ReapplyEditCommand(uint64_t commandID)
128     UnapplyEditCommand(uint64_t commandID)
129
130     SetPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor)
131     SetPageZoomFactor(double zoomFactor)
132     SetTextZoomFactor(double zoomFactor)
133     WindowScreenDidChange(uint64_t displayID)
134
135     ScalePage(double scale, WebCore::IntPoint origin)
136
137     SetUseFixedLayout(bool fixed)
138     SetFixedLayoutSize(WebCore::IntSize size)
139
140     SetPaginationMode(uint32_t mode);
141     SetPaginationBehavesLikeColumns(bool behavesLikeColumns);
142     SetPageLength(double pageLength);
143     SetGapBetweenPages(double gap);
144
145     # Find.
146     FindString(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
147     HideFindUI()
148     CountStringMatches(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
149
150     # Drag and drop.
151 #if PLATFORM(WIN) && ENABLE(DRAG_SUPPORT)
152     PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, HashMap<UINT,Vector<String>> dataMap, uint32_t flags)
153 #endif
154 #if (PLATFORM(QT) || PLATFORM(GTK)) && ENABLE(DRAG_SUPPORT)
155     PerformDragControllerAction(uint64_t action, WebCore::DragData dragData)
156 #endif
157 #if !PLATFORM(WIN) && !PLATFORM(QT) && !PLATFORM(GTK) && ENABLE(DRAG_SUPPORT)
158     PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, WTF::String dragStorageName, uint32_t flags, WebKit::SandboxExtension::Handle sandboxExtensionHandle, WebKit::SandboxExtension::HandleArray sandboxExtensionsForUpload)
159 #endif
160 #if ENABLE(DRAG_SUPPORT)
161     DragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation)
162 #endif
163
164     # Popup menu.
165     DidChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
166     SetTextForActivePopupMenu(int32_t index);
167 #if PLATFORM(GTK)    
168     FailedToShowPopupMenu();
169 #endif    
170     
171 #if ENABLE(CONTEXT_MENUS)
172     # Context menu.
173     DidSelectItemFromActiveContextMenu(WebKit::WebContextMenuItemData menuItem);
174 #endif
175
176     # Open panel.
177     DidChooseFilesForOpenPanel(Vector<WTF::String> fileURLs)
178     DidCancelForOpenPanel()
179 #if ENABLE(WEB_PROCESS_SANDBOX)
180     ExtendSandboxForFileFromOpenPanel(WebKit::SandboxExtension::Handle sandboxExtensionHandle)
181 #endif
182
183     # Spelling and grammar.
184     AdvanceToNextMisspelling(bool startBeforeSelection)
185     ChangeSpellingToWord(WTF::String word)
186 #if USE(APPKIT)
187     UppercaseWord();
188     LowercaseWord();
189     CapitalizeWord();
190
191     SetSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled);
192 #endif
193
194 #if ENABLE(GEOLOCATION)
195     # Geolocation
196     DidReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed)
197 #endif
198
199     # Notification
200     DidReceiveNotificationPermissionDecision(uint64_t notificationID, bool allowed)
201
202     SetWindowResizerSize(WebCore::IntSize intersectsView)
203
204     # Printing.
205     BeginPrinting(uint64_t frameID, WebKit::PrintInfo printInfo)
206     EndPrinting();
207     ComputePagesForPrinting(uint64_t frameID, WebKit::PrintInfo printInfo, uint64_t callbackID)
208 #if PLATFORM(MAC) || PLATFORM(WIN)
209     DrawRectToPDF(uint64_t frameID, WebKit::PrintInfo printInfo, WebCore::IntRect rect, uint64_t callbackID)
210     DrawPagesToPDF(uint64_t frameID, WebKit::PrintInfo printInfo, uint32_t first, uint32_t count, uint64_t callbackID)
211 #endif
212 #if PLATFORM(GTK)
213     DrawPagesForPrinting(uint64_t frameID, WebKit::PrintInfo printInfo, uint64_t callbackID)
214 #endif
215
216     # Media
217     SetMediaVolume(float volume)
218
219     SetMemoryCacheMessagesEnabled(bool memoryCacheMessagesEnabled)
220
221     // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
222     // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
223     Dummy() -> (bool dummyReturn)
224
225     SetCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel)
226     SetCanRunModal(bool canRunModal)
227
228     # Web Intents
229 #if ENABLE(WEB_INTENTS)
230     DeliverIntentToFrame(uint64_t frameID, WebKit::IntentData intentData);
231 #endif
232
233 #if PLATFORM(QT)
234     SetComposition(WTF::String text, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd)
235     ConfirmComposition(WTF::String text, int64_t selectionStart, int64_t selectionLength)
236     CancelComposition()
237 #endif
238
239 #if PLATFORM(MAC)
240     # Complex text input support for plug-ins.
241     SendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, String textInput)
242
243     SetWindowIsVisible(bool windowIsVisible)
244     WindowAndViewFramesChanged(WebCore::IntRect windowFrameInScreenCoordinates, WebCore::IntRect viewFrameInWindowCoordinates, WebCore::IntPoint accessibilityViewCoordinates)
245     RegisterUIProcessAccessibilityTokens(CoreIPC::DataReference elemenToken, CoreIPC::DataReference windowToken)
246     GetStringSelectionForPasteboard() -> (WTF::String stringValue)
247     GetDataSelectionForPasteboard(WTF::String pasteboardType) -> (WebKit::SharedMemory::Handle handle, uint64_t size)
248     ReadSelectionFromPasteboard(WTF::String pasteboardName) -> (bool result)
249
250     # Text input.
251     SetComposition(WTF::String text, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) -> (WebKit::EditorState newState)
252     ConfirmComposition() -> (WebKit::EditorState newState)
253     CancelComposition() -> (WebKit::EditorState newState)
254     InsertText(WTF::String text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) -> (bool handled, WebKit::EditorState newState)
255     GetMarkedRange() -> (uint64_t location, uint64_t length)
256     GetSelectedRange() -> (uint64_t location, uint64_t length)
257     GetAttributedSubstringFromRange(uint64_t location, uint64_t length) -> (WebKit::AttributedString result)
258     CharacterIndexForPoint(WebCore::IntPoint point) -> (uint64_t result)
259     FirstRectForCharacterRange(uint64_t location, uint64_t length) -> (WebCore::IntRect resultRect)
260     ExecuteKeypressCommands(Vector<WebCore::KeypressCommand> savedCommands) -> (bool handled, WebKit::EditorState newState)
261     ShouldDelayWindowOrderingEvent(WebKit::WebMouseEvent event) -> (bool result)
262     AcceptsFirstMouse(int eventNumber, WebKit::WebMouseEvent event) -> (bool result)
263     InsertDictatedText(WTF::String text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, WTF::Vector<WebCore::DictationAlternative> dictationAlternatives) -> (bool handled, WebKit::EditorState newState)
264 #endif
265 #if PLATFORM(WIN)
266     // FIXME: Unify with Mac counterparts.
267     ConfirmComposition(WTF::String compositionString)
268     SetComposition(WTF::String compositionString, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t cursorPosition)
269     FirstRectForCharacterInSelectedRange(uint64_t characterPosition) -> (WebCore::IntRect resultRect)
270     GetSelectedText() -> (WTF::String text)
271
272     GestureWillBegin(WebCore::IntPoint point) -> (bool canBeginPanning)
273     GestureDidScroll(WebCore::IntSize size)
274     GestureDidEnd()
275 #endif
276 #if PLATFORM(QT)
277     FindZoomableAreaForPoint(WebCore::IntPoint point, WebCore::IntSize area)
278 #endif
279
280 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
281     HandleAlternativeTextUIResult(String result)
282 #endif
283
284 #if ENABLE(PAGE_VISIBILITY_API)
285     SetVisibilityState(int visibilityState, bool isInitialState);
286 #endif
287
288 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
289     WidgetMapped(int64_t id)
290 #endif
291 }