OLD | NEW |
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // Called to inform the WebWidget that mouse capture was lost. | 137 // Called to inform the WebWidget that mouse capture was lost. |
138 virtual void mouseCaptureLost() {} | 138 virtual void mouseCaptureLost() {} |
139 | 139 |
140 // Called to inform the WebWidget that it has gained or lost keyboard focus. | 140 // Called to inform the WebWidget that it has gained or lost keyboard focus. |
141 virtual void setFocus(bool) {} | 141 virtual void setFocus(bool) {} |
142 | 142 |
143 // Fetches the character range of the current composition, also called the | 143 // Fetches the character range of the current composition, also called the |
144 // "marked range." | 144 // "marked range." |
145 virtual WebRange compositionRange() { return WebRange(); } | 145 virtual WebRange compositionRange() { return WebRange(); } |
146 | 146 |
147 // Returns information about the current text input of this WebWidget. | |
148 // Note that this query can be expensive for long fields, as it returns the | |
149 // plain-text representation of the current editable element. Consider using | |
150 // the lighter-weight textInputType() when appropriate. | |
151 virtual WebTextInputInfo textInputInfo() { return WebTextInputInfo(); } | |
152 | |
153 // Returns the type of current text input of this WebWidget. | |
154 virtual WebTextInputType textInputType() { return WebTextInputTypeNone; } | |
155 | |
156 // Returns the anchor and focus bounds of the current selection. | 147 // Returns the anchor and focus bounds of the current selection. |
157 // If the selection range is empty, it returns the caret bounds. | 148 // If the selection range is empty, it returns the caret bounds. |
158 virtual bool selectionBounds(WebRect& anchor, WebRect& focus) const { | 149 virtual bool selectionBounds(WebRect& anchor, WebRect& focus) const { |
159 return false; | 150 return false; |
160 } | 151 } |
161 | 152 |
162 // Returns the text direction at the start and end bounds of the current | 153 // Returns the text direction at the start and end bounds of the current |
163 // selection. If the selection range is empty, it returns false. | 154 // selection. If the selection range is empty, it returns false. |
164 virtual bool selectionTextDirection(WebTextDirection& start, | 155 virtual bool selectionTextDirection(WebTextDirection& start, |
165 WebTextDirection& end) const { | 156 WebTextDirection& end) const { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 // replaced. | 222 // replaced. |
232 virtual void applyReplacementRange(const WebRange&) {} | 223 virtual void applyReplacementRange(const WebRange&) {} |
233 | 224 |
234 protected: | 225 protected: |
235 ~WebWidget() {} | 226 ~WebWidget() {} |
236 }; | 227 }; |
237 | 228 |
238 } // namespace blink | 229 } // namespace blink |
239 | 230 |
240 #endif | 231 #endif |
OLD | NEW |