Optimize send_request.js

  - Remove the usage of $Array.forEach.
  - Fix some calls to array's methods that is not using $Array.
  - Optimize some O(n^2) algorithms.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225356 0039d316-1c4b-4281-b951-d872f2087c98
Passes input type information to extension virtual keyboard


Uses the input type information that passed from a call to
chrome.virtualKeyboardPrivate.onTextInputBoxFocused in the
extension virtual keyboard.


BUG=297746
TEST=
1. enable virtual keyboard on ChromeOS device (about://flags)
2. go to jsfiddle.net/gPrcj/1/
3. click different input box in the result section

A numeric keyboard should show once focused on "number" input. All
other input box should show a qwerty keyboard.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225357 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 225357