OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** | 7 /** |
8 * @fileoverview This is the audio client content script injected into eligible | 8 * @fileoverview This is the audio client content script injected into eligible |
9 * Google.com and New tab pages for interaction between the Webpage and the | 9 * Google.com and New tab pages for interaction between the Webpage and the |
10 * Hotword extension. | 10 * Hotword extension. |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 /** | 26 /** |
27 * Port used to communicate with the audio manager. | 27 * Port used to communicate with the audio manager. |
28 * @private {?Port} | 28 * @private {?Port} |
29 */ | 29 */ |
30 this.port_ = null; | 30 this.port_ = null; |
31 | 31 |
32 /** | 32 /** |
33 * Keeps track of the effects of different commands. Used to verify that | 33 * Keeps track of the effects of different commands. Used to verify that |
34 * proper UIs are shown to the user. | 34 * proper UIs are shown to the user. |
35 * @private {Object.<AudioClient.CommandToPage, Object>} | 35 * @private {Object<AudioClient.CommandToPage, Object>} |
36 */ | 36 */ |
37 this.uiStatus_ = null; | 37 this.uiStatus_ = null; |
38 | 38 |
39 /** | 39 /** |
40 * Bound function used to handle commands sent from the page to this script. | 40 * Bound function used to handle commands sent from the page to this script. |
41 * @private {Function} | 41 * @private {Function} |
42 */ | 42 */ |
43 this.handleCommandFromPageFunc_ = null; | 43 this.handleCommandFromPageFunc_ = null; |
44 }; | 44 }; |
45 | 45 |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 this.handleCommandFromExtension_.bind(this)); | 378 this.handleCommandFromExtension_.bind(this)); |
379 | 379 |
380 if (this.speechActive_) | 380 if (this.speechActive_) |
381 this.sendCommandToExtension_(AudioClient.CommandFromPage.SPEECH_START); | 381 this.sendCommandToExtension_(AudioClient.CommandFromPage.SPEECH_START); |
382 }; | 382 }; |
383 | 383 |
384 | 384 |
385 // Initializes as soon as the code is ready, do not wait for the page. | 385 // Initializes as soon as the code is ready, do not wait for the page. |
386 new AudioClient().initialize(); | 386 new AudioClient().initialize(); |
387 })(); | 387 })(); |
OLD | NEW |