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

Unified Diff: ui/keyboard/resources/inputview_adapter.js

Issue 828063007: Uprev Google Input Tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update extensions schema. Created 5 years, 11 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 | « third_party/google_input_tools/src/chrome/os/message/type.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/resources/inputview_adapter.js
diff --git a/ui/keyboard/resources/inputview_adapter.js b/ui/keyboard/resources/inputview_adapter.js
index 203d3014fd07f286dcbbac459975b107cfb3ff8a..1e0d459f9742204bed7fd3cbc29ed01700a9a9c3 100644
--- a/ui/keyboard/resources/inputview_adapter.js
+++ b/ui/keyboard/resources/inputview_adapter.js
@@ -107,7 +107,9 @@ function overrideSwitchToKeyset() {
keysetChangeListener_.target == arguments[0]) {
var callback = keysetChangeListener_.callback;
keysetChangeListener_ = undefined;
- callback();
+ // TODO (rsadam): Get rid of this hack. Currently this is needed to
+ // ensure the keyset was fully loaded before carrying on with the test.
+ setTimeout(callback, 0);
}
}
return success;
@@ -222,6 +224,19 @@ function registerInputviewApi() {
}
/**
+ * Retrieve the current input method configuration.
+ * @param {function} callback The callback function for processing the
+ * name of the active input mehtod.
+ * @private
+ */
+ function getInputMethodConfig_(callback) {
+ if (chrome.inputMethodPrivate)
+ chrome.inputMethodPrivate.getInputMethodConfig(callback);
+ else
+ callback('');
+ }
+
+ /**
* Changes the active input method.
* @param {string} inputMethodId The id of the input method to activate.
* @private
@@ -303,6 +318,7 @@ function registerInputviewApi() {
getKeyboardConfig: getKeyboardConfig_,
getInputMethods: getInputMethods_,
getCurrentInputMethod: getCurrentInputMethod_,
+ getInputMethodConfig: getInputMethodConfig_,
switchToInputMethod: switchToInputMethod_,
openSettings: openSettings_
};
« no previous file with comments | « third_party/google_input_tools/src/chrome/os/message/type.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698