Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1414)

Unified Diff: third_party/WebKit/public/web/WebLocalFrame.h

Issue 1959183002: Multi-Process Find-in-Page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disabled tests on Android Release because of crbug.com/615291. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/public/web/WebFrameClient.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/web/WebLocalFrame.h
diff --git a/third_party/WebKit/public/web/WebLocalFrame.h b/third_party/WebKit/public/web/WebLocalFrame.h
index aa939bd2b823939429c0fd745fe7953c85cde932..2dac83d7074bcb0226a682b3282eefc7e058e40c 100644
--- a/third_party/WebKit/public/web/WebLocalFrame.h
+++ b/third_party/WebKit/public/web/WebLocalFrame.h
@@ -223,6 +223,18 @@ public:
// Find-in-page -----------------------------------------------------------
+ // Specifies the action to be taken at the end of a find-in-page session.
+ enum StopFindAction {
+ // No selection will be left.
+ StopFindActionClearSelection,
+
+ // The active match will remain selected.
+ StopFindActionKeepSelection,
+
+ // The active match selection will be activated.
+ StopFindActionActivateSelection
+ };
+
// Searches a frame for a given string.
//
// If a match is found, this function will select it (scrolling down to
@@ -243,11 +255,9 @@ public:
// Notifies the frame that we are no longer interested in searching.
// This will abort any asynchronous scoping effort already under way
// (see the function scopeStringMatches for details) and erase all
- // tick-marks and highlighting from the previous search. If
- // clearSelection is true, it will also make sure the end state for the
- // find operation does not leave a selection. This can occur when the
- // user clears the search string but does not close the find box.
- virtual void stopFinding(bool clearSelection) = 0;
+ // tick-marks and highlighting from the previous search. It will also
+ // follow the specified StopFindAction.
+ virtual void stopFinding(StopFindAction) = 0;
// Counts how many times a particular string occurs within the frame.
// It also retrieves the location of the string and updates a vector in
@@ -290,24 +300,32 @@ public:
virtual WebFloatRect activeFindMatchRect() = 0;
// Swaps the contents of the provided vector with the bounding boxes of the
- // find-in-page match markers from all frames. The bounding boxes are returned
- // in find-in-page coordinates. This method should be called only on the main frame.
+ // find-in-page match markers from all frames. The bounding boxes are
+ // returned in find-in-page coordinates. This method should be called only
+ // on the main frame.
virtual void findMatchRects(WebVector<WebFloatRect>&) = 0;
- // Selects the find-in-page match in the appropriate frame closest to the
- // provided point in find-in-page coordinates. Returns the ordinal of such
- // match or -1 if none could be found. If not null, selectionRect is set to
- // the bounding box of the selected match in window coordinates.
- // This method should be called only on the main frame.
+ // Selects the find-in-page match closest to the provided point in
+ // find-in-page coordinates. Returns the ordinal of such match or -1 if none
+ // could be found. If not null, selectionRect is set to the bounding box of
+ // the selected match in window coordinates. This method should be called
+ // only on the main frame.
virtual int selectNearestFindMatch(const WebFloatPoint&,
WebRect* selectionRect)
= 0;
+ // Returns the distance (squared) to the closest find-in-page match from the
+ // provided point, in find-in-page coordinates.
+ virtual float distanceToNearestFindMatch(const WebFloatPoint&) = 0;
+
// Set the tickmarks for the frame. This will override the default tickmarks
// generated by find results. If this is called with an empty array, the
// default behavior will be restored.
virtual void setTickmarks(const WebVector<WebRect>&) = 0;
+ // Clears the active find match in the frame, if one exists.
+ virtual void clearActiveFindMatch() = 0;
+
// Context menu -----------------------------------------------------------
// Returns the node that the context menu opened over.
« no previous file with comments | « third_party/WebKit/public/web/WebFrameClient.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698