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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « Source/web/WebSurroundingText.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 virtual void moveCaretSelection(const WebPoint&) = 0; 467 virtual void moveCaretSelection(const WebPoint&) = 0;
468 468
469 virtual bool setEditableSelectionOffsets(int start, int end) = 0; 469 virtual bool setEditableSelectionOffsets(int start, int end) = 0;
470 virtual bool setCompositionFromExistingText(int compositionStart, int compos itionEnd, const WebVector<WebCompositionUnderline>& underlines) = 0; 470 virtual bool setCompositionFromExistingText(int compositionStart, int compos itionEnd, const WebVector<WebCompositionUnderline>& underlines) = 0;
471 virtual void extendSelectionAndDelete(int before, int after) = 0; 471 virtual void extendSelectionAndDelete(int before, int after) = 0;
472 472
473 virtual void addStyleSheetByURL(const WebString& url) = 0; 473 virtual void addStyleSheetByURL(const WebString& url) = 0;
474 474
475 virtual void setCaretVisible(bool) = 0; 475 virtual void setCaretVisible(bool) = 0;
476 476
477 // Returns the text surrounding the selection with a maximum length of
478 // |maxLength|. |startOffset| and |endOffset| will be populated with
479 // respectively the start and end offset of the selection relatively to the
480 // returned text. If the selection is a caret, |startOffset| will be equal
481 // to |endOffset|.
482 // Note: the surrounding text length is |maxLength| which means that the
483 // returned text will be at max selectionLength + maxLength.
484 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
485
477 // Printing ------------------------------------------------------------ 486 // Printing ------------------------------------------------------------
478 487
479 // Reformats the WebFrame for printing. WebPrintParams specifies the printab le 488 // Reformats the WebFrame for printing. WebPrintParams specifies the printab le
480 // content size, paper size, printable area size, printer DPI and print 489 // content size, paper size, printable area size, printer DPI and print
481 // scaling option. If constrainToNode node is specified, then only the given node 490 // scaling option. If constrainToNode node is specified, then only the given node
482 // is printed (for now only plugins are supported), instead of the entire fr ame. 491 // is printed (for now only plugins are supported), instead of the entire fr ame.
483 // Returns the number of pages that can be printed at the given 492 // Returns the number of pages that can be printed at the given
484 // page size. 493 // page size.
485 virtual int printBegin(const WebPrintParams&, const WebNode& constrainToNode = WebNode()) = 0; 494 virtual int printBegin(const WebPrintParams&, const WebNode& constrainToNode = WebNode()) = 0;
486 495
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; 701 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker;
693 }; 702 };
694 703
695 #if BLINK_IMPLEMENTATION 704 #if BLINK_IMPLEMENTATION
696 WebCore::Frame* toWebCoreFrame(WebFrame*); 705 WebCore::Frame* toWebCoreFrame(WebFrame*);
697 #endif 706 #endif
698 707
699 } // namespace blink 708 } // namespace blink
700 709
701 #endif 710 #endif
OLDNEW
« 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