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

Unified Diff: content/renderer/render_widget.cc

Issue 8073021: Implement Pepper IME API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge trunk. Created 9 years, 2 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
« no previous file with comments | « content/renderer/render_widget.h ('k') | ppapi/examples/ime/ime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index e4d75c0cd215d80c1b846121f808e397cb31bef6..32701e92c94052ffc06333eb368c8e2920644aff 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1294,10 +1294,7 @@ void RenderWidget::UpdateInputMethod() {
ui::TextInputType new_type = GetTextInputType();
bool new_can_compose_inline = CanComposeInline();
- WebRect new_caret_bounds;
-
- if (webwidget_)
- new_caret_bounds = webwidget_->caretOrSelectionBounds();
+ WebRect new_caret_bounds = GetCaretBounds();
// Only sends text input type and caret bounds to the browser process if they
// are changed.
@@ -1311,6 +1308,13 @@ void RenderWidget::UpdateInputMethod() {
}
}
+gfx::Rect RenderWidget::GetCaretBounds() {
+ if (!webwidget_)
+ return gfx::Rect();
+ return webwidget_->caretOrSelectionBounds();
+}
+
+// Check WebKit::WebTextInputType and ui::TextInputType is kept in sync.
COMPILE_ASSERT(int(WebKit::WebTextInputTypeNone) == \
int(ui::TEXT_INPUT_TYPE_NONE), mismatching_enums);
COMPILE_ASSERT(int(WebKit::WebTextInputTypeText) == \
« no previous file with comments | « content/renderer/render_widget.h ('k') | ppapi/examples/ime/ime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698