a93611f0ff2001fea29a8a4d1fb0ab70eec2f1fd
[framework/web/webkit-efl.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 #if ENABLE(TIZEN_ISF_PORT)
36     KeyEvent(WebKit::NativeWebKeyboardEvent event)
37 #endif
38
39 #if !ENABLE(TIZEN_ISF_PORT)
40     KeyEvent(WebKit::WebKeyboardEvent event)
41 #endif
42
43     KeyEventSyncForTesting(WebKit::WebKeyboardEvent event) -> (bool handled)
44     MouseEvent(WebKit::WebMouseEvent event)
45     MouseEventSyncForTesting(WebKit::WebMouseEvent event) -> (bool handled)
46     WheelEventSyncForTesting(WebKit::WebWheelEvent event) -> (bool handled)
47 #if ENABLE(TOUCH_EVENTS)
48     TouchEvent(WebKit::WebTouchEvent event)
49     TouchEventSyncForTesting(WebKit::WebTouchEvent event) -> (bool handled)
50 #endif
51 #if ENABLE(TOUCH_EVENTS) && PLATFORM(QT)
52     HighlightPotentialActivation(WebCore::IntPoint point, WebCore::IntSize area)
53 #endif
54
55 #if ENABLE(INPUT_TYPE_COLOR)
56     DidEndColorChooser();
57     DidChooseColor(WebCore::Color color);
58 #endif
59
60 #if ENABLE(CONTEXT_MENUS)
61     ContextMenuHidden()
62 #endif
63
64     ScrollBy(uint32_t scrollDirection, uint32_t scrollGranularity)
65     CenterSelectionInVisibleArea()
66
67 #if PLATFORM(EFL) && OS(TIZEN)
68     ScrollMainFrameBy(WebCore::IntSize scrollOffset)
69     ScrollMainFrameTo(WebCore::IntPoint scrollPosition)
70     CreateSnapshot(WebCore::IntRect rects, float scaleFactor) -> (WebKit::ShareableBitmap::Handle snapshotHandle)
71     RequestUpdateFormNavigation()
72     MoveFocus(int newIndex)
73 #if ENABLE(TIZEN_WEBKIT2_HIT_TEST)
74     HitTestResultAtPoint(WebCore::IntPoint point, int hitTestMode) -> (WebKit::WebHitTestResult::Data hitTestResultData)
75 #endif
76     SuspendJavaScriptAndResources()
77     ResumeJavaScriptAndResources()
78 #endif
79
80 #if ENABLE(TIZEN_WEB_STORAGE)
81     GetStorageQuotaBytes(uint64_t callbackID)
82     SetStorageQuotaBytes(uint32_t quota)
83 #endif
84 #if ENABLE(TIZEN_ORIENTATION_EVENTS)
85     SendOrientationChangeEvent(int orientation)
86 #endif
87
88     GoBack(uint64_t backForwardItemID)
89     GoForward(uint64_t backForwardItemID)
90     GoToBackForwardItem(uint64_t backForwardItemID)
91     TryRestoreScrollPosition()
92     LoadHTMLString(WTF::String htmlString, WTF::String baseURL)
93     LoadAlternateHTMLString(WTF::String htmlString, WTF::String baseURL, WTF::String unreachableURL); 
94     LoadPlainTextString(WTF::String string)
95     LoadWebArchiveData(CoreIPC::DataReference webArchiveData)
96 #if OS(TIZEN)
97     LoadContentsbyMimeType(CoreIPC::DataReference contents, WTF::String mimeType, WTF::String encoding, WTF::String baseURL)
98 #endif
99     LoadURL(WTF::String url, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
100     LoadURLRequest(WebCore::ResourceRequest request, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
101     LinkClicked(WTF::String url, WebKit::WebMouseEvent event)
102     Reload(bool reloadFromOrigin, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
103     StopLoading()
104
105 #if PLATFORM(QT)
106     ApplicationSchemeReply(WebKit::QtNetworkReplyData reply)
107     RegisterApplicationScheme(WTF::String scheme)
108     SetUserScripts(WTF::Vector<WTF::String> script)
109 #endif
110
111     StopLoadingFrame(uint64_t frameID)
112     
113     RestoreSession(WebKit::SessionState state)
114     RestoreSessionAndNavigateToCurrentItem(WebKit::SessionState state)
115
116     DidRemoveBackForwardItem(uint64_t backForwardItemID)
117     SetWillGoToBackForwardItemCallbackEnabled(bool willGoToBackForwardItemEnabled)
118
119     DidReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID)
120
121     ClearSelection()
122
123     # Callbacks.
124     GetContentsAsString(uint64_t callbackID)
125     GetMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID)
126     GetResourceDataFromFrame(uint64_t frameID, WTF::String resourceURL, uint64_t callbackID)
127     GetRenderTreeExternalRepresentation(uint64_t callbackID)
128     GetSelectionOrContentsAsString(uint64_t callbackID)
129     GetSourceForFrame(uint64_t frameID, uint64_t callbackID)
130     GetWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID)
131     RunJavaScriptInMainFrame(WTF::String script, uint64_t callbackID)
132     ForceRepaint(uint64_t callbackID)
133
134 #if PLATFORM(MAC)
135     # Dictionary support.
136     PerformDictionaryLookupAtLocation(WebCore::FloatPoint point)
137 #endif
138
139     PreferencesDidChange(WebKit::WebPreferencesStore store)
140
141     SetUserAgent(WTF::String userAgent)
142     SetCustomTextEncodingName(WTF::String encodingName)
143
144     SuspendActiveDOMObjectsAndAnimations()
145     ResumeActiveDOMObjectsAndAnimations()
146
147 #if USE(TILED_BACKING_STORE)
148     SetFixedVisibleContentRect(WebCore::IntRect rect)
149     SetResizesToContentsUsingLayoutSize(WebCore::IntSize size)
150     SetViewportSize(WebCore::IntSize size)
151 #endif
152
153     Close()
154     TryClose()
155
156     ValidateCommand(WTF::String name, uint64_t callbackID)
157     ExecuteEditCommand(WTF::String name)
158 #if OS(TIZEN)
159     ExecuteEditCommandWithArgument(WTF::String name, WTF::String argument)
160 #endif
161
162     DidRemoveEditCommand(uint64_t commandID)
163     ReapplyEditCommand(uint64_t commandID)
164     UnapplyEditCommand(uint64_t commandID)
165
166     SetPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor)
167     SetPageZoomFactor(double zoomFactor)
168     SetTextZoomFactor(double zoomFactor)
169     WindowScreenDidChange(uint64_t displayID)
170
171     ScalePage(double scale, WebCore::IntPoint origin)
172
173     SetUseFixedLayout(bool fixed)
174     SetFixedLayoutSize(WebCore::IntSize size)
175
176     SetPaginationMode(uint32_t mode);
177     SetPaginationBehavesLikeColumns(bool behavesLikeColumns);
178     SetPageLength(double pageLength);
179     SetGapBetweenPages(double gap);
180
181     # Find.
182     FindString(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
183     HideFindUI()
184     CountStringMatches(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
185
186     # Drag and drop.
187 #if PLATFORM(WIN) && ENABLE(DRAG_SUPPORT)
188     PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, HashMap<UINT,Vector<String>> dataMap, uint32_t flags)
189 #endif
190 #if (PLATFORM(QT) || PLATFORM(GTK) || ENABLE(TIZEN_DRAG_SUPPORT)) && ENABLE(DRAG_SUPPORT)
191     PerformDragControllerAction(uint64_t action, WebCore::DragData dragData)
192 #endif
193 #if !PLATFORM(WIN) && !PLATFORM(QT) && !PLATFORM(GTK) && !ENABLE(TIZEN_DRAG_SUPPORT) && ENABLE(DRAG_SUPPORT)
194     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)
195 #endif
196 #if ENABLE(DRAG_SUPPORT)
197     DragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation)
198 #endif
199
200     # Popup menu.
201     DidChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
202     SetTextForActivePopupMenu(int32_t index);
203 #if PLATFORM(GTK)    
204     FailedToShowPopupMenu();
205 #endif
206 #if PLATFORM(QT)
207     HidePopupMenu();
208     SelectedIndex(int32_t newIndex);
209 #endif
210     
211 #if ENABLE(CONTEXT_MENUS)
212     # Context menu.
213 #if ENABLE(CONTEXT_MENUS)
214     DidSelectItemFromActiveContextMenu(WebKit::WebContextMenuItemData menuItem);
215 #endif
216
217     # Open panel.
218     DidChooseFilesForOpenPanel(Vector<WTF::String> fileURLs)
219     DidCancelForOpenPanel()
220 #if ENABLE(WEB_PROCESS_SANDBOX)
221     ExtendSandboxForFileFromOpenPanel(WebKit::SandboxExtension::Handle sandboxExtensionHandle)
222 #endif
223
224     # Spelling and grammar.
225     AdvanceToNextMisspelling(bool startBeforeSelection)
226     ChangeSpellingToWord(WTF::String word)
227 #if USE(APPKIT)
228     UppercaseWord();
229     LowercaseWord();
230     CapitalizeWord();
231
232     SetSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled);
233 #endif
234
235 #if ENABLE(GEOLOCATION)
236     # Geolocation
237     DidReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed)
238 #endif
239
240     # Notification
241     DidReceiveNotificationPermissionDecision(uint64_t notificationID, bool allowed)
242
243 #if ENABLE(TIZEN_MEDIA_STREAM)
244     # UserMedia messages
245     DidReceiveUserMediaPermissionDecision(uint64_t userMediaID, bool allowed)
246 #endif
247
248     SetWindowResizerSize(WebCore::IntSize intersectsView)
249
250     # Printing.
251     BeginPrinting(uint64_t frameID, WebKit::PrintInfo printInfo)
252     EndPrinting();
253     ComputePagesForPrinting(uint64_t frameID, WebKit::PrintInfo printInfo, uint64_t callbackID)
254 #if PLATFORM(MAC) || PLATFORM(WIN)
255     DrawRectToPDF(uint64_t frameID, WebKit::PrintInfo printInfo, WebCore::IntRect rect, uint64_t callbackID)
256     DrawPagesToPDF(uint64_t frameID, WebKit::PrintInfo printInfo, uint32_t first, uint32_t count, uint64_t callbackID)
257 #endif
258 #if PLATFORM(GTK)
259     DrawPagesForPrinting(uint64_t frameID, WebKit::PrintInfo printInfo, uint64_t callbackID)
260 #endif
261
262 #if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
263     GetWebAppCapable(uint64_t callbackID)
264     GetWebAppIconURL(uint64_t callbackID)
265 #endif
266
267     # Media
268     SetMediaVolume(float volume)
269
270     SetMemoryCacheMessagesEnabled(bool memoryCacheMessagesEnabled)
271
272     // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
273     // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
274     Dummy() -> (bool dummyReturn)
275
276     SetCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel)
277     SetCanRunModal(bool canRunModal)
278
279     # Web Intents
280 #if ENABLE(WEB_INTENTS)
281     DeliverIntentToFrame(uint64_t frameID, WebKit::IntentData intentData);
282 #endif
283
284 #if PLATFORM(EFL)
285     SetThemePath(WTF::String themePath)
286 #endif
287
288 #if PLATFORM(QT)
289     SetComposition(WTF::String text, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd)
290     ConfirmComposition(WTF::String text, int64_t selectionStart, int64_t selectionLength)
291     CancelComposition()
292 #endif
293
294 #if PLATFORM(MAC)
295     # Complex text input support for plug-ins.
296     SendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, String textInput)
297
298     SetWindowIsVisible(bool windowIsVisible)
299     WindowAndViewFramesChanged(WebCore::IntRect windowFrameInScreenCoordinates, WebCore::IntRect viewFrameInWindowCoordinates, WebCore::IntPoint accessibilityViewCoordinates)
300     RegisterUIProcessAccessibilityTokens(CoreIPC::DataReference elemenToken, CoreIPC::DataReference windowToken)
301     GetStringSelectionForPasteboard() -> (WTF::String stringValue)
302     GetDataSelectionForPasteboard(WTF::String pasteboardType) -> (WebKit::SharedMemory::Handle handle, uint64_t size)
303     ReadSelectionFromPasteboard(WTF::String pasteboardName) -> (bool result)
304
305     # Text input.
306     SetComposition(WTF::String text, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) -> (WebKit::EditorState newState)
307     ConfirmComposition() -> (WebKit::EditorState newState)
308     CancelComposition() -> (WebKit::EditorState newState)
309     InsertText(WTF::String text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) -> (bool handled, WebKit::EditorState newState)
310     GetMarkedRange() -> (uint64_t location, uint64_t length)
311     GetSelectedRange() -> (uint64_t location, uint64_t length)
312     GetAttributedSubstringFromRange(uint64_t location, uint64_t length) -> (WebKit::AttributedString result)
313     CharacterIndexForPoint(WebCore::IntPoint point) -> (uint64_t result)
314     FirstRectForCharacterRange(uint64_t location, uint64_t length) -> (WebCore::IntRect resultRect)
315     ExecuteKeypressCommands(Vector<WebCore::KeypressCommand> savedCommands) -> (bool handled, WebKit::EditorState newState)
316     ShouldDelayWindowOrderingEvent(WebKit::WebMouseEvent event) -> (bool result)
317     AcceptsFirstMouse(int eventNumber, WebKit::WebMouseEvent event) -> (bool result)
318     InsertDictatedText(WTF::String text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, WTF::Vector<WebCore::DictationAlternative> dictationAlternatives) -> (bool handled, WebKit::EditorState newState)
319 #endif
320 #if PLATFORM(WIN)
321     // FIXME: Unify with Mac counterparts.
322     ConfirmComposition(WTF::String compositionString)
323     SetComposition(WTF::String compositionString, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t cursorPosition)
324     FirstRectForCharacterInSelectedRange(uint64_t characterPosition) -> (WebCore::IntRect resultRect)
325     GetSelectedText() -> (WTF::String text)
326
327     GestureWillBegin(WebCore::IntPoint point) -> (bool canBeginPanning)
328     GestureDidScroll(WebCore::IntSize size)
329     GestureDidEnd()
330 #endif
331 #if PLATFORM(EFL) && OS(TIZEN)
332     ConfirmComposition(WTF::String compositionString)
333     SetComposition(WTF::String compositionString, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t cursorPosition)
334 #if ENABLE(TIZEN_TEXT_CARET_HANDLING_WK2)
335     SetCaretPosition(WebCore::IntPoint pos)
336     GetCaretPosition() -> (WebCore::IntRect rect)
337 #endif
338 #if ENABLE(TIZEN_ISF_PORT)
339     GetCursorOffsetPosition() -> (int offset)
340     GetContentOfPosition() -> (String offset)
341     DeleteSurroundingPosition() -> (bool result);
342     GetSelectionRect(bool isOnlyEditable) -> (WebCore::IntRect rect)
343 #endif
344 #endif
345 #if PLATFORM(QT) || OS(TIZEN)
346     FindZoomableAreaForPoint(WebCore::IntPoint point, WebCore::IntSize area)
347 #endif
348
349 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
350     HandleAlternativeTextUIResult(String result)
351 #endif
352
353 #if ENABLE(PAGE_VISIBILITY_API)
354     SetVisibilityState(int visibilityState, bool isInitialState);
355 #endif
356
357 #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
358     SetFocusedInputElementValue(WTF::String inputValue)
359     GetFocusedInputElementValue() -> (String inputValue)
360 #endif
361
362 #if ENABLE(TIZEN_DATALIST_ELEMENT)
363     GetFocusedInputElementDataList() -> (Vector<WTF::String> options)
364 #endif
365
366 #if ENABLE(TIZEN_RECORDING_SURFACE_SET)
367     RecordingSurfaceSetEnableSet(bool enable)
368 #endif
369
370 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
371     SelectClosestWord(WebCore::IntPoint point, bool isStartedTextSelectionFromOutside) -> (bool result)
372     SetLeftSelection(WebCore::IntPoint point) -> (bool result)
373     SetRightSelection(WebCore::IntPoint point) -> (bool result)
374     GetSelectionHandlers() -> (WebCore::IntRect leftRect, WebCore::IntRect rightRect)
375     GetSelectionText() -> (String result)
376     SelectionRangeClear() -> (bool result)
377 #endif
378 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_TEXT_SELECTION_MODE)
379     SelectLink(WebCore::IntPoint positionForSelection) -> (bool result)
380 #endif
381
382 #if ENABLE(TIZEN_CLIPBOARD) || ENABLE(TIZEN_PASTEBOARD)
383     SetClipboardDataForPaste(WTF::String data, WTF::String type)
384 #endif
385 #if ENABLE(TIZEN_PLUGIN_SUSPEND_RESUME)
386     SuspendPlugin()
387     ResumePlugin()
388 #endif
389 #if ENABLE(TIZEN_WEBKIT2_REMOTE_WEB_INSPECTOR)
390     StartInspectorServer(uint32_t port) -> (uint32_t assignedPort)
391     StopInspectorServer() -> (bool result)
392 #endif
393
394 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
395     ScrollOverflow(WebCore::FloatPoint point) -> (bool scrolled)
396     SetPressedNodeAtPoint(WebCore::IntPoint point, bool checkOverflowLayer) -> (bool pressed, uint32_t id)
397 #endif
398
399 #if ENABLE(TIZEN_CUSTOM_HEADERS)
400     AddCustomHeader(WTF::String name, WTF::String value)
401     RemoveCustomHeader(WTF::String name)
402     ClearCustomHeaders()
403 #endif
404 #if ENABLE(TIZEN_MOBILE_WEB_PRINT)
405     CreatePagesToPDF(WebCore::IntSize surfaceSize, WebCore::IntSize contentsSize, WTF::String fileName)
406 #endif
407
408 #if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
409     GetTextStyleStateForSelection()
410 #endif
411
412 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
413     WidgetMapped(int64_t id)
414 #endif
415
416 #if ENABLE(TIZEN_NATIVE_MEMORY_SNAPSHOT)
417     DumpMemorySnapshot()
418 #endif
419 #if ENABLE(TIZEN_MULTIPLE_SELECT)
420     DidChangeSelectedIndexForActivePopupMenuMultiple(Vector<int32_t> newIndex);
421 #endif
422
423 }