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

Unified Diff: content/renderer/render_widget.cc

Issue 6990072: The first step for enabling off-the-spot IME on Pepper on ChromeOS/Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved most changes into renderer, and several fixes on style. Created 9 years, 7 months 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 54d787b6cb88688d43ebc400020333a554a7cec4..c5253e10500dac644d57c33ef75f554a67578936 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1224,10 +1224,7 @@ void RenderWidget::UpdateInputMethod() {
WebTextInputType new_type = WebKit::WebTextInputTypeNone;
WebRect new_caret_bounds;
- if (webwidget_) {
- new_type = webwidget_->textInputType();
- new_caret_bounds = webwidget_->caretOrSelectionBounds();
- }
+ GetTextInputType(&new_type, &new_caret_bounds);
// Only sends text input type and caret bounds to the browser process if they
// are changed.
@@ -1239,6 +1236,14 @@ void RenderWidget::UpdateInputMethod() {
}
}
+void RenderWidget::GetTextInputType(WebKit::WebTextInputType* type,
+ WebKit::WebRect* caret_bounds) {
+ if (webwidget_) {
+ *type = webwidget_->textInputType();
+ *caret_bounds = webwidget_->caretOrSelectionBounds();
+ }
+}
+
WebScreenInfo RenderWidget::screenInfo() {
WebScreenInfo results;
Send(new ViewHostMsg_GetScreenInfo(routing_id_, host_window_, &results));

Powered by Google App Engine
This is Rietveld 408576698