Implement the NSTextInput protocol.

This change implements the NSTextInput protocol to integrate dead-keys and IME support into Mac Chromium.
Same as Linux, to improve compatibility with Windows Chrome, this change emulates IPC messages sent on Windows when we input characters to fix Issue 11952 and Issue 11981.
Even though I notice we need more work for fixing edge cases (e.g. disabling IMEs on a password input) also on Mac, it is the good starting point. (Supporting edge-cases requires complicated code and it makes hard to review.)

BUG=11952 "IME support is not implemented"
BUG=11981 "Deadkeys do not work"
BUG=16393 "Mac: Not able to insert any letter using "Special Characters" pallet"
TEST=Open a web page which contains an <input> form (e.g. <http://www.google.com/>), type a '[{' key and an 'A' key on a Canadian-French keyboard, and see a Latin character "U+00E2" is displayed in the <input> form.
TEST=Open a web page which contains an <input> form (e.g. <http://www.google.com/>), enable an Chinese Pinyin IME, type a 'W' key, type an 'O' key, and see a Chinese character is displayed in the <input> form.
TEST=Open a web page which contains a <textarea> form, type a return key, and see a new line is inserted.
Review URL: http://codereview.chromium.org/150206

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