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