OLD | NEW |
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 // Sets composition text from input method, and returns true if the | 154 // Sets composition text from input method, and returns true if the |
155 // composition is set successfully. | 155 // composition is set successfully. |
156 virtual bool setComposition(const WebString& text, const WebVector<WebCompos
itionUnderline>& underlines, int selectionStart, int selectionEnd) { return fals
e; } | 156 virtual bool setComposition(const WebString& text, const WebVector<WebCompos
itionUnderline>& underlines, int selectionStart, int selectionEnd) { return fals
e; } |
157 // Confirms an ongoing composition and returns true if there is an ongoing | 157 // Confirms an ongoing composition and returns true if there is an ongoing |
158 // composition or the text is inserted. | 158 // composition or the text is inserted. |
159 virtual bool confirmComposition(const WebString& text, WebWidget::ConfirmCom
positionBehavior selectionBehavior) { return false; } | 159 virtual bool confirmComposition(const WebString& text, WebWidget::ConfirmCom
positionBehavior selectionBehavior) { return false; } |
160 // Deletes the current selection plus the specified number of characters | 160 // Deletes the current selection plus the specified number of characters |
161 // before and after the selection or caret. | 161 // before and after the selection or caret. |
162 virtual void extendSelectionAndDelete(int before, int after) { } | 162 virtual void extendSelectionAndDelete(int before, int after) { } |
| 163 // Deletes text before and after the current cursor position, excluding the
selection. |
| 164 virtual void deleteSurroundingText(int before, int after) {} |
163 // If the given position is over a link, returns the absolute url. | 165 // If the given position is over a link, returns the absolute url. |
164 // Otherwise an empty url is returned. | 166 // Otherwise an empty url is returned. |
165 virtual WebURL linkAtPosition(const WebPoint& position) const { return WebUR
L(); } | 167 virtual WebURL linkAtPosition(const WebPoint& position) const { return WebUR
L(); } |
166 | 168 |
167 // Find interface. | 169 // Find interface. |
168 // Start a new search. The plugin should search for a little bit at a time
so that it | 170 // Start a new search. The plugin should search for a little bit at a time
so that it |
169 // doesn't block the thread in case of a large document. The results, along
with the | 171 // doesn't block the thread in case of a large document. The results, along
with the |
170 // find's identifier, should be sent asynchronously to WebFrameClient's repo
rtFindInPage* methods. | 172 // find's identifier, should be sent asynchronously to WebFrameClient's repo
rtFindInPage* methods. |
171 // Returns true if the search started, or false if the plugin doesn't suppor
t search. | 173 // Returns true if the search started, or false if the plugin doesn't suppor
t search. |
172 virtual bool startFind(const WebString& searchText, bool caseSensitive, int
identifier) { return false; } | 174 virtual bool startFind(const WebString& searchText, bool caseSensitive, int
identifier) { return false; } |
(...skipping 14 matching lines...) Expand all Loading... |
187 | 189 |
188 virtual bool isPlaceholder() { return true; } | 190 virtual bool isPlaceholder() { return true; } |
189 | 191 |
190 protected: | 192 protected: |
191 ~WebPlugin() { } | 193 ~WebPlugin() { } |
192 }; | 194 }; |
193 | 195 |
194 } // namespace blink | 196 } // namespace blink |
195 | 197 |
196 #endif | 198 #endif |
OLD | NEW |