WebKit2: Spelling and Grammar Checking: Make sure to remove the markings from the...
[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)
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     MouseEvent(WebKit::WebMouseEvent event)
37     WheelEvent(WebKit::WebWheelEvent event)
38 #if ENABLE(GESTURE_EVENTS)
39     GestureEvent(WebKit::WebGestureEvent event)
40 #endif
41 #if ENABLE(TOUCH_EVENTS)
42     TouchEvent(WebKit::WebTouchEvent event)
43 #endif
44
45     ScrollBy(uint32_t scrollDirection, uint32_t scrollGranularity)
46
47     GoBack(uint64_t backForwardItemID, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
48     GoForward(uint64_t backForwardItemID, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
49     GoToBackForwardItem(uint64_t backForwardItemID, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
50     LoadHTMLString(WTF::String htmlString, WTF::String baseURL)
51     LoadAlternateHTMLString(WTF::String htmlString, WTF::String baseURL, WTF::String unreachableURL); 
52     LoadPlainTextString(WTF::String string)
53     LoadURL(WTF::String url, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
54     LoadURLRequest(WebCore::ResourceRequest request, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
55     LinkClicked(WTF::String url, WebKit::WebMouseEvent event)
56     Reload(bool reloadFromOrigin)
57     StopLoading()
58
59     StopLoadingFrame(uint64_t frameID)
60     
61     RestoreSession(WebKit::SessionState state)
62     RestoreSessionAndNavigateToCurrentItem(WebKit::SessionState state, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
63
64     DidRemoveBackForwardItem(uint64_t backForwardItemID)
65
66     DidReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID)
67
68     # Callbacks.
69     GetContentsAsString(uint64_t callbackID)
70     GetMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID)
71     GetResourceDataFromFrame(uint64_t frameID, WTF::String resourceURL, uint64_t callbackID)
72     GetRenderTreeExternalRepresentation(uint64_t callbackID)
73     GetSelectionOrContentsAsString(uint64_t callbackID)
74     GetSourceForFrame(uint64_t frameID, uint64_t callbackID)
75     GetWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID)
76     RunJavaScriptInMainFrame(WTF::String script, uint64_t callbackID)
77     ForceRepaint(uint64_t callbackID)
78
79 #if PLATFORM(MAC)
80     # Dictionary support.
81     PerformDictionaryLookupAtLocation(WebCore::FloatPoint point)
82 #endif
83
84     PreferencesDidChange(WebKit::WebPreferencesStore store)
85
86     SetUserAgent(WTF::String userAgent)
87     SetCustomTextEncodingName(WTF::String encodingName)
88
89 #if ENABLE(TILED_BACKING_STORE)
90     SetActualVisibleContentRect(WebCore::IntRect rect)
91     SetResizesToContentsUsingLayoutSize(WebCore::IntSize size)
92 #endif
93
94     Close()
95     TryClose()
96
97     ValidateCommand(WTF::String name, uint64_t callbackID)
98     ExecuteEditCommand(WTF::String name)
99
100     DidRemoveEditCommand(uint64_t commandID)
101     ReapplyEditCommand(uint64_t commandID)
102     UnapplyEditCommand(uint64_t commandID)
103
104     SetPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor)
105     SetPageZoomFactor(double zoomFactor)
106     SetTextZoomFactor(double zoomFactor)
107
108     ScaleWebView(double scale, WebCore::IntPoint origin)
109
110     SetUseFixedLayout(bool fixed)
111     SetFixedLayoutSize(WebCore::IntSize size)
112
113     # Find.
114     FindString(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
115     HideFindUI()
116     CountStringMatches(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
117
118     # Drag and drop.
119 #if PLATFORM(WIN)
120     PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, HashMap<UINT,Vector<String>> dataMap, uint32_t flags)
121 #endif
122 #if !PLATFORM(WIN)
123     PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, WTF::String dragStorageName, uint32_t flags, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
124 #endif
125     DragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation)
126
127     # Popup menu.
128     DidChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
129     SetTextForActivePopupMenu(int32_t index);
130     
131     # Context menu.
132     DidSelectItemFromActiveContextMenu(WebKit::WebContextMenuItemData menuItem);
133
134     # Open panel.
135     DidChooseFilesForOpenPanel(Vector<WTF::String> fileURLs)
136     DidCancelForOpenPanel()
137 #if ENABLE(WEB_PROCESS_SANDBOX)
138     ExtendSandboxForFileFromOpenPanel(WebKit::SandboxExtension::Handle sandboxExtensionHandle)
139 #endif
140
141     # Spelling and grammar.
142     AdvanceToNextMisspelling(bool startBeforeSelection)
143     ChangeSpellingToWord(WTF::String word)
144 #if PLATFORM(MAC)
145     UppercaseWord();
146     LowercaseWord();
147     CapitalizeWord();
148
149     SetSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled);
150 #endif
151
152     # Geolocation
153     DidReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed)
154
155     SetWindowResizerSize(WebCore::IntSize intersectsView)
156
157     # Printing.
158     BeginPrinting(uint64_t frameID, WebKit::PrintInfo printInfo)
159     EndPrinting();
160     ComputePagesForPrinting(uint64_t frameID, WebKit::PrintInfo printInfo, uint64_t callbackID)
161 #if PLATFORM(MAC) || PLATFORM(WIN)
162     DrawRectToPDF(uint64_t frameID, WebCore::IntRect rect, uint64_t callbackID)
163     DrawPagesToPDF(uint64_t frameID, uint32_t first, uint32_t count, uint64_t callbackID)
164 #endif
165
166     SetMemoryCacheMessagesEnabled(bool memoryCacheMessagesEnabled)
167
168     // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
169     // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
170     Dummy() -> (bool dummyReturn)
171
172     SetCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel)
173     SetCanRunModal(bool canRunModal)
174
175 #if PLATFORM(MAC)
176     # Complex text input support for plug-ins.
177     SendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, String textInput)
178
179     SetWindowIsVisible(bool windowIsVisible)
180     WindowAndViewFramesChanged(WebCore::IntRect windowFrameInScreenCoordinates, WebCore::IntRect viewFrameInWindowCoordinates, WebCore::IntPoint accessibilityViewCoordinates)
181     RegisterUIProcessAccessibilityTokens(CoreIPC::DataReference elemenToken, CoreIPC::DataReference windowToken)
182     WriteSelectionToPasteboard(WTF::String pasteboardName, WTF::Vector<WTF::String> pasteboardTypes) -> (bool result)
183     ReadSelectionFromPasteboard(WTF::String pasteboardName) -> (bool result)
184
185     # Text input.
186     SetComposition(WTF::String text, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) -> (WebKit::TextInputState newState)
187     ConfirmComposition() -> (WebKit::TextInputState newState)
188     InsertText(WTF::String text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) -> (bool handled, WebKit::TextInputState newState)
189     GetMarkedRange() -> (uint64_t location, uint64_t length)
190     GetSelectedRange() -> (uint64_t location, uint64_t length)
191     GetAttributedSubstringFromRange(uint64_t location, uint64_t length) -> (WebKit::AttributedString result)
192     CharacterIndexForPoint(WebCore::IntPoint point) -> (uint64_t result)
193     FirstRectForCharacterRange(uint64_t location, uint64_t length) -> (WebCore::IntRect resultRect)
194     ExecuteKeypressCommands(Vector<WebCore::KeypressCommand> savedCommands) -> (bool handled, WebKit::TextInputState newState)
195
196 #endif
197 #if PLATFORM(WIN)
198     // FIXME: Unify with Mac counterparts.
199     ConfirmComposition(WTF::String compositionString)
200     SetComposition(WTF::String compositionString, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t cursorPosition)
201     FirstRectForCharacterInSelectedRange(uint64_t characterPosition) -> (WebCore::IntRect resultRect)
202     GetSelectedText() -> (WTF::String text)
203
204     GestureWillBegin(WebCore::IntPoint point) -> (bool canBeginPanning)
205     GestureDidScroll(WebCore::IntSize size)
206     GestureDidEnd()
207 #endif
208 #if PLATFORM(QT)
209     FindZoomableAreaForPoint(WebCore::IntPoint point)
210 #endif
211
212 #if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
213     HandleCorrectionPanelResult(String result)
214 #endif
215 }