Add candidatewindow* events related IPCs

These IPCs correspond to Javascript IME API events
(oncandidatewindow*) defined in
https://dvcs.w3.org/hg/ime-api/raw-file/8c061ee19f99/Overview.html#inputmethodcontext-interface

They will fire when IME candidate window changes its appearance.

The Blink side of the change is already checked in:
https://src.chromium.org/viewvc/blink?revision=161139&view=revision

This is the Chromium part of sending IPCs to renderer and
a test for both Chromium and Blink code path, which is not
covered by blink r161139.

The whole change FYI is worked on at
https://codereview.chromium.org/80583002/
and other CLs (to generate actual events from IMEs etc.)
will follow.

BUG=238585
TEST=content_browsertests --gtest_filter="RenderViewImplTest.SendCandidateWindowEvents"

Review URL: https://codereview.chromium.org/84963003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238282 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 9c8cf7d..24b5fa6 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -588,6 +588,10 @@
     IPC_MESSAGE_HANDLER(ViewMsg_UpdateRect_ACK, OnUpdateRectAck)
     IPC_MESSAGE_HANDLER(ViewMsg_SwapBuffers_ACK, OnSwapBuffersComplete)
     IPC_MESSAGE_HANDLER(ViewMsg_SetInputMethodActive, OnSetInputMethodActive)
+    IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowShown, OnCandidateWindowShown)
+    IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowUpdated,
+                        OnCandidateWindowUpdated)
+    IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowHidden, OnCandidateWindowHidden)
     IPC_MESSAGE_HANDLER(ViewMsg_ImeSetComposition, OnImeSetComposition)
     IPC_MESSAGE_HANDLER(ViewMsg_ImeConfirmComposition, OnImeConfirmComposition)
     IPC_MESSAGE_HANDLER(ViewMsg_PaintAtSize, OnPaintAtSize)
@@ -2079,6 +2083,18 @@
   input_method_is_active_ = is_active;
 }
 
+void RenderWidget::OnCandidateWindowShown() {
+  webwidget_->didShowCandidateWindow();
+}
+
+void RenderWidget::OnCandidateWindowUpdated() {
+  webwidget_->didUpdateCandidateWindow();
+}
+
+void RenderWidget::OnCandidateWindowHidden() {
+  webwidget_->didHideCandidateWindow();
+}
+
 void RenderWidget::OnImeSetComposition(
     const string16& text,
     const std::vector<WebCompositionUnderline>& underlines,