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

Side by Side Diff: third_party/WebKit/public/web/WebPlugin.h

Issue 1889053003: Fix InputConnection.deleteSurroundingText() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add some comment Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 // Sets composition text from input method, and returns true if the 155 // Sets composition text from input method, and returns true if the
156 // composition is set successfully. 156 // composition is set successfully.
157 virtual bool setComposition(const WebString& text, const WebVector<WebCompos itionUnderline>& underlines, int selectionStart, int selectionEnd) { return fals e; } 157 virtual bool setComposition(const WebString& text, const WebVector<WebCompos itionUnderline>& underlines, int selectionStart, int selectionEnd) { return fals e; }
158 // Confirms an ongoing composition and returns true if there is an ongoing 158 // Confirms an ongoing composition and returns true if there is an ongoing
159 // composition or the text is inserted. 159 // composition or the text is inserted.
160 virtual bool confirmComposition(const WebString& text, WebWidget::ConfirmCom positionBehavior selectionBehavior) { return false; } 160 virtual bool confirmComposition(const WebString& text, WebWidget::ConfirmCom positionBehavior selectionBehavior) { return false; }
161 // Deletes the current selection plus the specified number of characters 161 // Deletes the current selection plus the specified number of characters
162 // before and after the selection or caret. 162 // before and after the selection or caret.
163 virtual void extendSelectionAndDelete(int before, int after) { } 163 virtual void extendSelectionAndDelete(int before, int after) { }
164 // Deletes text before and after the current cursor position, excluding the selection.
165 virtual void deleteSurroundingText(int before, int after) {}
164 // If the given position is over a link, returns the absolute url. 166 // If the given position is over a link, returns the absolute url.
165 // Otherwise an empty url is returned. 167 // Otherwise an empty url is returned.
166 virtual WebURL linkAtPosition(const WebPoint& position) const { return WebUR L(); } 168 virtual WebURL linkAtPosition(const WebPoint& position) const { return WebUR L(); }
167 169
168 // Find interface. 170 // Find interface.
169 // Start a new search. The plugin should search for a little bit at a time so that it 171 // Start a new search. The plugin should search for a little bit at a time so that it
170 // doesn't block the thread in case of a large document. The results, along with the 172 // doesn't block the thread in case of a large document. The results, along with the
171 // find's identifier, should be sent asynchronously to WebFrameClient's repo rtFindInPage* methods. 173 // find's identifier, should be sent asynchronously to WebFrameClient's repo rtFindInPage* methods.
172 // Returns true if the search started, or false if the plugin doesn't suppor t search. 174 // Returns true if the search started, or false if the plugin doesn't suppor t search.
173 virtual bool startFind(const WebString& searchText, bool caseSensitive, int identifier) { return false; } 175 virtual bool startFind(const WebString& searchText, bool caseSensitive, int identifier) { return false; }
(...skipping 14 matching lines...) Expand all
188 190
189 virtual bool isPlaceholder() { return true; } 191 virtual bool isPlaceholder() { return true; }
190 192
191 protected: 193 protected:
192 ~WebPlugin() { } 194 ~WebPlugin() { }
193 }; 195 };
194 196
195 } // namespace blink 197 } // namespace blink
196 198
197 #endif 199 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698