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

Unified Diff: third_party/google_input_tools/src/chrome/os/datasource.js

Issue 1257313003: Update Google Input Tools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Free up grd resources. Created 5 years, 5 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
Index: third_party/google_input_tools/src/chrome/os/datasource.js
diff --git a/third_party/google_input_tools/src/chrome/os/datasource.js b/third_party/google_input_tools/src/chrome/os/datasource.js
index e9ab773976ce3b90cba60eab050f131d9a7387df..e2c7f8594359fbe47483d85a9870b951fd1fde2f 100644
--- a/third_party/google_input_tools/src/chrome/os/datasource.js
+++ b/third_party/google_input_tools/src/chrome/os/datasource.js
@@ -29,11 +29,13 @@ var EventTarget = goog.events.EventTarget;
* The data source.
*
* @param {number} numOfCanddiate The number of canddiate to fetch.
- * @param {function(string, !Array.<!Object>)} callback .
+ * @param {function(string, !Array.<!Object>)} candidatesCallback .
+ * @param {function(!Array.<string>)} gestureCallback .
* @constructor
* @extends {EventTarget}
*/
-i18n.input.chrome.DataSource = function(numOfCanddiate, callback) {
+i18n.input.chrome.DataSource = function(numOfCanddiate, candidatesCallback,
+ gestureCallback) {
goog.base(this);
/**
@@ -44,7 +46,10 @@ i18n.input.chrome.DataSource = function(numOfCanddiate, callback) {
this.numOfCandidate = numOfCanddiate;
/** @protected {function(string, !Array.<!Object>)} */
- this.callback = callback;
+ this.candidatesCallback = candidatesCallback;
+
+ /** @protected {function(!Array.<string>)} */
+ this.gestureCallback = gestureCallback;
};
var DataSource = i18n.input.chrome.DataSource;
goog.inherits(DataSource, EventTarget);
@@ -57,6 +62,7 @@ goog.inherits(DataSource, EventTarget);
*/
DataSource.EventType = {
CANDIDATES_BACK: goog.events.getUniqueId('cb'),
+ GESTURES_BACK: goog.events.getUniqueId('gb'),
READY: goog.events.getUniqueId('r')
};
@@ -198,7 +204,7 @@ DataSource.prototype.clear = goog.functions.NULL;
/**
- * The candidates is fetched back.
+ * The candidates are fetched back.
*
* @param {string} source The source.
* @param {!Array.<!Object>} candidates The candidates.
@@ -225,4 +231,26 @@ DataSource.CandidatesBackEvent = function(source, candidates) {
};
goog.inherits(DataSource.CandidatesBackEvent, Event);
+
+
+/**
+ * The gesture results are fetched back.
+ *
+ * @param {!Array.<!string>} results The gesture results.
+ * @constructor
+ * @extends {Event}
+ */
+DataSource.GesturesBackEvent = function(results) {
+ DataSource.GesturesBackEvent.base(
+ this, 'constructor', DataSource.EventType.GESTURES_BACK);
+
+ /**
+ * The gesture results list.
+ *
+ * @type {!Array.<!string>}
+ */
+ this.results = results;
+};
+goog.inherits(DataSource.GesturesBackEvent, Event);
+
}); // goog.scope
« no previous file with comments | « third_party/google_input_tools/src/chrome/os/constant.js ('k') | third_party/google_input_tools/src/chrome/os/env.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698