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