Index: components/web_view/public/interfaces/frame.mojom |
diff --git a/components/web_view/public/interfaces/frame.mojom b/components/web_view/public/interfaces/frame.mojom |
index d1a8f807d534260783d2a4a4360947c4c1cd74ef..e2616fa8b4ede0de1ac66a3c987b3d14fb48501f 100644 |
--- a/components/web_view/public/interfaces/frame.mojom |
+++ b/components/web_view/public/interfaces/frame.mojom |
@@ -110,6 +110,14 @@ interface Frame { |
// Dispatches a load event to the parent of the frame. |
DispatchLoadEventToParent(); |
+ |
+ // Reports the number of matches for a given find. This is an asynchronous |
+ // notification can fire multiple times per ScopeStringMatches() call. |
+ OnReportFindInFrameMatchCount(int32 request_id, int32 count, |
sky
2015/10/05 15:55:08
Same comment about names from web_view.mojom here.
|
+ bool final_update); |
+ |
+ // Reports which match is currently highlighted. |
+ OnReportFindInPageSelection(int32 request_id, int32 active_match_ordinal); |
}; |
enum ViewConnectType { |
@@ -166,4 +174,29 @@ interface FrameClient { |
// Called to dispatch a load event of |frame_id| in its parent. This is only |
// called on the FrameClient rendering the parent of |frame_id|. |
OnDispatchFrameLoadEvent(uint32 frame_id); |
+ |
+ // TODO(erg): Several of these take a WebFindOptions struct; we probably need |
+ // to build a Frame version of that struct. |
+ |
+ // 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
|
+ // selected. Find() will only return one match, and will do so synchronously. |
+ // Returns true if the search string was found, false otherwise. |
+ Find(int32 request_id, string search_text) => (bool found); |
+ |
+ // Stop finding the single find result on the page. If |clear_selection| is |
+ // 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
|
+ StopFinding(bool clear_selection); |
+ |
+ // Match every instance of a string in a document asynchronously, highlighting |
+ // them and putting a tick mark in the scroll bar. This differs from Find() as |
+ // Find() is about finding the one selected instance of the text. |
+ // ScopeStringMatches() is about highlighting all the instances of the text. |
+ // |
+ // ScopeStringMatches() will asynchronously call |
+ // OnReportFindInFrameMatchCount() multiple times to report its progress. |
+ 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
|
+ |
+ // Removes the tick marks and highlighting done by ScopeStringMatches() in |
+ // this frame. |
+ CancelPendingScopingEffort(); |
}; |