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

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

Issue 2333813002: Introduce WebInputMethodController to blink (Closed)
Patch Set: Rebased 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
« no previous file with comments | « third_party/WebKit/public/web/WebView.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 const WebFloatSize& elasticOverscrollDelta, 134 const WebFloatSize& elasticOverscrollDelta,
135 float scaleFactor, 135 float scaleFactor,
136 float browserControlsShownRatioDelta) {} 136 float browserControlsShownRatioDelta) {}
137 137
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 // Called to inform the WebWidget of a new composition text.
145 // If selectionStart and selectionEnd has the same value, then it indicates
146 // the input caret position. If the text is empty, then the existing
147 // composition text will be cancelled.
148 // Returns true if the composition text was set successfully.
149 virtual bool setComposition(
150 const WebString& text,
151 const WebVector<WebCompositionUnderline>& underlines,
152 int selectionStart,
153 int selectionEnd) {
154 return false;
155 }
156
157 enum ConfirmCompositionBehavior {
158 DoNotKeepSelection,
159 KeepSelection,
160 };
161
162 // Called to inform the WebWidget that deleting the ongoing composition if
163 // any, inserting the specified text, and moving the caret according to
164 // relativeCaretPosition.
165 virtual bool commitText(const WebString& text, int relativeCaretPosition) {
166 return false;
167 }
168
169 // Called to inform the WebWidget to confirm an ongoing composition.
170 virtual bool finishComposingText(
171 ConfirmCompositionBehavior selectionBehavior) {
172 return false;
173 }
174
175 // Fetches the character range of the current composition, also called the 144 // Fetches the character range of the current composition, also called the
176 // "marked range." 145 // "marked range."
177 virtual WebRange compositionRange() { return WebRange(); } 146 virtual WebRange compositionRange() { return WebRange(); }
178 147
179 // Returns information about the current text input of this WebWidget. 148 // Returns information about the current text input of this WebWidget.
180 // Note that this query can be expensive for long fields, as it returns the 149 // Note that this query can be expensive for long fields, as it returns the
181 // plain-text representation of the current editable element. Consider using 150 // plain-text representation of the current editable element. Consider using
182 // the lighter-weight textInputType() when appropriate. 151 // the lighter-weight textInputType() when appropriate.
183 virtual WebTextInputInfo textInputInfo() { return WebTextInputInfo(); } 152 virtual WebTextInputInfo textInputInfo() { return WebTextInputInfo(); }
184 153
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // replaced. 232 // replaced.
264 virtual void applyReplacementRange(const WebRange&) {} 233 virtual void applyReplacementRange(const WebRange&) {}
265 234
266 protected: 235 protected:
267 ~WebWidget() {} 236 ~WebWidget() {}
268 }; 237 };
269 238
270 } // namespace blink 239 } // namespace blink
271 240
272 #endif 241 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/public/web/WebView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698