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

Side by Side Diff: third_party/google_input_tools/src/chrome/os/statistics.js

Issue 1576613002: Update Google Input Tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing APIs, remove bade dependencies. Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved. 1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved.
2 // limitations under the License. 2 // limitations under the License.
3 // See the License for the specific language governing permissions and 3 // See the License for the specific language governing permissions and
4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5 // distributed under the License is distributed on an "AS-IS" BASIS, 5 // distributed under the License is distributed on an "AS-IS" BASIS,
6 // Unless required by applicable law or agreed to in writing, software 6 // Unless required by applicable law or agreed to in writing, software
7 // 7 //
8 // http://www.apache.org/licenses/LICENSE-2.0 8 // http://www.apache.org/licenses/LICENSE-2.0
9 // 9 //
10 // You may obtain a copy of the License at 10 // You may obtain a copy of the License at
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 HANDWRITING: 5, 45 HANDWRITING: 5,
46 EMOJI: 6, 46 EMOJI: 6,
47 MAX: 7 47 MAX: 7
48 }; 48 };
49 49
50 50
51 /** 51 /**
52 * The commit type for stats. 52 * The commit type for stats.
53 * Keep this in sync with the enum IMECommitType2 in histograms.xml file in 53 * Keep this in sync with the enum IMECommitType2 in histograms.xml file in
54 * chromium. 54 * chromium.
55 * For adding new items, please append it at the end. 55 * Please append new items at the end.
56 * 56 *
57 * @enum {number} 57 * @enum {number}
58 */ 58 */
59 Statistics.CommitTypes = { 59 Statistics.CommitTypes = {
60 X_X0: 0, // User types X, and chooses X as top suggestion. 60 X_X0: 0, // User types X, and chooses X as top suggestion.
61 X_Y0: 1, // User types X, and chooses Y as top suggestion. 61 X_Y0: 1, // User types X, and chooses Y as top suggestion.
62 X_X1: 2, // User types X, and chooses X as 2nd suggestion. 62 X_X1: 2, // User types X, and chooses X as 2nd suggestion.
63 X_Y1: 3, // User types X, and chooses Y as 2nd suggestion. 63 X_Y1: 3, // User types X, and chooses Y as 2nd suggestion.
64 X_X2: 4, // User types X, and chooses X as 3rd/other suggestion. 64 X_X2: 4, // User types X, and chooses X as 3rd/other suggestion.
65 X_Y2: 5, // User types X, and chooses Y as 3rd/other suggestion. 65 X_Y2: 5, // User types X, and chooses Y as 3rd/other suggestion.
66 PREDICTION: 6, 66 PREDICTION: 6,
67 REVERT: 7, 67 REVERT: 7,
68 VOICE: 8, 68 VOICE: 8,
69 MAX: 9 69 MAX: 9
70 }; 70 };
71 71
72 72
73 /** 73 /**
74 * The event type for gestures typing actions.
75 * Keep this in sync with the enum IMEGestureEventType in histograms.xml file in
76 * chromium.
77 * Please append new items at the end.
78 *
79 * @enum {number}
80 */
81 Statistics.GestureTypingEvent = {
82 TYPED: 0,
83 DELETED: 1,
84 REPLACED_0: 2, // User chooses 1st suggestion.
85 REPLACED_1: 3, // User chooses 2nd suggestion.
86 REPLACED_2: 4, // User chooses 3rd suggestion.
87 MAX: 5
88 };
89
90
91 /**
92 * Name to use when logging gesture typing metrics.
93 *
94 * @const {string}
95 */
96 Statistics.GESTURE_TYPING_METRIC_NAME =
97 'InputMethod.VirtualKeyboard.GestureTypingEvent';
98
99
100 /**
74 * The current input method id. 101 * The current input method id.
75 * 102 *
76 * @private {string} 103 * @private {string}
77 */ 104 */
78 Statistics.prototype.inputMethodId_ = ''; 105 Statistics.prototype.inputMethodId_ = '';
79 106
80 107
81 /** 108 /**
82 * The current auto correct level. 109 * The current auto correct level.
83 * 110 *
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 Statistics.prototype.recordBackspace = function() { 453 Statistics.prototype.recordBackspace = function() {
427 // Ignore multiple backspaces typed in succession. 454 // Ignore multiple backspaces typed in succession.
428 if (this.charactersBetweenBackspaces_ > 0) { 455 if (this.charactersBetweenBackspaces_ > 0) {
429 this.recordValue( 456 this.recordValue(
430 'InputMethod.VirtualKeyboard.CharactersBetweenBackspaces', 457 'InputMethod.VirtualKeyboard.CharactersBetweenBackspaces',
431 this.charactersBetweenBackspaces_, 4096, 50); 458 this.charactersBetweenBackspaces_, 4096, 50);
432 } 459 }
433 this.charactersBetweenBackspaces_ = 0; 460 this.charactersBetweenBackspaces_ = 0;
434 }; 461 };
435 }); // goog.scope 462 }); // goog.scope
OLDNEW
« no previous file with comments | « third_party/google_input_tools/src/chrome/os/sounds/soundcontroller.js ('k') | ui/keyboard/resources/inputview_adapter.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698