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 | |
115 // notification can fire multiple times per ScopeStringMatches() call. | |
116 OnReportFindInFrameMatchCount(int32 request_id, int32 count, | |
sky
2015/10/05 15:55:08
Same comment about names from web_view.mojom here.
| |
117 bool final_update); | |
118 | |
119 // Reports which match is currently highlighted. | |
120 OnReportFindInPageSelection(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 synchronously. If a match is found, it will be | |
sky
2015/10/05 15:55:08
The use of synchronous is confusing here given eve
| |
182 // selected. Find() will only return one match, and will do so synchronously. | |
183 // Returns true if the search string was found, false otherwise. | |
184 Find(int32 request_id, string search_text) => (bool found); | |
185 | |
186 // Stop finding the single find result on the page. If |clear_selection| is | |
187 // set, it will also make the found text not selected. | |
sky
2015/10/05 15:55:08
'make the found text not selected' -> clear the se
| |
188 StopFinding(bool clear_selection); | |
189 | |
190 // Match every instance of a string in a document asynchronously, highlighting | |
191 // them and putting a tick mark in the scroll bar. This differs from Find() as | |
192 // Find() is about finding the one selected instance of the text. | |
193 // ScopeStringMatches() is about highlighting all the instances of the text. | |
194 // | |
195 // ScopeStringMatches() will asynchronously call | |
196 // OnReportFindInFrameMatchCount() multiple times to report its progress. | |
197 ScopeStringMatches(int32 request_id, string search_test, bool reset); | |
sky
2015/10/05 15:55:08
I would prefer you go with a name that doesn't ass
| |
198 | |
199 // Removes the tick marks and highlighting done by ScopeStringMatches() in | |
200 // this frame. | |
201 CancelPendingScopingEffort(); | |
169 }; | 202 }; |
OLD | NEW |