[cros] Fix two issues related to gtk im context support.

BUG=chromium-os:9208
BUG=chromium-os:9575
TEST=See bug reports.

Issue 9208 is due to ibus's async nature: some ibus engines may update preedit string when getting reset. It may happen after calling GtkIMContextWrapper::CancelComposition() method, which then cause this method being called recursively.
So we need to suppress any preedit string signals triggered by GtkIMContextWrapper::CancelComposition() method, just like what we have done for commit signal (http://crbug.com/50485 and issue http://crosbug.com/4792).

Issue 9575 is caused by improper handling of "grab-notify" signal in RWHVGtk, which should not focus in the input context again when the window has been focused out.

Review URL: http://codereview.chromium.org/5372001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67207 0039d316-1c4b-4281-b951-d872f2087c98
2 files changed