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

Unified Diff: public/web/WebFrame.h

Issue 294073005: Extend WebSurroundingText to accept a WebRange. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase and use int Created 6 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 | « Source/web/WebSurroundingText.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebFrame.h
diff --git a/public/web/WebFrame.h b/public/web/WebFrame.h
index d630f801834c1614177372f90fccbcb1fbaf5bcd..681ef44189d1333a0ad2701eef21d1378fac6ecf 100644
--- a/public/web/WebFrame.h
+++ b/public/web/WebFrame.h
@@ -474,6 +474,15 @@ public:
virtual void setCaretVisible(bool) = 0;
+ // Returns the text surrounding the selection with a maximum length of
+ // |maxLength|. |startOffset| and |endOffset| will be populated with
+ // respectively the start and end offset of the selection relatively to the
+ // returned text. If the selection is a caret, |startOffset| will be equal
+ // to |endOffset|.
+ // Note: the surrounding text length is |maxLength| which means that the
+ // returned text will be at max selectionLength + maxLength.
+ virtual WebString textSurroundingSelection(int maxLength, int* startOffset, int* endOffset) const = 0;
Yuta Kitamura 2014/06/06 02:20:08 1. We usually use non-const references for output
+
// Printing ------------------------------------------------------------
// Reformats the WebFrame for printing. WebPrintParams specifies the printable
« no previous file with comments | « Source/web/WebSurroundingText.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698