OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module web_view.mojom; | 5 module web_view.mojom; |
6 | 6 |
7 import "network/public/interfaces/url_loader.mojom"; | 7 import "network/public/interfaces/url_loader.mojom"; |
8 | 8 |
9 // This files defines the interfaces and structures used for frames. | 9 // This files defines the interfaces and structures used for frames. |
10 // | 10 // |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 RequestNavigate(NavigationTargetType target_type, | 103 RequestNavigate(NavigationTargetType target_type, |
104 uint32 target_frame_id, | 104 uint32 target_frame_id, |
105 mojo.URLRequest request); | 105 mojo.URLRequest request); |
106 | 106 |
107 // The frame navigated locally, for example, pushState() navigations in an | 107 // The frame navigated locally, for example, pushState() navigations in an |
108 // HTML application. | 108 // HTML application. |
109 DidNavigateLocally(string url); | 109 DidNavigateLocally(string url); |
110 | 110 |
111 // Dispatches a load event to the parent of the frame. | 111 // Dispatches a load event to the parent of the frame. |
112 DispatchLoadEventToParent(); | 112 DispatchLoadEventToParent(); |
113 | |
114 // Reports the number of matches for a given find. This is an asynchronous | |
sky
2015/10/05 23:38:27
nit: update grammar 'this is an asynchronous notif
| |
115 // notification can fire multiple times per HighlightFindResults() call. | |
116 OnFindInFrameCountUpdated(int32 request_id, int32 count, | |
117 bool final_update); | |
118 | |
119 // Reports which match is currently highlighted. | |
120 OnFindInPageSelectionUpdated(int32 request_id, int32 active_match_ordinal); | |
113 }; | 121 }; |
114 | 122 |
115 enum ViewConnectType { | 123 enum ViewConnectType { |
116 // Indicates the app is already a ViewTreeClient and the existing view should | 124 // Indicates the app is already a ViewTreeClient and the existing view should |
117 // be used. In this case the app is not asked for a new ViewTreeClient. | 125 // be used. In this case the app is not asked for a new ViewTreeClient. |
118 USE_EXISTING, | 126 USE_EXISTING, |
119 | 127 |
120 // Indicates a new ViewTreeClient is obtained and the View provided to | 128 // Indicates a new ViewTreeClient is obtained and the View provided to |
121 // OnEmbed() should be used. | 129 // OnEmbed() should be used. |
122 USE_NEW | 130 USE_NEW |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
159 // Additionally it overlaps with the client properties. | 167 // Additionally it overlaps with the client properties. |
160 OnWillNavigate(string origin) => (); | 168 OnWillNavigate(string origin) => (); |
161 | 169 |
162 // Called to notify that |frame_id|'s loading state has changed. This is only | 170 // Called to notify that |frame_id|'s loading state has changed. This is only |
163 // called on the FrameClient rendering the parent of |frame_id|. | 171 // called on the FrameClient rendering the parent of |frame_id|. |
164 OnFrameLoadingStateChanged(uint32 frame_id, bool loading); | 172 OnFrameLoadingStateChanged(uint32 frame_id, bool loading); |
165 | 173 |
166 // Called to dispatch a load event of |frame_id| in its parent. This is only | 174 // Called to dispatch a load event of |frame_id| in its parent. This is only |
167 // called on the FrameClient rendering the parent of |frame_id|. | 175 // called on the FrameClient rendering the parent of |frame_id|. |
168 OnDispatchFrameLoadEvent(uint32 frame_id); | 176 OnDispatchFrameLoadEvent(uint32 frame_id); |
177 | |
178 // TODO(erg): Several of these take a WebFindOptions struct; we probably need | |
179 // to build a Frame version of that struct. | |
180 | |
181 // Searches for a given string. If a match is found, it will be | |
182 // selected. Find() will only return true if it found a match, and will return | |
183 // the result in the future through OnFindInPageSelectionUpdated(). | |
184 // | |
185 // |request_id| should be a monotonically increasing number which should only | |
186 // be reused between Find() and the HighlightFindResults() calls that are | |
187 // searching for the same string. |search_text| may be empty. | |
188 Find(int32 request_id, string search_text) => (bool found); | |
sky
2015/10/05 23:38:27
Be aware that there are race conditions with using
| |
189 | |
190 // Stop finding the single find result on the page. If |clear_selection| is | |
191 // set, it will also clear the selected find text. | |
192 StopFinding(bool clear_selection); | |
193 | |
194 // Match every instance of a string in a document asynchronously, highlighting | |
195 // them and putting a tick mark in the scroll bar. This differs from Find() as | |
196 // Find() is about finding the one selected instance of the text. | |
197 // HighlightFindResults() is about highlighting all the instances of the text. | |
198 // | |
199 // HighlightFindResults() will asynchronously call | |
200 // OnFindInFrameCountUpdated() multiple times to report its progress. | |
201 HighlightFindResults(int32 request_id, string search_test, bool reset); | |
202 | |
203 // Removes the tick marks and highlighting done by HighlightFindResults() in | |
204 // this frame. | |
205 StopHighlightingFindResults(); | |
169 }; | 206 }; |
OLD | NEW |