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

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

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

Powered by Google App Engine
This is Rietveld 408576698