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 |
147 // Returns the anchor and focus bounds of the current selection. | 156 // Returns the anchor and focus bounds of the current selection. |
148 // If the selection range is empty, it returns the caret bounds. | 157 // If the selection range is empty, it returns the caret bounds. |
149 virtual bool selectionBounds(WebRect& anchor, WebRect& focus) const { | 158 virtual bool selectionBounds(WebRect& anchor, WebRect& focus) const { |
150 return false; | 159 return false; |
151 } | 160 } |
152 | 161 |
153 // Returns the text direction at the start and end bounds of the current | 162 // Returns the text direction at the start and end bounds of the current |
154 // selection. If the selection range is empty, it returns false. | 163 // selection. If the selection range is empty, it returns false. |
155 virtual bool selectionTextDirection(WebTextDirection& start, | 164 virtual bool selectionTextDirection(WebTextDirection& start, |
156 WebTextDirection& end) const { | 165 WebTextDirection& end) const { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 // replaced. | 231 // replaced. |
223 virtual void applyReplacementRange(const WebRange&) {} | 232 virtual void applyReplacementRange(const WebRange&) {} |
224 | 233 |
225 protected: | 234 protected: |
226 ~WebWidget() {} | 235 ~WebWidget() {} |
227 }; | 236 }; |
228 | 237 |
229 } // namespace blink | 238 } // namespace blink |
230 | 239 |
231 #endif | 240 #endif |
OLD | NEW |