Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 cr.define('hotword.constants', function() { | 5 cr.define('hotword.constants', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Number of seconds of audio to record when logging is enabled. | 9 * Number of seconds of audio to record when logging is enabled. |
| 10 * @const {number} | 10 * @const {number} |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 */ | 134 */ |
| 135 var CommandToPage = { | 135 var CommandToPage = { |
| 136 HOTWORD_VOICE_TRIGGER: 'vt', | 136 HOTWORD_VOICE_TRIGGER: 'vt', |
| 137 HOTWORD_STARTED: 'hs', | 137 HOTWORD_STARTED: 'hs', |
| 138 HOTWORD_ENDED: 'hd', | 138 HOTWORD_ENDED: 'hd', |
| 139 HOTWORD_TIMEOUT: 'ht', | 139 HOTWORD_TIMEOUT: 'ht', |
| 140 HOTWORD_ERROR: 'he' | 140 HOTWORD_ERROR: 'he' |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 /** | 143 /** |
| 144 * Messages sent from the Google page to the injected scripts | 144 * Messages sent from the Google page to the extension or to the |
| 145 * and then passed to the extension. | 145 * injected scripts and then passed to the extension. |
|
Anand Mistry (off Chromium)
2015/03/10 02:47:28
s/scripts/script while you're here
kcarattini
2015/03/10 04:34:05
Done.
| |
| 146 * @enum {string} | 146 * @enum {string} |
| 147 */ | 147 */ |
| 148 var CommandFromPage = { | 148 var CommandFromPage = { |
| 149 SPEECH_START: 'ss', | 149 SPEECH_START: 'ss', |
| 150 SPEECH_END: 'se', | 150 SPEECH_END: 'se', |
| 151 SPEECH_RESET: 'sr', | 151 SPEECH_RESET: 'sr', |
| 152 SHOWING_HOTWORD_START: 'shs', | 152 SHOWING_HOTWORD_START: 'shs', |
| 153 SHOWING_ERROR_MESSAGE: 'sem', | 153 SHOWING_ERROR_MESSAGE: 'sem', |
| 154 SHOWING_TIMEOUT_MESSAGE: 'stm', | 154 SHOWING_TIMEOUT_MESSAGE: 'stm', |
| 155 CLICKED_RESUME: 'hcc', | 155 CLICKED_RESUME: 'hcc', |
| 156 CLICKED_RESTART: 'hcr', | 156 CLICKED_RESTART: 'hcr', |
| 157 CLICKED_DEBUG: 'hcd', | 157 CLICKED_DEBUG: 'hcd', |
| 158 WAKE_UP_HELPER: 'wuh' | 158 WAKE_UP_HELPER: 'wuh', |
| 159 // Command specifically for the opt-in promo below this line. | |
| 160 // User has explicitly clicked 'no'. | |
| 161 CLICKED_NO_OPTIN: 'hcno', | |
| 162 // User has opted in. | |
| 163 CLICKED_OPTIN: 'hco', | |
| 164 // User clicked on the microphone. | |
| 165 PAGE_WAKEUP: 'wu' | |
| 159 }; | 166 }; |
| 160 | 167 |
| 161 /** | 168 /** |
| 162 * Source of a hotwording session request. | 169 * Source of a hotwording session request. |
| 163 * @enum {string} | 170 * @enum {string} |
| 164 */ | 171 */ |
| 165 var SessionSource = { | 172 var SessionSource = { |
| 166 LAUNCHER: 'launcher', | 173 LAUNCHER: 'launcher', |
| 167 NTP: 'ntp', | 174 NTP: 'ntp', |
| 168 ALWAYS: 'always', | 175 ALWAYS: 'always', |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 284 SessionSource: SessionSource, | 291 SessionSource: SessionSource, |
| 285 TimeoutMs: TimeoutMs, | 292 TimeoutMs: TimeoutMs, |
| 286 UmaMediaStreamOpenResult: UmaMediaStreamOpenResult, | 293 UmaMediaStreamOpenResult: UmaMediaStreamOpenResult, |
| 287 UmaMetrics: UmaMetrics, | 294 UmaMetrics: UmaMetrics, |
| 288 UmaNaClMessageTimeout: UmaNaClMessageTimeout, | 295 UmaNaClMessageTimeout: UmaNaClMessageTimeout, |
| 289 UmaNaClPluginLoadResult: UmaNaClPluginLoadResult, | 296 UmaNaClPluginLoadResult: UmaNaClPluginLoadResult, |
| 290 UmaTriggerSource: UmaTriggerSource | 297 UmaTriggerSource: UmaTriggerSource |
| 291 }; | 298 }; |
| 292 | 299 |
| 293 }); | 300 }); |
| OLD | NEW |