Reviewed by Anders Carlsson and Darin Adler.
[WebKit-https.git] / Source / WebKit2 / WebProcess / WebPage / WebPage.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 -> 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     KeyEvent(WebKit::WebKeyboardEvent event)
33     MouseEvent(WebKit::WebMouseEvent event)
34     WheelEvent(WebKit::WebWheelEvent event)
35 #if ENABLE(TOUCH_EVENTS)
36     TouchEvent(WebKit::WebTouchEvent event)
37 #endif
38
39     GoBack(uint64_t backForwardItemID)
40     GoForward(uint64_t backForwardItemID)
41     GoToBackForwardItem(uint64_t backForwardItemID)
42     LoadHTMLString(WTF::String htmlString, WTF::String baseURL)
43     LoadAlternateHTMLString(WTF::String htmlString, WTF::String baseURL, WTF::String unreachableURL); 
44     LoadPlainTextString(WTF::String string)
45     LoadURL(WTF::String url, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
46     LoadURLRequest(WebCore::ResourceRequest request, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
47     Reload(bool reloadFromOrigin)
48     StopLoading()
49     
50     RestoreSessionAndNavigateToCurrentItem(WebKit::SessionState state)
51
52     DidRemoveBackForwardItem(uint64_t backForwardItemID)
53
54     DidReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID)
55
56     # Callbacks.
57     GetContentsAsString(uint64_t callbackID)
58     GetMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID)
59     GetRenderTreeExternalRepresentation(uint64_t callbackID)
60     GetSelectionOrContentsAsString(uint64_t callbackID)
61     GetSourceForFrame(uint64_t frameID, uint64_t callbackID)
62     GetWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID)
63     RunJavaScriptInMainFrame(WTF::String script, uint64_t callbackID)
64
65     PreferencesDidChange(WebKit::WebPreferencesStore store)
66
67     SetUserAgent(WTF::String userAgent)
68     SetCustomTextEncodingName(WTF::String encodingName)
69
70 #if ENABLE(TILED_BACKING_STORE)
71     SetActualVisibleContentRect(WebCore::IntRect rect)
72     SetResizesToContentsUsingLayoutSize(WebCore::IntSize size)
73 #endif
74
75     Close()
76     TryClose()
77
78     ValidateMenuItem(WTF::String name)
79     ExecuteEditCommand(WTF::String name)
80
81     DidRemoveEditCommand(uint64_t commandID)
82     ReapplyEditCommand(uint64_t commandID)
83     UnapplyEditCommand(uint64_t commandID)
84
85     SetPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor)
86     SetPageZoomFactor(double zoomFactor)
87     SetTextZoomFactor(double zoomFactor)
88
89     ScaleWebView(double scale, WebCore::IntPoint origin)
90
91     SetUseFixedLayout(bool fixed)
92     SetFixedLayoutSize(WebCore::IntSize size)
93
94     # Find.
95     FindString(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
96     HideFindUI()
97     CountStringMatches(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
98
99     # Drag and drop.
100     PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, WTF::String dragStorageName, uint32_t flags)
101
102     # Popup menu.
103     DidChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
104     SetTextForActivePopupMenu(int32_t index);
105     
106     # Context menu.
107     DidSelectItemFromActiveContextMenu(WebKit::WebContextMenuItemData menuItem);
108
109     # Open panel.
110     DidChooseFilesForOpenPanel(Vector<WTF::String> fileURLs)
111     DidCancelForOpenPanel()
112
113     # Spelling and grammar.
114     AdvanceToNextMisspelling(bool startBeforeSelection)
115     ChangeSpellingToWord(WTF::String word)
116     UnmarkAllMisspellings()
117     UnmarkAllBadGrammar()
118 #if PLATFORM(MAC)
119     UppercaseWord();
120     LowercaseWord();
121     CapitalizeWord();
122
123     SetSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled);
124 #endif
125
126     # Geolocation
127     DidReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed)
128
129     SetWindowResizerSize(WebCore::IntSize intersectsView)
130
131     # Printing.
132     BeginPrinting(uint64_t frameID, WebKit::PrintInfo printInfo);
133     EndPrinting();
134     ComputePagesForPrinting(uint64_t frameID, WebKit::PrintInfo printInfo) -> (Vector<WebCore::IntRect> pageRects, double totalScaleFactorForPrinting)
135 #if PLATFORM(MAC)
136     DrawRectToPDF(uint64_t frameID, WebCore::IntRect rect) -> (Vector<uint8_t> pdfData)
137 #endif
138
139     // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
140     // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
141     Dummy() -> (bool dummyReturn)
142
143 #if PLATFORM(MAC)
144     # Complex text input support for plug-ins.
145     SendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, String textInput)
146
147     SetWindowIsVisible(bool windowIsVisible)
148     WindowAndViewFramesChanged(WebCore::IntRect windowFrameInScreenCoordinates, WebCore::IntRect viewFrameInWindowCoordinates, WebCore::IntPoint accessibilityViewCoordinates)
149     GetMarkedRange() -> (uint64_t location, uint64_t length)
150     CharacterIndexForPoint(WebCore::IntPoint point) -> (uint64_t result)
151     FirstRectForCharacterRange(uint64_t location, uint64_t length) -> (WebCore::IntRect resultRect)
152     SendAccessibilityPresenterToken(CoreIPC::DataReference token)
153 #endif
154 #if PLATFORM(WIN)
155     ConfirmComposition(WTF::String compositionString)
156     SetComposition(WTF::String compositionString, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t cursorPosition)
157     FirstRectForCharacterInSelectedRange(uint64_t characterPosition) -> (WebCore::IntRect resultRect)
158     GetSelectedText() -> (WTF::String text)
159 #endif
160 #if PLATFORM(QT)
161     FindZoomableAreaForPoint(WebCore::IntPoint point)
162 #endif
163 }